From: Mike Christie <michael.christie@oracle.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, Lee Duncan <lduncan@suse.com>
Cc: Chris Leech <cleech@redhat.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] scsi: iscsi: fix harmless double shift bug
Date: Thu, 21 Apr 2022 10:38:36 -0500 [thread overview]
Message-ID: <9a928aff-d577-6fcc-701b-cb2ac93da9bb@oracle.com> (raw)
In-Reply-To: <YmFyWHf8nrrx+SHa@kili>
On 4/21/22 10:03 AM, Dan Carpenter wrote:
> These flags are supposed to be bit numbers. Right now they cause a
> double shift bug where we use BIT(BIT(2)) instead of BIT(2).
> Fortunately, the bit numbers are small and it's done consistently so it
> does not cause an issue at run time.
>
> Fixes: 5bd856256f8c ("scsi: iscsi: Merge suspend fields")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> include/scsi/libiscsi.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
> index d0a24779c52d..c0703cd20a99 100644
> --- a/include/scsi/libiscsi.h
> +++ b/include/scsi/libiscsi.h
> @@ -54,9 +54,9 @@ enum {
> #define ISID_SIZE 6
>
> /* Connection flags */
> -#define ISCSI_CONN_FLAG_SUSPEND_TX BIT(0)
> -#define ISCSI_CONN_FLAG_SUSPEND_RX BIT(1)
> -#define ISCSI_CONN_FLAG_BOUND BIT(2)
> +#define ISCSI_CONN_FLAG_SUSPEND_TX 0
> +#define ISCSI_CONN_FLAG_SUSPEND_RX 1
> +#define ISCSI_CONN_FLAG_BOUND 2
>
> #define ISCSI_ITT_MASK 0x1fff
> #define ISCSI_TOTAL_CMDS_MAX 4096
Thanks.
Reviewed-by: Mike Christie <michael.christie@oracle.com>
next prev parent reply other threads:[~2022-04-21 15:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-21 15:03 [PATCH] scsi: iscsi: fix harmless double shift bug Dan Carpenter
2022-04-21 15:38 ` Mike Christie [this message]
2022-04-21 16:14 ` Lee Duncan
2022-04-22 8:20 ` Antw: [EXT] " Ulrich Windl
2022-04-26 2:36 ` Martin K. Petersen
2022-05-03 0:51 ` Martin K. Petersen
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=9a928aff-d577-6fcc-701b-cb2ac93da9bb@oracle.com \
--to=michael.christie@oracle.com \
--cc=cleech@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=jejb@linux.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lduncan@suse.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=open-iscsi@googlegroups.com \
/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