mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <shao.mingyin@zte.com.cn>
To: <mkp@kernel.org>, <linux-scsi@vger.kernel.org>
Cc: <James.Bottomley@HansenPartnership.com>,
	<alim.akhtar@samsung.com>, <bvanassche@acm.org>,
	<beanhuo@micron.com>, <stanleyjhu@google.com>,
	<loberman@redhat.com>, <jmeneghi@redhat.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 3/5] scsi: sd: drop the dead nr_blocks store
Date: Thu, 5 Nov 2026 19:33:36 +0800 (CST)	[thread overview]
Message-ID: <20261105193336763FrusSP_FRcDQkxzc7F7kS@zte.com.cn> (raw)
In-Reply-To: <20261105193328462jmyNd656AIL6fPlbEJ1Ki@zte.com.cn>

From: Shao Mingyin <shao.mingyin@zte.com.cn>

sd_setup_atomic_cmnd() writes nr_blocks to cmnd[12] and then writes it
again a few lines later, after the boundary field.  The first store is
dead; remove it.

No functional change.

Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
---
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index dc45df819c42..6028f9e6cf7d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1408,7 +1408,6 @@ static blk_status_t sd_setup_atomic_cmnd(struct scsi_cmnd *cmd,
 	cmd->cmnd[0]  = WRITE_ATOMIC_16;
 	cmd->cmnd[1]  = flags;
 	put_unaligned_be64(lba, &cmd->cmnd[2]);
-	put_unaligned_be16(nr_blocks, &cmd->cmnd[12]);
 	if (boundary)
 		put_unaligned_be16(nr_blocks, &cmd->cmnd[10]);
 	else

  parent reply	other threads:[~2026-11-05 11:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 11:33 [PATCH 0/5] scsi: remove dead code and redundant checks shao.mingyin
2026-11-05 11:33 ` [PATCH 1/5] scsi: ufs: drop the unreachable offset check shao.mingyin
2026-11-05 17:18   ` Bart Van Assche
2026-11-05 11:33 ` [PATCH 2/5] scsi: core: drop the dead VPD size check shao.mingyin
2026-11-05 17:18   ` Bart Van Assche
2026-11-05 11:33 ` shao.mingyin [this message]
2026-11-05 11:33 ` [PATCH 4/5] scsi: sd: drop the dead -EOVERFLOW branches shao.mingyin
2026-11-05 17:20   ` Bart Van Assche
2026-11-05 11:33 ` [PATCH 5/5] scsi: st: factor out the end-of-medium completion test shao.mingyin
2026-11-05 17:21   ` Bart Van Assche
2026-11-05 17:54 ` [PATCH 0/5] scsi: remove dead code and redundant checks Bart Van Assche

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=20261105193336763FrusSP_FRcDQkxzc7F7kS@zte.com.cn \
    --to=shao.mingyin@zte.com.cn \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jmeneghi@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=mkp@kernel.org \
    --cc=stanleyjhu@google.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

all inboxes | Powered by JetHome®