public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: core: sysfs: remove comments that conflict with the actual logic
@ 2022-03-29  2:12 Jackie Liu
  2022-03-29  3:55 ` Guenter Roeck
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jackie Liu @ 2022-03-29  2:12 UTC (permalink / raw)
  To: martin.petersen; +Cc: hch, linux, linux-scsi

From: Jackie Liu <liuyun01@kylinos.cn>

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@linux.dev/

Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-07 13:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-29  2:12 [PATCH] scsi: core: sysfs: remove comments that conflict with the actual logic Jackie Liu
2022-03-29  3:55 ` Guenter Roeck
2022-03-29  6:15 ` Christoph Hellwig
2022-03-30  3:54 ` Martin K. Petersen
2022-04-07 13:35 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox