]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: core: Shorten long warning messages
authorLi Zhijian <lizhijian@fujitsu.com>
Thu, 30 Jun 2022 02:38:11 +0000 (02:38 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jul 2022 20:57:16 +0000 (16:57 -0400)
sdev_printk() will only accept messages up to 128 bytes.

Shorten strings exceeding 128 bytes avoid printing an 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

Link: https://lore.kernel.org/r/20220630024516.1571209-1-lizhijian@fujitsu.com
Suggested-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c

index 49ef864df58166552ba495e8a95062b7c712a85c..947d98a0565f78ec72dd00211ed3f477c1ceaa4b 100644 (file)
@@ -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");