-ENOTTY is the convention for "driver does not support this ioctl". Use it properly in mtip32xx instead of the bogys -EINVAL. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- drivers/block/mtip32xx/mtip32xx.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 153e2cdecb4d40..893be95eceb34e 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c @@ -2029,7 +2029,7 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd, } default: - return -EINVAL; + return -ENOTTY; } return 0; } @@ -3215,12 +3215,7 @@ static int mtip_block_ioctl(struct block_device *dev, if (unlikely(test_bit(MTIP_DDF_REMOVE_PENDING_BIT, &dd->dd_flag))) return -ENOTTY; - switch (cmd) { - case BLKFLSBUF: - return -ENOTTY; - default: - return mtip_hw_ioctl(dd, cmd, arg); - } + return mtip_hw_ioctl(dd, cmd, arg); } #ifdef CONFIG_COMPAT @@ -3254,8 +3249,6 @@ static int mtip_block_compat_ioctl(struct block_device *dev, return -ENOTTY; switch (cmd) { - case BLKFLSBUF: - return -ENOTTY; case HDIO_DRIVE_TASKFILE: { struct mtip_compat_ide_task_request_s __user *compat_req_task; ide_task_request_t req_task; -- 2.28.0