2022-08-22 06:32:54

by Dong Chuanjian

[permalink] [raw]
Subject: [PATCH] kernel/sysctl.c: remove unnecessary (void*) conversions

remove unnecessary void* type casting

Signed-off-by: Dong Chuanjian <[email protected]>

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 205d605cacc5..324e6bbbeb34 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1052,9 +1052,9 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table,
return 0;
}

- i = (unsigned long *) data;
- min = (unsigned long *) table->extra1;
- max = (unsigned long *) table->extra2;
+ i = data;
+ min = table->extra1;
+ max = table->extra2;
vleft = table->maxlen / sizeof(unsigned long);
left = *lenp;

--
2.18.2


2022-09-09 00:01:22

by Luis Chamberlain

[permalink] [raw]
Subject: Re: [PATCH] kernel/sysctl.c: remove unnecessary (void*) conversions

On Mon, Aug 22, 2022 at 02:30:49PM +0800, Dong Chuanjian wrote:
> remove unnecessary void* type casting
>
> Signed-off-by: Dong Chuanjian <[email protected]>

Thanks, queued up to sysctl-testing.

Luis