scsi: sd: remove obsolete variable in sd_remove()
Subsystems (2)
PATCH 1/1 scsi: sd: remove obsolete variable in sd_remove()
Commit 140ea3bbf39a ("sd: use __register_blkdev to avoid a modprobe for an unregistered dev_t") removed blk_register_region(devt, ...) in sd_remove() and since then, devt is unused in sd_remove().
Hence, make W=1 warns:
drivers/scsi/sd.c:3516:8:
warning: variable 'devt' set but not used [-Wunused-but-set-variable]
Simply remove this obsolete variable.
---
applies cleanly on current master and next-20201113
Christoph, Hannes, please ack.
Martin, James, please pick this minor non-urgent clean-up patch.
drivers/scsi/sd.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/sd.c +0 -2
@@ -3513,10 +3513,8 @@ static int sd_probe(struct device *dev)static int sd_remove (struct device *dev) {struct scsi_disk *sdkp; -dev_t devt; sdkp =dev_get_drvdata (dev); - devt =disk_devt (sdkp->disk);scsi_autopm_get_device (sdkp->device);async_synchronize_full_domain (&scsi_sd_pm_domain);
Signature · 1 line
2.17.1
Looks good,
Quoted 4 lines · Lukas Bulwahn
Commit
140ea3bbf39a("sd: use__register_blkdevto avoid a modprobe for an unregistereddev_t") removedblk_register_region(devt, ...)insd_remove()and since then, devt is unused insd_remove().
Quoted 8 lines
Hence, make W=1 warns:
drivers/scsi/sd.c:3516:8:
warning: variable 'devt' set but not used [-Wunused-but-set-variable]Simply remove this obsolete variable.
Signed-off-by Lukas Bulwahn <[email protected]>
Martin K. Petersen
AppliedLukas,
Quoted 3 lines
Commit
140ea3bbf39a("sd: use__register_blkdevto avoid a modprobe for an unregistereddev_t") removedblk_register_region(devt, ...)insd_remove()and since then, devt is unused insd_remove().
Applied to 5.11/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
Acked-byQuoted 6 lines
Quoted 4 lines
Commit
140ea3bbf39a("sd: use__register_blkdevto avoid a modprobe for an unregistereddev_t") removedblk_register_region(devt, ...)insd_remove()and since then, devt is unused insd_remove().Applied to 5.11/scsi-staging, thanks!
Actually, this should go through block given the dependency on the commit above.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering