OSDN Git Service

nvme-fabrics: use unsigned int type
authorChaitanya Kulkarni <kch@nvidia.com>
Wed, 12 Jan 2022 06:20:59 +0000 (22:20 -0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 28 Feb 2022 11:45:04 +0000 (13:45 +0200)
Loop variable i will never have a negative value, so use
unsigned int type instaed of int.

Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c

index f79a66d..9f81a05 100644 (file)
@@ -873,7 +873,7 @@ static int nvmf_check_required_opts(struct nvmf_ctrl_options *opts,
                unsigned int required_opts)
 {
        if ((opts->mask & required_opts) != required_opts) {
-               int i;
+               unsigned int i;
 
                for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) {
                        if ((opt_tokens[i].token & required_opts) &&