diff mbox series

scsi: Shorten too long warning messages

Message ID 20220630024516.1571209-1-lizhijian@fujitsu.com
State New
Headers show
Series scsi: Shorten too long warning messages | expand

Commit Message

Li Zhijian June 30, 2022, 2:38 a.m. UTC
sdev_printk will only accept messages less than 128 bytes. So shorten
the messages exceeding 128 bytes avoid getting a incomplete sentence like:
[  475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical

Suggested-by: Finn Thain <fthain@linux-m68k.org>
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
---
V2: update patch as suggested by Finn and upadte the subject correspondingly
---
 drivers/scsi/scsi_error.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Bart Van Assche June 30, 2022, 4:05 p.m. UTC | #1
On 6/29/22 19:38, lizhijian@fujitsu.com wrote:
> sdev_printk will only accept messages less than 128 bytes. So shorten
> the messages exceeding 128 bytes avoid getting a incomplete sentence like:
> [  475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Martin K. Petersen July 7, 2022, 8:57 p.m. UTC | #2
> sdev_printk will only accept messages less than 128 bytes. So shorten
> the messages exceeding 128 bytes avoid getting a incomplete sentence like:
> [ 475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN
> assignments on this target have changed. The Linux SCSI layer does not
> automatical

Applied to 5.20/scsi-staging, thanks!
Martin K. Petersen July 14, 2022, 4:22 a.m. UTC | #3
On Thu, 30 Jun 2022 02:38:11 +0000, lizhijian@fujitsu.com wrote:

> sdev_printk will only accept messages less than 128 bytes. So shorten
> the messages exceeding 128 bytes avoid getting a incomplete sentence like:
> [  475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical
> 
> 

Applied to 5.20/scsi-queue, thanks!

[1/1] scsi: Shorten too long warning messages
      https://git.kernel.org/mkp/scsi/c/a2417db3679c
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 49ef864df581..947d98a0565f 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -463,14 +463,12 @@  static void scsi_report_sense(struct scsi_device *sdev,
 			evt_type = SDEV_EVT_LUN_CHANGE_REPORTED;
 			scsi_report_lun_change(sdev);
 			sdev_printk(KERN_WARNING, sdev,
-				    "Warning! Received an indication that the "
 				    "LUN assignments on this target have "
 				    "changed. The Linux SCSI layer does not "
 				    "automatically remap LUN assignments.\n");
 		} else if (sshdr->asc == 0x3f)
 			sdev_printk(KERN_WARNING, sdev,
-				    "Warning! Received an indication that the "
-				    "operating parameters on this target have "
+				    "Operating parameters on this target have "
 				    "changed. The Linux SCSI layer does not "
 				    "automatically adjust these parameters.\n");