Skip to contentSkip to conversation

scsi: pm80xx: Display proc_name in sysfs

PATCH Applied Igor Pylypiv 3 participants 3 messages Oct 7, 2022 – Oct 22, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: pm80xx: Display proc_name in sysfs

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
---
 drivers/scsi/pm8001/pm8001_init.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/pm8001/pm8001_init.c +1 -0
index 2ff2fac1e403..7a7d63aa90e2 100644
@@ -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,
Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Igor Pylypiv

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)
Quoted 6 lines

After:

host:~# cat /sys/class/scsi_host/host6/proc_name
pm80xx
Quoted 19 lines
---
 drivers/scsi/pm8001/pm8001_init.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/pm8001/pm8001_init.c +1 -1
index 2ff2fac1e403..7a7d63aa90e2 100644
@@ -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