Skip to contentSkip to conversation

scsi: qla2xxx: Do not log message when reading port speed via sysfs

PATCH Applied Ewan D. Milne 5 participants 5 messages May 4, 2020 – May 8, 2020

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

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.

Cc <[email protected]> # v5.1+
Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting port speed")
---
 drivers/scsi/qla2xxx/qla_attr.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +0 -3
index 3325596..2c9e5ac 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · Ewan D. Milne

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.

Cc <[email protected]> # v5.1+
Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting port

speed")

---
 drivers/scsi/qla2xxx/qla_attr.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +0 -3
index 3325596..2c9e5ac 100644
@@ -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.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Ewan D. Milne
Quoted 19 lines · Ewan D. Milne

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.

Cc <[email protected]> # v5.1+
Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting port speed")
---
  drivers/scsi/qla2xxx/qla_attr.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +0 -0
index 3325596..2c9e5ac 100644

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
Reviewed-by on v1 1/1
#3 lore raw
In reply to Ewan D. Milne
Quoted 19 lines · Ewan D. Milne

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.

Cc <[email protected]> # v5.1+
Fixes 4910b524ac9 ("scsi: qla2xxx: Add support for setting port speed")
---
 drivers/scsi/qla2xxx/qla_attr.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +0 -0
index 3325596..2c9e5ac 100644

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]);
 }
 
#4 lore raw
In reply to Ewan D. Milne
Quoted 5 lines · Ewan D. Milne

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.

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