From: Finn Thain <fthain@linux-m68k.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org,
Michael Schmitz <schmitzmic@gmail.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <mkp@kernel.org>
Subject: Re: [PATCH v4 06/54] scsi: NCR5380: Prepare for enabling lock context analysis
Date: Sat, 26 Sep 2026 10:42:10 +1000 (AEST) [thread overview]
Message-ID: <f2c1a279-088a-9e78-8b87-e5296950ff1d@linux-m68k.org> (raw)
In-Reply-To: <a9d1b960868ac4dae9c5a9b98aea5dcf6713fb97.1790360262.git.bvanassche@acm.org>
On Fri, 25 Sep 2026, Bart Van Assche wrote:
> Pass the struct NCR5380_hostdata pointer directly to NCR5380_select()
> and NCR5380_information_transfer() instead of the struct Scsi_Host
> pointer. This ensures that the lock context annotations
> (__releases(&hostdata->lock) and __acquires(&hostdata->lock)) refer to
> a function argument. Update callers and function prototypes accordingly.
>
> Cc: Finn Thain <fthain@linux-m68k.org>
> Cc: Michael Schmitz <schmitzmic@gmail.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/NCR5380.c | 19 ++++++++++---------
> drivers/scsi/NCR5380.h | 5 +++--
> 2 files changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
> index 006dcf981218..6afbd5936892 100644
> --- a/drivers/scsi/NCR5380.c
> +++ b/drivers/scsi/NCR5380.c
> @@ -718,7 +718,7 @@ static void NCR5380_main(struct work_struct *work)
> * entire unit.
> */
>
> - if (!NCR5380_select(instance, cmd)) {
> + if (!NCR5380_select(hostdata, cmd)) {
> dsprintk(NDEBUG_MAIN, instance, "main: select complete\n");
> } else {
> dsprintk(NDEBUG_MAIN | NDEBUG_QUEUES, instance,
> @@ -728,7 +728,7 @@ static void NCR5380_main(struct work_struct *work)
> }
> if (hostdata->connected && !hostdata->dma_len) {
> dsprintk(NDEBUG_MAIN, instance, "main: performing information transfer\n");
> - NCR5380_information_transfer(instance);
> + NCR5380_information_transfer(hostdata);
> done = 0;
> }
> if (!hostdata->connected) {
> @@ -937,7 +937,7 @@ static irqreturn_t __maybe_unused NCR5380_intr(int irq, void *dev_id)
>
> /**
> * NCR5380_select - attempt arbitration and selection for a given command
> - * @instance: the Scsi_Host instance
> + * @hostdata: host private data
> * @cmd: the scsi_cmnd to execute
> *
> * This routine establishes an I_T_L nexus for a SCSI command. This involves
> @@ -960,10 +960,11 @@ static irqreturn_t __maybe_unused NCR5380_intr(int irq, void *dev_id)
> * cmd->result host byte set to DID_BAD_TARGET.
> */
>
> -static bool NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd)
> +static bool NCR5380_select(struct NCR5380_hostdata *hostdata,
> + struct scsi_cmnd *cmd)
> __releases(&hostdata->lock) __acquires(&hostdata->lock)
> {
> - struct NCR5380_hostdata *hostdata = shost_priv(instance);
> + struct Scsi_Host *instance = hostdata->host;
> unsigned char tmp[3], phase;
> unsigned char *data;
> int len;
> @@ -1643,23 +1644,23 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance,
> }
>
> /*
> - * Function : NCR5380_information_transfer (struct Scsi_Host *instance)
> + * Function : NCR5380_information_transfer(struct NCR5380_hostdata *hostdata)
> *
> * Purpose : run through the various SCSI phases and do as the target
> * directs us to. Operates on the currently connected command,
> * instance->connected.
> *
> - * Inputs : instance, instance for which we are doing commands
> + * Inputs : hostdata, the private host data
> *
> * Side effects : SCSI things happen, the disconnected queue will be
> * modified if a command disconnects, *instance->connected will
> * change.
> */
>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Would you please update that to kerneldoc format? Something like this:
/**
* NCR5380_information_transfer - respond to information transfer phases
* @hostdata: private host data
*
* Run through various bus phases as directed by the target.
* Operates on the currently connected command until it's either completed
* or moved to the disconnected queue.
*/
next prev parent reply other threads:[~2026-09-26 0:42 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 18:25 [PATCH v4 00/54] scsi: Enable context analysis for most drivers Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 01/54] PCI: Convert to_pci_dev() into an inline function Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 02/54] scsi: sg: Prepare for enabling lock context analysis Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 03/54] scsi: st: " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 04/54] scsi: BusLogic: Pass the host pointer directly to several functions Bart Van Assche
2026-09-26 20:02 ` Khalid Aziz
2026-09-28 17:41 ` Bart Van Assche
2026-09-28 18:55 ` Khalid Aziz
2026-09-28 19:28 ` Bart Van Assche
2026-09-30 20:13 ` Khalid Aziz
2026-09-30 20:42 ` Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 05/54] scsi: BusLogic: Prepare for enabling lock context analysis Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 06/54] scsi: NCR5380: " Bart Van Assche
2026-09-26 0:42 ` Finn Thain [this message]
2026-09-28 17:42 ` Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 07/54] scsi: aacraid: Enable " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 08/54] scsi: aha152x: Prepare for enabling " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 09/54] scsi: aic7xxx: Enable " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 10/54] scsi: aic94xx: " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 11/54] scsi: arcmsr: " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 12/54] scsi: libiscsi: Pass the session pointer directly to several functions Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 13/54] scsi: libiscsi: Prepare for enabling lock context analysis Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 14/54] scsi: be2iscsi: Enable " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 15/54] scsi: cxgbi: " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 16/54] scsi: bfa: " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 17/54] scsi: bnx2fc: Pass tgt directly to several functions Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 18/54] scsi: bnx2fc: Enable lock context analysis Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 19/54] scsi: bnx2i: " Bart Van Assche
2026-09-25 18:25 ` [PATCH v4 20/54] scsi: csiostor: Pass the hw pointer directly to several functions Bart Van Assche
2026-09-28 6:27 ` Damien Le Moal
2026-09-25 18:25 ` [PATCH v4 21/54] scsi: csiostor: Enable lock context analysis Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 22/54] scsi: elx: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 23/54] scsi: esas2r: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 24/54] scsi: fcoe: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 25/54] scsi: fnic: Pass pointers directly to several functions Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 26/54] scsi: fnic: Enable lock context analysis Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 27/54] scsi: hisi_sas: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 28/54] scsi: hpsa: Prepare for enabling " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 29/54] scsi: ibmvscsi: Enable " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 30/54] scsi: ibmvscsi_tgt: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 31/54] scsi: ipr: Simplify ipr_eh_abort() Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 32/54] scsi: ipr: Pass the host pointer directly to several functions Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 33/54] scsi: ipr: Prepare for enabling lock context analysis Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 34/54] scsi: ips: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 35/54] scsi: isci: Enable " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 36/54] scsi: libfc: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 37/54] scsi: libsas: Prepare for enabling " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 38/54] scsi: libsas: Enable " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 39/54] scsi: lpfc: Prepare for enabling " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 40/54] scsi: mpt3sas: Enable " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 41/54] scsi: mvsas: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 42/54] scsi: pcmcia: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 43/54] scsi: pm8001: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 44/54] scsi: qedf: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 45/54] scsi: qedi: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 46/54] scsi: qla1280: Pass the host pointer directly to several functions Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 47/54] scsi: qla1280: Prepare for enabling lock context analysis Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 48/54] scsi: qla2xxx: Enable " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 49/54] scsi: qla4xxx: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 50/54] scsi: iSCSI transport: Prepare for enabling " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 51/54] scsi: smartpqi: Enable " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 52/54] scsi: snic: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 53/54] scsi: sym53c8xx_2: " Bart Van Assche
2026-09-25 18:26 ` [PATCH v4 54/54] scsi: drivers: " 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=f2c1a279-088a-9e78-8b87-e5296950ff1d@linux-m68k.org \
--to=fthain@linux-m68k.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkp@kernel.org \
--cc=schmitzmic@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.