cdrom: remove the unused mode argument to cdrom_ioctl
authorChristoph Hellwig <hch@lst.de>
Thu, 8 Jun 2023 11:02:31 +0000 (13:02 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Jun 2023 14:04:03 +0000 (08:04 -0600)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Phillip Potter <phil@philpotter.co.uk>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230608110258.189493-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/cdrom/cdrom.c
drivers/cdrom/gdrom.c
drivers/scsi/sr.c
include/linux/cdrom.h

index e3eab319cb047405c2c90171cceee82f2767bf92..245e5bbb05d41cf2daf75315d6ab081c61a59b0c 100644 (file)
@@ -3336,7 +3336,7 @@ static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
  * ATAPI / SCSI specific code now mainly resides in mmc_ioctl().
  */
 int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
-               fmode_t mode, unsigned int cmd, unsigned long arg)
+               unsigned int cmd, unsigned long arg)
 {
        void __user *argp = (void __user *)arg;
        int ret;
index eaa2d5a90bc82f2aa74990c047cd6d77eb75ce6f..14922403983e9e6c2ffef98c36e1c3885d309425 100644 (file)
@@ -505,7 +505,7 @@ static int gdrom_bdops_ioctl(struct block_device *bdev, fmode_t mode,
        int ret;
 
        mutex_lock(&gdrom_mutex);
-       ret = cdrom_ioctl(gd.cd_info, bdev, mode, cmd, arg);
+       ret = cdrom_ioctl(gd.cd_info, bdev, cmd, arg);
        mutex_unlock(&gdrom_mutex);
 
        return ret;
index 61b83880e395a4b2675f2eee86fa90fb88d6e194..444c7efc14cba7636fa2885708b4cd0c3cf4e523 100644 (file)
@@ -539,7 +539,7 @@ static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
        scsi_autopm_get_device(sdev);
 
        if (cmd != CDROMCLOSETRAY && cmd != CDROMEJECT) {
-               ret = cdrom_ioctl(&cd->cdi, bdev, mode, cmd, arg);
+               ret = cdrom_ioctl(&cd->cdi, bdev, cmd, arg);
                if (ret != -ENOSYS)
                        goto put;
        }
index cc5717cb0fa8a8fe50aca072ff301f9bb857d838..4aea8c82d16971e092f3b3ce09a65aeaefff185f 100644 (file)
@@ -103,8 +103,8 @@ int cdrom_read_tocentry(struct cdrom_device_info *cdi,
 /* the general block_device operations structure: */
 int cdrom_open(struct cdrom_device_info *cdi, fmode_t mode);
 extern void cdrom_release(struct cdrom_device_info *cdi, fmode_t mode);
-extern int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
-                      fmode_t mode, unsigned int cmd, unsigned long arg);
+int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
+               unsigned int cmd, unsigned long arg);
 extern unsigned int cdrom_check_events(struct cdrom_device_info *cdi,
                                       unsigned int clearing);