Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Damien Le Moal <dlemoal@kernel.org>,
	John Garry <john.g.garry@oracle.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Niklas Cassel <cassel@kernel.org>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Sathya Prakash <sathya.prakash@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	 Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
	Nihar Panda <niharp@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Khalid Aziz <khalid@gonehiking.org>,
	Finn Thain <fthain@linux-m68k.org>,
	Michael Schmitz <schmitzmic@gmail.com>,
	Adaptec OEM Raid Solutions <aacraid@microsemi.com>,
	Russell King <linux@armlinux.org.uk>,
	Anil Gurumurthy <anil.gurumurthy@qlogic.com>,
	Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>,
	 Saurav Kashyap <skashyap@marvell.com>,
	Javed Hasan <jhasan@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	 Satish Kharat <satishkh@cisco.com>,
	Sesidhar Baddela <sebaddel@cisco.com>,
	Karan Tilak Kumar <kartilak@cisco.com>,
	Don Brace <don.brace@microchip.com>,
	Tyrel Datwyler <tyreld@linux.ibm.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Brian King <brking@us.ibm.com>, Hannes Reinecke <hare@suse.de>,
	Lee Duncan <lduncan@suse.com>, Chris Leech <cleech@redhat.com>,
	Mike Christie <michael.christie@oracle.com>,
	Justin Tee <justin.tee@broadcom.com>,
	Paul Ely <paul.ely@broadcom.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Sumit Saxena <sumit.saxena@broadcom.com>,
	Shivasharan S <shivasharan.srikanteshwara@broadcom.com>,
	 Chandrakanth patil <chandrakanth.patil@broadcom.com>,
	GOTO Masanori <gotom@debian.or.jp>,
	Nilesh Javali <njavali@marvell.com>,
	Manish Rangankar <mrangankar@marvell.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>,  Dexuan Cui <decui@microsoft.com>,
	Long Li <longli@microsoft.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	 Jason Wang <jasowang@redhat.com>,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Oliver Neukum <oliver@neukum.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Jens Axboe <axboe@kernel.dk>, Al Viro <viro@zeniv.linux.org.uk>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Easwar Hariharan <easwar.hariharan@linux.microsoft.com>,
	Allen Pais <apais@linux.microsoft.com>,
	 Chaitanya Kulkarni <kch@nvidia.com>,
	Guixin Liu <kanie@linux.alibaba.com>,
	Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>,
	Peter Wang <peter.wang@mediatek.com>,
	 Avri Altman <avri.altman@sandisk.com>,
	Bean Huo <beanhuo@micron.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Bao D. Nguyen" <quic_nguyenb@quicinc.com>
Subject: Re: [PATCH] scsi: Change the return type of the .queuecommand() callback
Date: Wed, 07 Jan 2026 07:36:44 -0500	[thread overview]
Message-ID: <f9f4833e9667e9e0a0e94d656fe8138c06705e93.camel@HansenPartnership.com> (raw)
In-Reply-To: <20260106185310.2524290-1-bvanassche@acm.org>

On Tue, 2026-01-06 at 11:52 -0700, Bart Van Assche wrote:
> Let the compiler verify whether a valid value is returned by the
> .queuecommand() implementations by changing their return type from
> 'int' into 'enum scsi_qc_status'.

What makes you think the C compiler checks enum values?  Traditionally
the opposite has been true: enum is just a fancy #define, which is how
we use it in a lot of the kernel code.  Even if the compiler people
came up with a switch to turn on this behaviour, we'd likely have
trouble turning it on without eliminating all the fancy #define use.

Regards,

James


  parent reply	other threads:[~2026-01-07 12:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 18:52 [PATCH] scsi: Change the return type of the .queuecommand() callback Bart Van Assche
2026-01-07  8:58 ` John Garry
2026-01-07 12:36 ` James Bottomley [this message]
2026-01-07 17:09   ` Bart Van Assche

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=f9f4833e9667e9e0a0e94d656fe8138c06705e93.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=aacraid@microsemi.com \
    --cc=adrian.hunter@intel.com \
    --cc=agordeev@linux.ibm.com \
    --cc=anil.gurumurthy@qlogic.com \
    --cc=apais@linux.microsoft.com \
    --cc=avri.altman@sandisk.com \
    --cc=axboe@kernel.dk \
    --cc=beanhuo@micron.com \
    --cc=brking@us.ibm.com \
    --cc=bvanassche@acm.org \
    --cc=cassel@kernel.org \
    --cc=chandrakanth.patil@broadcom.com \
    --cc=cleech@redhat.com \
    --cc=corbet@lwn.net \
    --cc=decui@microsoft.com \
    --cc=dlemoal@kernel.org \
    --cc=don.brace@microchip.com \
    --cc=easwar.hariharan@linux.microsoft.com \
    --cc=fthain@linux-m68k.org \
    --cc=gor@linux.ibm.com \
    --cc=gotom@debian.or.jp \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=hamzamahfooz@linux.microsoft.com \
    --cc=hare@suse.de \
    --cc=hca@linux.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jgross@suse.com \
    --cc=jhasan@marvell.com \
    --cc=john.g.garry@oracle.com \
    --cc=justin.tee@broadcom.com \
    --cc=kanie@linux.alibaba.com \
    --cc=kartilak@cisco.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=kch@nvidia.com \
    --cc=khalid@gonehiking.org \
    --cc=kys@microsoft.com \
    --cc=lduncan@suse.com \
    --cc=leon@kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=longli@microsoft.com \
    --cc=maddy@linux.ibm.com \
    --cc=martin.petersen@oracle.com \
    --cc=michael.christie@oracle.com \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=mrangankar@marvell.com \
    --cc=mst@redhat.com \
    --cc=niharp@linux.ibm.com \
    --cc=njavali@marvell.com \
    --cc=o-takashi@sakamocchi.jp \
    --cc=oliver@neukum.org \
    --cc=paul.ely@broadcom.com \
    --cc=peter.wang@mediatek.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=rdunlap@infradead.org \
    --cc=sathya.prakash@broadcom.com \
    --cc=satishkh@cisco.com \
    --cc=schmitzmic@gmail.com \
    --cc=sebaddel@cisco.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=skashyap@marvell.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=sstabellini@kernel.org \
    --cc=sudarsana.kalluru@qlogic.com \
    --cc=suganath-prabu.subramani@broadcom.com \
    --cc=sumit.saxena@broadcom.com \
    --cc=tglx@linutronix.de \
    --cc=tyreld@linux.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wei.liu@kernel.org \
    /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