From: Iouri Tarassov <[email protected]>

The array of ioctls is initialized statically to remove the unnecessary
function.

Signed-off-by: Iouri Tarassov <[email protected]>
[kms: forward port to 6.6 from 6.1. No code changes made.]
Signed-off-by: Kelsey Steele <[email protected]>
---
 drivers/hv/dxgkrnl/dxgmodule.c |  2 +-
 drivers/hv/dxgkrnl/ioctl.c     | 15 +++++++--------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/hv/dxgkrnl/dxgmodule.c b/drivers/hv/dxgkrnl/dxgmodule.c
index b1b612b90fc1..f1245a9d8826 100644
--- a/drivers/hv/dxgkrnl/dxgmodule.c
+++ b/drivers/hv/dxgkrnl/dxgmodule.c
@@ -300,7 +300,7 @@ static void dxgglobal_start_adapters(void)
 }
 
 /*
- * Stopsthe active dxgadapter objects.
+ * Stop the active dxgadapter objects.
  */
 static void dxgglobal_stop_adapters(void)
 {
diff --git a/drivers/hv/dxgkrnl/ioctl.c b/drivers/hv/dxgkrnl/ioctl.c
index f6700e974f25..8732a66040a0 100644
--- a/drivers/hv/dxgkrnl/ioctl.c
+++ b/drivers/hv/dxgkrnl/ioctl.c
@@ -26,7 +26,6 @@
 struct ioctl_desc {
        int (*ioctl_callback)(struct dxgprocess *p, void __user *arg);
        u32 ioctl;
-       u32 arg_size;
 };
 
 #ifdef DEBUG
@@ -91,7 +90,7 @@ static const struct file_operations dxg_resource_fops = {
 };
 
 static int dxgkio_open_adapter_from_luid(struct dxgprocess *process,
-                                                  void *__user inargs)
+                                       void *__user inargs)
 {
        struct d3dkmt_openadapterfromluid args;
        int ret;
@@ -1002,7 +1001,7 @@ dxgkio_create_hwqueue(struct dxgprocess *process, void 
*__user inargs)
 }
 
 static int dxgkio_destroy_hwqueue(struct dxgprocess *process,
-                                           void *__user inargs)
+                               void *__user inargs)
 {
        struct d3dkmt_destroyhwqueue args;
        int ret;
@@ -2280,7 +2279,8 @@ dxgkio_submit_command(struct dxgprocess *process, void 
*__user inargs)
 }
 
 static int
-dxgkio_submit_command_to_hwqueue(struct dxgprocess *process, void *__user 
inargs)
+dxgkio_submit_command_to_hwqueue(struct dxgprocess *process,
+                               void *__user inargs)
 {
        int ret;
        struct d3dkmt_submitcommandtohwqueue args;
@@ -5087,8 +5087,7 @@ open_resource(struct dxgprocess *process,
 }
 
 static int
-dxgkio_open_resource_nt(struct dxgprocess *process,
-                                     void *__user inargs)
+dxgkio_open_resource_nt(struct dxgprocess *process, void *__user inargs)
 {
        struct d3dkmt_openresourcefromnthandle args;
        struct d3dkmt_openresourcefromnthandle *__user args_user = inargs;
@@ -5166,7 +5165,7 @@ static struct ioctl_desc ioctls[] = {
 /* 0x14 */     {dxgkio_enum_adapters, LX_DXENUMADAPTERS2},
 /* 0x15 */     {dxgkio_close_adapter, LX_DXCLOSEADAPTER},
 /* 0x16 */     {dxgkio_change_vidmem_reservation,
-                 LX_DXCHANGEVIDEOMEMORYRESERVATION},
+                LX_DXCHANGEVIDEOMEMORYRESERVATION},
 /* 0x17 */     {},
 /* 0x18 */     {dxgkio_create_hwqueue, LX_DXCREATEHWQUEUE},
 /* 0x19 */     {dxgkio_destroy_device, LX_DXDESTROYDEVICE},
@@ -5205,7 +5204,7 @@ static struct ioctl_desc ioctls[] = {
                 LX_DXSIGNALSYNCHRONIZATIONOBJECTFROMGPU2},
 /* 0x34 */     {dxgkio_submit_command_to_hwqueue, LX_DXSUBMITCOMMANDTOHWQUEUE},
 /* 0x35 */     {dxgkio_submit_signal_to_hwqueue,
-                 LX_DXSUBMITSIGNALSYNCOBJECTSTOHWQUEUE},
+                LX_DXSUBMITSIGNALSYNCOBJECTSTOHWQUEUE},
 /* 0x36 */     {dxgkio_submit_wait_to_hwqueue,
                 LX_DXSUBMITWAITFORSYNCOBJECTSTOHWQUEUE},
 /* 0x37 */     {dxgkio_unlock2, LX_DXUNLOCK2},

Reply via email to