Skip to contentSkip to conversation

sysctl.c: Change a .proc_handler = proc_dointvec to

PATCH Alexey Dobriyan 2 participants 3 messages Nov 15, 2009 – Nov 17, 2009

lore
Share & tools
lore

Alexey Dobriyan

author NAK
#0 lore raw

Review

Quoted 2 lines
(quoted diff) +1 -1
-		.proc_handler	= proc_dointvec
+		.proc_handler	= &proc_dointvec,

NAK.

commit 6d9f239a1edb31d6133230f478fd1dc2da338ec5

Author: Alexey Dobriyan <[email protected]>
Date:   Mon Nov 3 18:21:05 2008 -0800

net: '&' redux

I want to compile out proc_* and sysctl_* handlers totally and stub them to NULL depending on config options, however usage of & will prevent this, since taking adress of NULL pointer will break compilation.

So, drop & in front of every ->proc_handler and every ->strategy handler, it was never needed in fact.

#1 lore raw
Quoted 9 lines · Alexey Dobriyan

Review

Quoted 2 lines
(quoted diff) +1 -1
-		.proc_handler	= proc_dointvec
+		.proc_handler	= &proc_dointvec,

NAK.

commit 6d9f239a1edb31d6133230f478fd1dc2da338ec5

Author: Alexey Dobriyan <[email protected]>
Date:   Mon Nov 3 18:21:05 2008 -0800
Quoted 6 lines

net: '&' redux

I want to compile out proc_* and sysctl_* handlers totally and stub them to NULL depending on config options, however usage of & will prevent this, since taking adress of NULL pointer will break compilation.

I just experimented with this and found that at present a number of the proc handlers wrap functions like proc_dointvec, so it does not work.

Did you have a plan for those?

Eric

#2 lore raw
Quoted 9 lines · Eric W. Biederman
Quoted 6 lines · Alexey Dobriyan

net: '&' redux

I want to compile out proc_* and sysctl_* handlers totally and stub them to NULL depending on config options, however usage of & will prevent this, since taking adress of NULL pointer will break compilation.

Quoted 4 lines

I just experimented with this and found that at present a number of the proc handlers wrap functions like proc_dointvec, so it does not work.

Did you have a plan for those?

Of course, net/ was just first big step.