From: Hannes Reinecke <hare@suse.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>,
Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Johannes Thumshirn <jthumshirn@suse.de>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: bfa: fix type conversion warning
Date: Thu, 7 Dec 2017 10:19:43 +0100 [thread overview]
Message-ID: <20171207101943.7e01248c@pentland.suse.de> (raw)
In-Reply-To: <20171206141444.634681-1-arnd@arndb.de>
On Wed, 6 Dec 2017 15:14:18 +0100
Arnd Bergmann <arnd@arndb.de> wrote:
> A regression fix introduced a harmless type mismatch warning:
>
> drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_im_bsg_vendor_request':
> drivers/scsi/bfa/bfad_bsg.c:3137:35: error: initialization of 'struct
> bfad_im_port_s *' from 'long unsigned int' makes pointer from integer
> without a cast [-Werror=int-conversion] struct bfad_im_port_s
> *im_port = shost->hostdata[0]; ^~~~~ drivers/scsi/bfa/bfad_bsg.c: In
> function 'bfad_im_bsg_els_ct_request':
> drivers/scsi/bfa/bfad_bsg.c:3353:35: error: initialization of 'struct
> bfad_im_port_s *' from 'long unsigned int' makes pointer from integer
> without a cast [-Werror=int-conversion] struct bfad_im_port_s
> *im_port = shost->hostdata[0];
>
> This changes the code back to shost_priv() once more, but encapsulates
> it in an inline function to document the rather unusual way of
> using the private data only as a pointer to the previously allocated
> structure.
>
> I did not try to get rid of the extra indirection level entirely,
> which would have been rather invasive and required reworking the
> entire initialization sequence.
>
> Fixes: 45349821ab3a ("scsi: bfa: fix access to bfad_im_port_s")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/scsi/bfa/bfad_bsg.c | 4 ++--
> drivers/scsi/bfa/bfad_im.c | 6 ++++--
> drivers/scsi/bfa/bfad_im.h | 10 ++++++++++
> 3 files changed, 16 insertions(+), 4 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
next prev parent reply other threads:[~2017-12-07 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 14:14 Arnd Bergmann
2017-12-07 9:17 ` Johannes Thumshirn
2017-12-07 9:19 ` Hannes Reinecke [this message]
2017-12-08 0:58 ` 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=20171207101943.7e01248c@pentland.suse.de \
--to=hare@suse.com \
--cc=anil.gurumurthy@qlogic.com \
--cc=arnd@arndb.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sudarsana.kalluru@qlogic.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
Powered by JetHome