From: Dan Carpenter <error27@gmail.com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Stefani Seibold <stefani@seibold.net>,
Andi Kleen <ak@linux.intel.com>,
open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] iscsi: change & to &&
Date: Mon, 8 Mar 2010 15:21:57 +0300 [thread overview]
Message-ID: <20100308122157.GI6469@bicker> (raw)
This change is basically a clean up.
datadgst_en is an int which comes from the user. I didn't see anything
limiting it to 1 and 0 although obviously that's what it's supposed to
be. If the user passed in 2 this test would fail.
This same if condition is repeated in another function and it uses &&
there.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c
index 4ad87fd..3794d29 100644
--- a/drivers/scsi/libiscsi_tcp.c
+++ b/drivers/scsi/libiscsi_tcp.c
@@ -420,7 +420,7 @@ iscsi_tcp_data_recv_prep(struct iscsi_tcp_conn *tcp_conn)
struct iscsi_conn *conn = tcp_conn->iscsi_conn;
struct hash_desc *rx_hash = NULL;
- if (conn->datadgst_en &
+ if (conn->datadgst_en &&
!(conn->session->tt->caps & CAP_DIGEST_OFFLOAD))
rx_hash = tcp_conn->rx_hash;
next reply other threads:[~2010-03-08 12:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-08 12:21 Dan Carpenter [this message]
2010-03-08 20:57 ` [patch] iscsi: change & to && Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100308122157.GI6469@bicker \
--to=error27@gmail.com \
--cc=James.Bottomley@suse.de \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=open-iscsi@googlegroups.com \
--cc=stefani@seibold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).