scsi: qla2xxx: Do not log message when reading port speed via sysfs
Subsystems (3)
PATCH 1/1 scsi: qla2xxx: Do not log message when reading port speed via sysfs
Calling ql_log() inside qla2x00_port_speed_show() is causing messages to be output to the console for no particularly good reason. The sysfs read routine should just return the information to userspace. The only reason to log a message is when the port speed actually changes, and this already occurs elsewhere.
--- drivers/scsi/qla2xxx/qla_attr.c | 3 --- 1 file changed, 3 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +0 -3
@@ -1850,9 +1850,6 @@ qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,return -EINVAL ; } -ql_log (ql_log_info, vha,0x70d6 , -"port speed:%d\n" , ha->link_data_rate); -return scnprintf (buf,PAGE_SIZE ,"%s\n" , spd[ha->link_data_rate]); }
Signature · 1 line
2.1.0
Quoted 31 lines · Ewan D. Milne
Calling
ql_log()insideqla2x00_port_speed_show()is causing messages to be output to the console for no particularly good reason. The sysfs
read routine should just return the information to userspace. The only
reason to log a message is when the port speed actually changes, and this already occurs elsewhere.Cc <[email protected]> # v5.1+Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting portspeed")
Signed-off-by Ewan D. Milne <[email protected]>--- drivers/scsi/qla2xxx/qla_attr.c | 3 --- 1 file changed, 3 deletions(-)drivers/scsi/qla2xxx/qla_attr.c +0
-3@@ -1850,9 +1850,6 @@ qla2x00_port_speed_show(struct device *dev,struct device_attribute *attr, return -EINVAL; } -ql_log (ql_log_info, vha,0x70d6 , -"port speed:%d\n" , ha->link_data_rate); -return scnprintf (buf,PAGE_SIZE ,"%s\n" , spd[ha- >link_data_rate]);
Quoted 2 lines
}
Looks good for me, and fixes an issue we dealt with last week. In other words confusing log noise for customers.
Quoted 19 lines · Ewan D. Milne
Calling
ql_log()insideqla2x00_port_speed_show()is causing messages to be output to the console for no particularly good reason. The sysfs read routine should just return the information to userspace. The only reason to log a message is when the port speed actually changes, and this already occurs elsewhere.Cc <[email protected]> # v5.1+Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting port speed")Signed-off-by Ewan D. Milne <[email protected]>--- drivers/scsi/qla2xxx/qla_attr.c | 3 --- 1 file changed, 3 deletions(-)drivers/scsi/qla2xxx/qla_attr.c +0
-0
drivers/scsi/qla2xxx/qla_attr.c qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr, · line 1855
Quoted 9 lines
drivers/scsi/qla2xxx/qla_attr.c +0
-3@@ -1850,9 +1850,6 @@ qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,return -EINVAL ; } -ql_log (ql_log_info, vha,0x70d6 , -"port speed:%d\n" , ha->link_data_rate); -return scnprintf (buf,PAGE_SIZE ,"%s\n" , spd[ha->link_data_rate]); }
Looks Good.
Signature · 2 lines
Himanshu Madhani Oracle Linux Engineering
Quoted 19 lines · Ewan D. Milne
Calling
ql_log()insideqla2x00_port_speed_show()is causing messages to be output to the console for no particularly good reason. The sysfs read routine should just return the information to userspace. The only reason to log a message is when the port speed actually changes, and this already occurs elsewhere.Cc <[email protected]> # v5.1+Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting port speed")Signed-off-by Ewan D. Milne <[email protected]>--- drivers/scsi/qla2xxx/qla_attr.c | 3 --- 1 file changed, 3 deletions(-)drivers/scsi/qla2xxx/qla_attr.c +0
-0
drivers/scsi/qla2xxx/qla_attr.c qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr, · line 1855
Quoted 9 lines
drivers/scsi/qla2xxx/qla_attr.c +0
-3@@ -1850,9 +1850,6 @@ qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,return -EINVAL ; } -ql_log (ql_log_info, vha,0x70d6 , -"port speed:%d\n" , ha->link_data_rate); -return scnprintf (buf,PAGE_SIZE ,"%s\n" , spd[ha->link_data_rate]); }
Martin K. Petersen
AppliedQuoted 5 lines · Ewan D. Milne
Calling
ql_log()insideqla2x00_port_speed_show()is causing messages to be output to the console for no particularly good reason. The sysfs read routine should just return the information to userspace. The only reason to log a message is when the port speed actually changes, and this already occurs elsewhere.
Applied to 5.7/scsi-queue, thanks!
[1/1] scsi: qla2xxx: Do not log message when reading port speed via sysfs
https://git.kernel.org/mkp/scsi/c/0f3b2f3fb5dc
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering