Skip to content

Commit

Permalink
scsi: sd: Remove obsolete variable in sd_remove()
Browse files Browse the repository at this point in the history
Commit 996e509 ("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.

[mkp: fixed commit sha]

Link: https://lore.kernel.org/r/20201214095424.12479-1-lukas.bulwahn@gmail.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Lukas Bulwahn authored and Martin K. Petersen committed Jan 6, 2021
1 parent e5cc900 commit be25533
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3512,10 +3512,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);
Expand Down

0 comments on commit be25533

Please sign in to comment.