public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
To: Christoph Hellwig <hch@lst.de>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: [PATCH] scsi: bsg: drop needless assignment in scsi_bsg_sg_io_fn()
Date: Tue, 15 Mar 2022 06:53:25 +0100	[thread overview]
Message-ID: <20220315055325.14974-1-lukas.bulwahn@gmail.com> (raw)

Commit ce70fd9a551a ("scsi: core: Remove the cmd field from struct
scsi_request") refactored scsi_bsg_sg_io_fn(), so that it does not
allocate directly and hence does not return -ENOMEM in its error case.
That makes a remaining assignment of -ENOMEM to the return variable
needless.

Drop this needless assignment in scsi_bsg_sg_io_fn().

No functional change. No change in resulting object code.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
Christoph, please ack.

Martin, please pick this minor clean-up on your -next tree on top of the
commit above.

 drivers/scsi/scsi_bsg.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/scsi_bsg.c b/drivers/scsi/scsi_bsg.c
index 8039c3c11a6e..96ee35256a16 100644
--- a/drivers/scsi/scsi_bsg.c
+++ b/drivers/scsi/scsi_bsg.c
@@ -31,7 +31,6 @@ static int scsi_bsg_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr,
 		return PTR_ERR(rq);
 	rq->timeout = timeout;
 
-	ret = -ENOMEM;
 	scmd = blk_mq_rq_to_pdu(rq);
 	scmd->cmd_len = hdr->request_len;
 	if (scmd->cmd_len > sizeof(scmd->cmnd)) {
-- 
2.17.1


             reply	other threads:[~2022-03-15  5:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15  5:53 Lukas Bulwahn [this message]
2022-03-15  6:29 ` [PATCH] scsi: bsg: drop needless assignment in scsi_bsg_sg_io_fn() Christoph Hellwig
2022-03-15 18:05 ` Martin K. Petersen
2022-03-19  3:56 ` 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=20220315055325.14974-1-lukas.bulwahn@gmail.com \
    --to=lukas.bulwahn@gmail.com \
    --cc=hch@lst.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --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