[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211222165427.1855582-1-linux@roeck-us.net>
Date: Wed, 22 Dec 2021 08:54:27 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: "Martin K . Petersen" <martin.petersen@...cle.com>
Cc: "James E . J . Bottomley" <jejb@...ux.ibm.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Guenter Roeck <linux@...ck-us.net>,
Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>,
Jackie Liu <liuyun01@...inos.cn>
Subject: [PATCH] scsi: bsg: Ignore bsg queue registration failures again
Since commit 5f7cf82c1d73 ("scsi: bsg: Fix errno when
scsi_bsg_register_queue() fails"), errors from registering the bsg queue
are no longer ignored but returned to the caller. At the same time, the
comment in the code still states that errors are ignored. On top of that,
the message preporting the problem is printed as dev_info, not dev_err.
Both suggest that errors from bsg queue registrations should indeed be
ignored.
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Christoph Hellwig <hch@....de>
Cc: Jackie Liu <liuyun01@...inos.cn>
Fixes: 5f7cf82c1d73 ("scsi: bsg: Fix errno when scsi_bsg_register_queue() fails"
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
Commit 5f7cf82c1d73 has proliferated to stable releases, so this patch
should probably be backported as well.
Alternatives:
- revert commit 5f7cf82c1d73
- Change the comment to match the code, and print the message as error
drivers/scsi/scsi_sysfs.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index d4edce930a4a..caa4ad1f893a 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1391,10 +1391,9 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
* We're treating error on bsg register as non-fatal, so
* pretend nothing went wrong.
*/
- error = PTR_ERR(sdev->bsg_dev);
sdev_printk(KERN_INFO, sdev,
- "Failed to register bsg queue, errno=%d\n",
- error);
+ "Failed to register bsg queue, errno=%ld\n",
+ PTR_ERR(sdev->bsg_dev));
sdev->bsg_dev = NULL;
}
}
--
2.33.0
Powered by blists - more mailing lists