scsi: core: sysfs: remove comments that conflict with the actual logic
PATCH 1/1 scsi: core: sysfs: remove comments that conflict with the actual logic
From: Jackie Liu <[email protected]>
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/[email protected]/
--- drivers/scsi/scsi_sysfs.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/scsi/scsi_sysfs.c +0 -4
@@ -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",
Signature · 1 line
2.25.1
Quoted 10 lines · Jackie Liu
From: Jackie Liu <[email protected]>
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.
Quoted 6 lines
We discuss this issue in [1].
[1] https://lore.kernel.org/all/[email protected]/
Suggested-by Christoph Hellwig <[email protected]>Signed-off-by Jackie Liu <[email protected]>
Quoted 19 lines
--- drivers/scsi/scsi_sysfs.c | 4 ---- 1 file changed, 4 deletions(-)drivers/scsi/scsi_sysfs.c +0
-4@@ -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",
Looks good,
Martin K. Petersen
AppliedJackie,
Quoted 2 lines
I think we should just handle the error properly and remove the comment. There's no good reason to ignore bsg registration errors.
Applied to 5.18/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · Jackie Liu
From: Jackie Liu <[email protected]>
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.[...]
Applied to 5.18/scsi-fixes, thanks!
[1/1] scsi: core: sysfs: remove comments that conflict with the actual logic
https://git.kernel.org/mkp/scsi/c/99241e119f4a
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering