IB/iser: use true,false for bool variable
authorzhengbin <zhengbin13@huawei.com>
Tue, 24 Dec 2019 08:40:10 +0000 (16:40 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 3 Jan 2020 23:13:59 +0000 (19:13 -0400)
Fixes coccicheck warning:

drivers/infiniband/ulp/iser/iser_memory.c:530:2-21: WARNING: Assignment of 0/1 to bool variable
drivers/infiniband/ulp/iser/iser_verbs.c:1096:2-21: WARNING: Assignment of 0/1 to bool variable

Link: https://lore.kernel.org/r/1577176812-2238-4-git-send-email-zhengbin13@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/iser/iser_memory.c
drivers/infiniband/ulp/iser/iser_verbs.c

index 0f74dc6..7a8f24d 100644 (file)
@@ -527,7 +527,7 @@ int iser_reg_rdma_mem(struct iscsi_iser_task *task,
                if (unlikely(err))
                        goto err_reg;
 
-               desc->sig_protected = 1;
+               desc->sig_protected = true;
        }
 
        return 0;
index 1f4a37a..127887c 100644 (file)
@@ -1093,7 +1093,7 @@ u8 iser_check_task_pi_status(struct iscsi_iser_task *iser_task,
        int ret;
 
        if (desc && desc->sig_protected) {
-               desc->sig_protected = 0;
+               desc->sig_protected = false;
                ret = ib_check_mr_status(desc->rsc.sig_mr,
                                         IB_MR_CHECK_SIG_STATUS, &mr_status);
                if (ret) {