From: Jackie Liu <liu.yun@linux.dev>
To: martin.petersen@oracle.com
Cc: hch@lst.de, linux@roeck-us.net, linux-scsi@vger.kernel.org
Subject: [PATCH] scsi: core: sysfs: remove comments that conflict with the actual logic
Date: Tue, 29 Mar 2022 10:12:51 +0800 [thread overview]
Message-ID: <20220329021251.123805-1-liu.yun@linux.dev> (raw)
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
next reply other threads:[~2022-03-29 2:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 2:12 Jackie Liu [this message]
2022-03-29 3:55 ` [PATCH] scsi: core: sysfs: remove comments that conflict with the actual logic 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220329021251.123805-1-liu.yun@linux.dev \
--to=liu.yun@linux.dev \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox