Message ID | 20201214095424.12479-1-lukas.bulwahn@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [v2] scsi: sd: remove obsolete variable in sd_remove() | expand |
On Mon, 14 Dec 2020 10:54:24 +0100, Lukas Bulwahn wrote: > 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] > > [...] Applied to 5.11/scsi-fixes, thanks! [1/1] scsi: sd: remove obsolete variable in sd_remove() https://git.kernel.org/mkp/scsi/c/be2553358cd4
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 679c2c025047..21675a98620d 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3510,10 +3510,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);