[PATCH v2 4/4] scsi: sd: drop the dead -EOVERFLOW branches
From: shao.mingyin
Date: Fri Nov 06 2026 - 09:42:45 EST
From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
read_capacity_10() and read_capacity_16() no longer return -EOVERFLOW:
commit 72deb455b5ec ("block: remove CONFIG_LBDAF") removed the last
-EOVERFLOW return statements from both functions. Drop the two branches
that check for it.
No functional change.
Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
---
Changes in v2:
- Mention the commit that removed the -EOVERFLOW return statements.
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index dc45df819c42..8474ad579e90 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2916,8 +2916,6 @@ sd_read_capacity(struct scsi_disk *sdkp, struct queue_limits *lim,
if (sd_try_rc16_first(sdp)) {
sector_size = read_capacity_16(sdkp, sdp, lim, buffer);
- if (sector_size == -EOVERFLOW)
- goto got_data;
if (sector_size == -ENODEV)
return;
if (sector_size < 0)
@@ -2926,8 +2924,6 @@ sd_read_capacity(struct scsi_disk *sdkp, struct queue_limits *lim,
return;
} else {
sector_size = read_capacity_10(sdkp, sdp, buffer);
- if (sector_size == -EOVERFLOW)
- goto got_data;
if (sector_size < 0)
return;
if ((sizeof(sdkp->capacity) > 4) &&