All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: simplify compat_ioctl handling
@ 2017-10-05 16:46 Christoph Hellwig
  2017-10-08  9:32 ` Max Gurtovoy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christoph Hellwig @ 2017-10-05 16:46 UTC (permalink / raw)


We can just use our normal ioctl handler for the compat case and remove
the boilerplate code for it.

Signed-off-by: Christoph Hellwig <hch at lst.de>
---
 drivers/nvme/host/core.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 26c8913435b2..573cc3b59bfa 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1052,16 +1052,6 @@ static int nvme_ioctl(struct block_device *bdev, fmode_t mode,
 	}
 }
 
-#ifdef CONFIG_COMPAT
-static int nvme_compat_ioctl(struct block_device *bdev, fmode_t mode,
-			unsigned int cmd, unsigned long arg)
-{
-	return nvme_ioctl(bdev, mode, cmd, arg);
-}
-#else
-#define nvme_compat_ioctl	NULL
-#endif
-
 static int nvme_open(struct block_device *bdev, fmode_t mode)
 {
 	return nvme_get_ns_from_disk(bdev->bd_disk) ? 0 : -ENXIO;
@@ -1380,7 +1370,7 @@ EXPORT_SYMBOL_GPL(nvme_sec_submit);
 static const struct block_device_operations nvme_fops = {
 	.owner		= THIS_MODULE,
 	.ioctl		= nvme_ioctl,
-	.compat_ioctl	= nvme_compat_ioctl,
+	.compat_ioctl	= nvme_ioctl,
 	.open		= nvme_open,
 	.release	= nvme_release,
 	.getgeo		= nvme_getgeo,
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] nvme: simplify compat_ioctl handling
  2017-10-05 16:46 [PATCH] nvme: simplify compat_ioctl handling Christoph Hellwig
@ 2017-10-08  9:32 ` Max Gurtovoy
  2017-10-09 15:12 ` Keith Busch
  2017-10-11 10:01 ` Sagi Grimberg
  2 siblings, 0 replies; 4+ messages in thread
From: Max Gurtovoy @ 2017-10-08  9:32 UTC (permalink / raw)




On 10/5/2017 7:46 PM, Christoph Hellwig wrote:
> We can just use our normal ioctl handler for the compat case and remove
> the boilerplate code for it.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
>   drivers/nvme/host/core.c | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 26c8913435b2..573cc3b59bfa 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c

Looks good,
Reviewed-by: Max Gurtovoy <maxg at mellanox.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nvme: simplify compat_ioctl handling
  2017-10-05 16:46 [PATCH] nvme: simplify compat_ioctl handling Christoph Hellwig
  2017-10-08  9:32 ` Max Gurtovoy
@ 2017-10-09 15:12 ` Keith Busch
  2017-10-11 10:01 ` Sagi Grimberg
  2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2017-10-09 15:12 UTC (permalink / raw)


On Thu, Oct 05, 2017@06:46:46PM +0200, Christoph Hellwig wrote:
> We can just use our normal ioctl handler for the compat case and remove
> the boilerplate code for it.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>

Looks good. The compact ioctl was left-over from SG_IO handling.

Reviewed-by: Keith Busch <keith.busch at intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nvme: simplify compat_ioctl handling
  2017-10-05 16:46 [PATCH] nvme: simplify compat_ioctl handling Christoph Hellwig
  2017-10-08  9:32 ` Max Gurtovoy
  2017-10-09 15:12 ` Keith Busch
@ 2017-10-11 10:01 ` Sagi Grimberg
  2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2017-10-11 10:01 UTC (permalink / raw)


Looks good,

Reviewed-by: Sagi Grimberg <sagi at grimberg.me>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-11 10:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 16:46 [PATCH] nvme: simplify compat_ioctl handling Christoph Hellwig
2017-10-08  9:32 ` Max Gurtovoy
2017-10-09 15:12 ` Keith Busch
2017-10-11 10:01 ` Sagi Grimberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.