Target-devel archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] IB/isert: Fix warning Comparison to bool
@ 2020-11-03 11:57 Zou Wei
  2020-11-03 20:19 ` Sagi Grimberg
  2020-11-12 16:38 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Zou Wei @ 2020-11-03 11:57 UTC (permalink / raw)
  To: sagi, dledford, jgg; +Cc: linux-rdma, target-devel, linux-kernel, Zou Wei

Fix below warning reported by coccicheck:

./ib_isert.c:1104:12-24: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index bd47894..e47cd02 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -1101,7 +1101,7 @@ isert_handle_scsi_cmd(struct isert_conn *isert_conn,
 sequence_cmd:
 	rc = iscsit_sequence_cmd(conn, cmd, buf, hdr->cmdsn);
 
-	if (!rc && dump_payload = false && unsol_data)
+	if (!rc && !dump_payload && unsol_data)
 		iscsit_set_unsolicited_dataout(cmd);
 	else if (dump_payload && imm_data)
 		target_put_sess_cmd(&cmd->se_cmd);
-- 
2.6.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] IB/isert: Fix warning Comparison to bool
  2020-11-03 11:57 [PATCH -next] IB/isert: Fix warning Comparison to bool Zou Wei
@ 2020-11-03 20:19 ` Sagi Grimberg
  2020-11-12 16:38 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2020-11-03 20:19 UTC (permalink / raw)
  To: Zou Wei, dledford, jgg; +Cc: linux-rdma, target-devel, linux-kernel

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] IB/isert: Fix warning Comparison to bool
  2020-11-03 11:57 [PATCH -next] IB/isert: Fix warning Comparison to bool Zou Wei
  2020-11-03 20:19 ` Sagi Grimberg
@ 2020-11-12 16:38 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-11-12 16:38 UTC (permalink / raw)
  To: Zou Wei; +Cc: sagi, dledford, linux-rdma, target-devel, linux-kernel

On Tue, Nov 03, 2020 at 07:57:54PM +0800, Zou Wei wrote:
> Fix below warning reported by coccicheck:
> 
> ./ib_isert.c:1104:12-24: WARNING: Comparison to bool
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> ---
>  drivers/infiniband/ulp/isert/ib_isert.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 11:57 [PATCH -next] IB/isert: Fix warning Comparison to bool Zou Wei
2020-11-03 20:19 ` Sagi Grimberg
2020-11-12 16:38 ` Jason Gunthorpe

Target-devel archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/target-devel/0 target-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 target-devel target-devel/ https://lore.kernel.org/target-devel \
		target-devel@vger.kernel.org
	public-inbox-index target-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.target-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git