Skip to contentSkip to conversation

scsi: Remove unnecessary condition in sd_read_block_limits()

PATCH In review Lukas Czerner 3 participants 3 messages Sep 13, 2017 – Sep 15, 2017 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: Remove unnecessary condition in sd_read_block_limits()

After series of changes around WRITE_SAME and UNMAP setup we ended up with leftover unnecessary condition. Remove it.

---
 drivers/scsi/sd.c | 2 --
 1 file changed, 2 deletions(-)
drivers/scsi/sd.c +0 -2
index 11c1738..fb9f8b5 100644
@@ -2915,8 +2915,6 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
 				sd_config_discard(sdkp, SD_LBP_WS16);
 			else if (sdkp->lbpws10)
 				sd_config_discard(sdkp, SD_LBP_WS10);
-			else if (sdkp->lbpu && sdkp->max_unmap_blocks)
-				sd_config_discard(sdkp, SD_LBP_UNMAP);
 			else
 				sd_config_discard(sdkp, SD_LBP_DISABLE);
 		}
Signature · 1 line
2.7.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Lukas Czerner

After series of changes around WRITE_SAME and UNMAP setup we ended up with leftover unnecessary condition. Remove it.

A similar patch was sitting in my tree and waiting to be posted. But since you posted this first:

#2 lore raw
In reply to Lukas Czerner

Lukas,

Quoted 2 lines

After series of changes around WRITE_SAME and UNMAP setup we ended up with leftover unnecessary condition. Remove it.

Yeah, lbprz went away and made it redundant. Applied to 4.14/scsi-fixes. Thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering