Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: James Bottomley <jejb@linux.vnet.ibm.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] sr: Fix a recently introduced W=1 compiler warning
Date: Sun, 29 Mar 2020 20:06:27 -0700	[thread overview]
Message-ID: <1585537587.4510.6.camel@linux.vnet.ibm.com> (raw)
In-Reply-To: <20200330025304.10743-1-bvanassche@acm.org>

On Sun, 2020-03-29 at 19:53 -0700, Bart Van Assche wrote: 
>  static unsigned int sr_block_check_events(struct gendisk *disk,
>  					  unsigned int clearing)
> @@ -685,8 +685,9 @@ static const struct block_device_operations
> sr_bdops =
>  	.owner		= THIS_MODULE,
>  	.open		= sr_block_open,
>  	.release	= sr_block_release,
> +#ifndef CONFIG_COMPAT
>  	.ioctl		= sr_block_ioctl,
> -#ifdef CONFIG_COMPAT
> +#else
>  	.ioctl		= sr_block_compat_ioctl,

Well, this is obviously incorrect: we need the compat ioctl for 32 on
64 bit and the real for native 64 bit, so both have to be defined. 
What you propose would work if we were only ever 32 on 64.  I think
what you want to do is change the second .ioctl to .compat_ioctl.

James


  reply	other threads:[~2020-03-30  3:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  2:53 [PATCH] sr: Fix a recently introduced W=1 compiler warning Bart Van Assche
2020-03-30  3:06 ` James Bottomley [this message]
2020-03-30  8:59   ` Arnd Bergmann

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=1585537587.4510.6.camel@linux.vnet.ibm.com \
    --to=jejb@linux.vnet.ibm.com \
    --cc=arnd@arndb.de \
    --cc=bvanassche@acm.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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