[PATCH] scsi: core: sysfs: remove comments that conflict with the actual logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jackie Liu <liuyun01@xxxxxxxxxx>

Christoph Hellwig Says:
=======================
I think we should just handle the error properly and remove the comment.
There's no good reason to ignore bsg registration errors.

In fact, after commit 92c4b58b15c5 ("scsi: core: Register sysfs attributes
earlier"), we are already forced to return errno.

We discuss this issue in [1].

[1] https://lore.kernel.org/all/20211022010201.426746-1-liu.yun@xxxxxxxxx/

Suggested-by: Christoph Hellwig <hch@xxxxxx>
Signed-off-by: Jackie Liu <liuyun01@xxxxxxxxxx>
---
 drivers/scsi/scsi_sysfs.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index f1e0c131b77c..322228faf8da 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1392,10 +1392,6 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
 	if (IS_ENABLED(CONFIG_BLK_DEV_BSG)) {
 		sdev->bsg_dev = scsi_bsg_register_queue(sdev);
 		if (IS_ERR(sdev->bsg_dev)) {
-			/*
-			 * 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",
-- 
2.25.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux