diff mbox series

scsi: pm80xx: Display proc_name in sysfs

Message ID 20221007230651.308969-1-ipylypiv@google.com
State New
Headers show
Series scsi: pm80xx: Display proc_name in sysfs | expand

Commit Message

Igor Pylypiv Oct. 7, 2022, 11:06 p.m. UTC
The proc_name entry in sysfs for pm80xx is "(null)" because it is
not initialized in scsi_host_template:

Before:
host:~# cat /sys/class/scsi_host/host6/proc_name
(null)

After:
host:~# cat /sys/class/scsi_host/host6/proc_name
pm80xx

Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Reviewed-by: Jolly Shah <jollys@google.com> 
---
 drivers/scsi/pm8001/pm8001_init.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jinpu Wang Oct. 10, 2022, 5:15 a.m. UTC | #1
On Sat, Oct 8, 2022 at 1:07 AM Igor Pylypiv <ipylypiv@google.com> wrote:
>
> The proc_name entry in sysfs for pm80xx is "(null)" because it is
> not initialized in scsi_host_template:
>
> Before:
> host:~# cat /sys/class/scsi_host/host6/proc_name
> (null)
>
> After:
> host:~# cat /sys/class/scsi_host/host6/proc_name
> pm80xx
>
> Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
> Reviewed-by: Jolly Shah <jollys@google.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>  drivers/scsi/pm8001/pm8001_init.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
> index 2ff2fac1e403..7a7d63aa90e2 100644
> --- a/drivers/scsi/pm8001/pm8001_init.c
> +++ b/drivers/scsi/pm8001/pm8001_init.c
> @@ -99,6 +99,7 @@ static void pm8001_map_queues(struct Scsi_Host *shost)
>  static struct scsi_host_template pm8001_sht = {
>         .module                 = THIS_MODULE,
>         .name                   = DRV_NAME,
> +       .proc_name              = DRV_NAME,
>         .queuecommand           = sas_queuecommand,
>         .dma_need_drain         = ata_scsi_dma_need_drain,
>         .target_alloc           = sas_target_alloc,
> --
> 2.38.0.rc1.362.ged0d419d3c-goog
>
Martin K. Petersen Oct. 22, 2022, 3:52 a.m. UTC | #2
On Fri, 7 Oct 2022 16:06:51 -0700, Igor Pylypiv wrote:

> The proc_name entry in sysfs for pm80xx is "(null)" because it is
> not initialized in scsi_host_template:
> 
> Before:
> host:~# cat /sys/class/scsi_host/host6/proc_name
> (null)
> 
> [...]

Applied to 6.1/scsi-fixes, thanks!

[1/1] scsi: pm80xx: Display proc_name in sysfs
      https://git.kernel.org/mkp/scsi/c/181dfce9b63b
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 2ff2fac1e403..7a7d63aa90e2 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -99,6 +99,7 @@  static void pm8001_map_queues(struct Scsi_Host *shost)
 static struct scsi_host_template pm8001_sht = {
 	.module			= THIS_MODULE,
 	.name			= DRV_NAME,
+	.proc_name		= DRV_NAME,
 	.queuecommand		= sas_queuecommand,
 	.dma_need_drain		= ata_scsi_dma_need_drain,
 	.target_alloc		= sas_target_alloc,