Re: [PATCH 3/4 v2] watchdog: disable watchdog when thresh is zero

From: Ingo Molnar
Date: Wed May 18 2011 - 04:36:11 EST

* Mandeep Singh Baines <msb@xxxxxxxxxxxx> wrote:

> +extern int watchdog_thresh;
> struct ctl_table;
> -extern int proc_dowatchdog_enabled(struct ctl_table *, int ,
> - void __user *, size_t *, loff_t *);
> +extern int __proc_dowatchdog(struct ctl_table *, int ,
> + void __user *, size_t *, loff_t *);
> +#define proc_dowatchdog_enabled __proc_dowatchdog
> +#define proc_dowatchdog_thresh __proc_dowatchdog

i like the other aspects of your patch but this one is a no-no, we do not use
1970's tech to obfuscate nice C code! :-)

If the argument list is annoying then introduce a helper structure. But having
it longer is no big issue either. Try to shorten the function names if

Sidenote, the sysctl code has been misdesigned a bit: it should be possible to
add sysctls in .c files and not centralize it all into kernel/sysctl.c
forcibly: we could should have a central static array by using a .sysctl_data
section or such. Anyone wanna fix/improve that?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at