From: Martin Wilck <martin.wilck@suse.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
Don Brace <don.brace@microchip.com>
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>,
Lee Duncan <lduncan@suse.com>, Martin Wilck <mwilck@suse.com>,
storagedev@microchip.com, stable@vger.kernel.org
Subject: [PATCH 1/2] scsi: smartpqi: use shost_to_hba() in pqi_scan_finished()
Date: Wed, 15 Apr 2026 22:48:49 +0200 [thread overview]
Message-ID: <20260415204850.799431-2-mwilck@suse.com> (raw)
In-Reply-To: <20260415204850.799431-1-mwilck@suse.com>
shost_to_hba() is used everywhere except to obtain pqi_ctrl_info
from shosti, except in pqi_scan_finished(), where shost_priv() is used.
This causes one pointer dereference to be missed, as shost->hostdata
is a pointer in smartpqi. Fix it.
Fixes: 6c223761eb54 ("smartpqi: initial commit of Microsemi smartpqi driver")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Cc: Don Brace <don.brace@microchip.com>
Cc: storagedev@microchip.com
Cc: stable@vger.kernel.org
---
drivers/scsi/smartpqi/smartpqi_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index b4ed991..65ff509 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2642,7 +2642,7 @@ static int pqi_scan_finished(struct Scsi_Host *shost,
{
struct pqi_ctrl_info *ctrl_info;
- ctrl_info = shost_priv(shost);
+ ctrl_info = shost_to_hba(shost);
return !mutex_is_locked(&ctrl_info->scan_mutex);
}
--
2.51.0
next parent reply other threads:[~2026-04-15 20:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260415204850.799431-1-mwilck@suse.com>
2026-04-15 20:48 ` Martin Wilck [this message]
2026-04-16 5:56 ` [PATCH 1/2] scsi: smartpqi: use shost_to_hba() in pqi_scan_finished() Hannes Reinecke
2026-04-16 14:10 ` Don.Brace
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=20260415204850.799431-2-mwilck@suse.com \
--to=martin.wilck@suse.com \
--cc=don.brace@microchip.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=lduncan@suse.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mwilck@suse.com \
--cc=stable@vger.kernel.org \
--cc=storagedev@microchip.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