Skip to content

Commit 5e4ea83

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove unused fmode_t arguments from ioctl handlers
A few ioctl handlers have fmode_t arguments that are entirely unused, remove them. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20230608110258.189493-27-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent cfb4257 commit 5e4ea83

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

block/blk-zoned.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ static int blkdev_copy_zone_to_user(struct blk_zone *zone, unsigned int idx,
323323
* BLKREPORTZONE ioctl processing.
324324
* Called from blkdev_ioctl.
325325
*/
326-
int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
327-
unsigned int cmd, unsigned long arg)
326+
int blkdev_report_zones_ioctl(struct block_device *bdev, unsigned int cmd,
327+
unsigned long arg)
328328
{
329329
void __user *argp = (void __user *)arg;
330330
struct zone_report_args args;

block/blk.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,15 +394,15 @@ static inline struct bio *blk_queue_bounce(struct bio *bio,
394394
#ifdef CONFIG_BLK_DEV_ZONED
395395
void disk_free_zone_bitmaps(struct gendisk *disk);
396396
void disk_clear_zone_settings(struct gendisk *disk);
397-
int blkdev_report_zones_ioctl(struct block_device *bdev, fmode_t mode,
398-
unsigned int cmd, unsigned long arg);
397+
int blkdev_report_zones_ioctl(struct block_device *bdev, unsigned int cmd,
398+
unsigned long arg);
399399
int blkdev_zone_mgmt_ioctl(struct block_device *bdev, fmode_t mode,
400400
unsigned int cmd, unsigned long arg);
401401
#else /* CONFIG_BLK_DEV_ZONED */
402402
static inline void disk_free_zone_bitmaps(struct gendisk *disk) {}
403403
static inline void disk_clear_zone_settings(struct gendisk *disk) {}
404404
static inline int blkdev_report_zones_ioctl(struct block_device *bdev,
405-
fmode_t mode, unsigned int cmd, unsigned long arg)
405+
unsigned int cmd, unsigned long arg)
406406
{
407407
return -ENOTTY;
408408
}

block/ioctl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ static int blkdev_pr_clear(struct block_device *bdev,
344344
return ops->pr_clear(bdev, c.key);
345345
}
346346

347-
static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode,
348-
unsigned cmd, unsigned long arg)
347+
static int blkdev_flushbuf(struct block_device *bdev, unsigned cmd,
348+
unsigned long arg)
349349
{
350350
if (!capable(CAP_SYS_ADMIN))
351351
return -EACCES;
@@ -354,8 +354,8 @@ static int blkdev_flushbuf(struct block_device *bdev, fmode_t mode,
354354
return 0;
355355
}
356356

357-
static int blkdev_roset(struct block_device *bdev, fmode_t mode,
358-
unsigned cmd, unsigned long arg)
357+
static int blkdev_roset(struct block_device *bdev, unsigned cmd,
358+
unsigned long arg)
359359
{
360360
int ret, n;
361361

@@ -475,9 +475,9 @@ static int blkdev_common_ioctl(struct block_device *bdev, fmode_t mode,
475475

476476
switch (cmd) {
477477
case BLKFLSBUF:
478-
return blkdev_flushbuf(bdev, mode, cmd, arg);
478+
return blkdev_flushbuf(bdev, cmd, arg);
479479
case BLKROSET:
480-
return blkdev_roset(bdev, mode, cmd, arg);
480+
return blkdev_roset(bdev, cmd, arg);
481481
case BLKDISCARD:
482482
return blk_ioctl_discard(bdev, mode, arg);
483483
case BLKSECDISCARD:
@@ -487,7 +487,7 @@ static int blkdev_common_ioctl(struct block_device *bdev, fmode_t mode,
487487
case BLKGETDISKSEQ:
488488
return put_u64(argp, bdev->bd_disk->diskseq);
489489
case BLKREPORTZONE:
490-
return blkdev_report_zones_ioctl(bdev, mode, cmd, arg);
490+
return blkdev_report_zones_ioctl(bdev, cmd, arg);
491491
case BLKRESETZONE:
492492
case BLKOPENZONE:
493493
case BLKCLOSEZONE:

0 commit comments

Comments
 (0)