Skip to content

Commit bdd7ff7

Browse files
Iouri Tarassovchessturo
authored andcommitted
drivers: hv: dxgkrnl: Remove dxgk_init_ioctls
The array of ioctls is initialized statically to remove the unnecessary function. Signed-off-by: Iouri Tarassov <iourit@linux.microsoft.com> [kms: forward port to 6.6 from 6.1. No code changes made.] Signed-off-by: Kelsey Steele <kelseysteele@microsoft.com>
1 parent ea708f9 commit bdd7ff7

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

drivers/hv/dxgkrnl/dxgmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void dxgglobal_start_adapters(void)
300300
}
301301

302302
/*
303-
* Stopsthe active dxgadapter objects.
303+
* Stop the active dxgadapter objects.
304304
*/
305305
static void dxgglobal_stop_adapters(void)
306306
{

drivers/hv/dxgkrnl/ioctl.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
struct ioctl_desc {
2727
int (*ioctl_callback)(struct dxgprocess *p, void __user *arg);
2828
u32 ioctl;
29-
u32 arg_size;
3029
};
3130

3231
#ifdef DEBUG
@@ -91,7 +90,7 @@ static const struct file_operations dxg_resource_fops = {
9190
};
9291

9392
static int dxgkio_open_adapter_from_luid(struct dxgprocess *process,
94-
void *__user inargs)
93+
void *__user inargs)
9594
{
9695
struct d3dkmt_openadapterfromluid args;
9796
int ret;
@@ -1002,7 +1001,7 @@ dxgkio_create_hwqueue(struct dxgprocess *process, void *__user inargs)
10021001
}
10031002

10041003
static int dxgkio_destroy_hwqueue(struct dxgprocess *process,
1005-
void *__user inargs)
1004+
void *__user inargs)
10061005
{
10071006
struct d3dkmt_destroyhwqueue args;
10081007
int ret;
@@ -2280,7 +2279,8 @@ dxgkio_submit_command(struct dxgprocess *process, void *__user inargs)
22802279
}
22812280

22822281
static int
2283-
dxgkio_submit_command_to_hwqueue(struct dxgprocess *process, void *__user inargs)
2282+
dxgkio_submit_command_to_hwqueue(struct dxgprocess *process,
2283+
void *__user inargs)
22842284
{
22852285
int ret;
22862286
struct d3dkmt_submitcommandtohwqueue args;
@@ -5087,8 +5087,7 @@ open_resource(struct dxgprocess *process,
50875087
}
50885088

50895089
static int
5090-
dxgkio_open_resource_nt(struct dxgprocess *process,
5091-
void *__user inargs)
5090+
dxgkio_open_resource_nt(struct dxgprocess *process, void *__user inargs)
50925091
{
50935092
struct d3dkmt_openresourcefromnthandle args;
50945093
struct d3dkmt_openresourcefromnthandle *__user args_user = inargs;
@@ -5166,7 +5165,7 @@ static struct ioctl_desc ioctls[] = {
51665165
/* 0x14 */ {dxgkio_enum_adapters, LX_DXENUMADAPTERS2},
51675166
/* 0x15 */ {dxgkio_close_adapter, LX_DXCLOSEADAPTER},
51685167
/* 0x16 */ {dxgkio_change_vidmem_reservation,
5169-
LX_DXCHANGEVIDEOMEMORYRESERVATION},
5168+
LX_DXCHANGEVIDEOMEMORYRESERVATION},
51705169
/* 0x17 */ {},
51715170
/* 0x18 */ {dxgkio_create_hwqueue, LX_DXCREATEHWQUEUE},
51725171
/* 0x19 */ {dxgkio_destroy_device, LX_DXDESTROYDEVICE},
@@ -5205,7 +5204,7 @@ static struct ioctl_desc ioctls[] = {
52055204
LX_DXSIGNALSYNCHRONIZATIONOBJECTFROMGPU2},
52065205
/* 0x34 */ {dxgkio_submit_command_to_hwqueue, LX_DXSUBMITCOMMANDTOHWQUEUE},
52075206
/* 0x35 */ {dxgkio_submit_signal_to_hwqueue,
5208-
LX_DXSUBMITSIGNALSYNCOBJECTSTOHWQUEUE},
5207+
LX_DXSUBMITSIGNALSYNCOBJECTSTOHWQUEUE},
52095208
/* 0x36 */ {dxgkio_submit_wait_to_hwqueue,
52105209
LX_DXSUBMITWAITFORSYNCOBJECTSTOHWQUEUE},
52115210
/* 0x37 */ {dxgkio_unlock2, LX_DXUNLOCK2},

0 commit comments

Comments
 (0)