* Re: linux-next: Tree for Apr 23 (ax.25 sysctl)
[not found] <20120423170701.c96e402234b1387dece11dda@canb.auug.org.au>
@ 2012-04-23 16:25 ` Randy Dunlap
2012-04-24 0:16 ` Eric W. Biederman
` (2 more replies)
2012-04-23 16:38 ` linux-next: Tree for Apr 23 (phonet sysctl) Randy Dunlap
1 sibling, 3 replies; 10+ messages in thread
From: Randy Dunlap @ 2012-04-23 16:25 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, LKML, netdev, linux-hams, Ralf Baechle
On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20120420:
include/net/ax25.h:447:75: error: expected ';' before '}' token
static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
Is this from Eric B.'s sysctl patches?
First function: move ';' inside braces.
Second function: drop the ';'.
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Apr 23 (phonet sysctl)
[not found] <20120423170701.c96e402234b1387dece11dda@canb.auug.org.au>
2012-04-23 16:25 ` linux-next: Tree for Apr 23 (ax.25 sysctl) Randy Dunlap
@ 2012-04-23 16:38 ` Randy Dunlap
2012-04-23 22:13 ` [PATCH] net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel Eric W. Biederman
1 sibling, 1 reply; 10+ messages in thread
From: Randy Dunlap @ 2012-04-23 16:38 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linux-next, LKML, ebiederm, netdev
On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
> Hi all,
>
> Changes since 20120420:
ERROR: "unregister_net_sysctl_table" [net/phonet/phonet.ko] undefined!
ERROR: "register_net_sysctl" [net/phonet/phonet.ko] undefined!
when CONFIG_SYSCTL is not enabled.
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel.
2012-04-23 16:38 ` linux-next: Tree for Apr 23 (phonet sysctl) Randy Dunlap
@ 2012-04-23 22:13 ` Eric W. Biederman
2012-04-23 22:38 ` Randy Dunlap
0 siblings, 1 reply; 10+ messages in thread
From: Eric W. Biederman @ 2012-04-23 22:13 UTC (permalink / raw)
To: David Miller; +Cc: Stephen Rothwell, linux-next, LKML, netdev, Randy Dunlap
Randy Dunlap <rdunlap@xenotime.net> reported:
> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120420:
>
>
>
> ERROR: "unregister_net_sysctl_table" [net/phonet/phonet.ko] undefined!
> ERROR: "register_net_sysctl" [net/phonet/phonet.ko] undefined!
>
> when CONFIG_SYSCTL is not enabled.
Add static inline stub functions to gracefully handle the case when sysctl
support is not present.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
include/net/net_namespace.h | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 3ee4a3d..ac9195e 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -284,11 +284,20 @@ struct ctl_table_header;
#ifdef CONFIG_SYSCTL
extern int net_sysctl_init(void);
-#else
-static inline int net_sysctl_init(void) { return 0; }
-#endif
extern struct ctl_table_header *register_net_sysctl(struct net *net,
const char *path, struct ctl_table *table);
extern void unregister_net_sysctl_table(struct ctl_table_header *header);
+#else
+static inline int net_sysctl_init(void) { return 0; }
+static inline struct ctl_table_header *register_net_sysctl(struct net *net,
+ const char *path, struct ctl_table *table)
+{
+ return NULL;
+}
+static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
+{
+}
+#endif
+
#endif /* __NET_NET_NAMESPACE_H */
--
1.7.2.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel.
2012-04-23 22:13 ` [PATCH] net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel Eric W. Biederman
@ 2012-04-23 22:38 ` Randy Dunlap
2012-04-23 23:24 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Randy Dunlap @ 2012-04-23 22:38 UTC (permalink / raw)
To: Eric W. Biederman
Cc: David Miller, Stephen Rothwell, linux-next, LKML, netdev
On 04/23/2012 03:13 PM, Eric W. Biederman wrote:
>
> Randy Dunlap <rdunlap@xenotime.net> reported:
>> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>>
>>> Hi all,
>>>
>>> Changes since 20120420:
>>
>>
>>
>> ERROR: "unregister_net_sysctl_table" [net/phonet/phonet.ko] undefined!
>> ERROR: "register_net_sysctl" [net/phonet/phonet.ko] undefined!
>>
>> when CONFIG_SYSCTL is not enabled.
>
> Add static inline stub functions to gracefully handle the case when sysctl
> support is not present.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Yep, that works.
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
> ---
> include/net/net_namespace.h | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> index 3ee4a3d..ac9195e 100644
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -284,11 +284,20 @@ struct ctl_table_header;
>
> #ifdef CONFIG_SYSCTL
> extern int net_sysctl_init(void);
> -#else
> -static inline int net_sysctl_init(void) { return 0; }
> -#endif
> extern struct ctl_table_header *register_net_sysctl(struct net *net,
> const char *path, struct ctl_table *table);
> extern void unregister_net_sysctl_table(struct ctl_table_header *header);
> +#else
> +static inline int net_sysctl_init(void) { return 0; }
> +static inline struct ctl_table_header *register_net_sysctl(struct net *net,
> + const char *path, struct ctl_table *table)
> +{
> + return NULL;
> +}
> +static inline void unregister_net_sysctl_table(struct ctl_table_header *header)
> +{
> +}
> +#endif
> +
>
> #endif /* __NET_NET_NAMESPACE_H */
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel.
2012-04-23 22:38 ` Randy Dunlap
@ 2012-04-23 23:24 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2012-04-23 23:24 UTC (permalink / raw)
To: rdunlap; +Cc: ebiederm, sfr, linux-next, linux-kernel, netdev
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Mon, 23 Apr 2012 15:38:45 -0700
> On 04/23/2012 03:13 PM, Eric W. Biederman wrote:
>
>>
>> Randy Dunlap <rdunlap@xenotime.net> reported:
>>> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>>>
>>>> Hi all,
>>>>
>>>> Changes since 20120420:
>>>
>>>
>>>
>>> ERROR: "unregister_net_sysctl_table" [net/phonet/phonet.ko] undefined!
>>> ERROR: "register_net_sysctl" [net/phonet/phonet.ko] undefined!
>>>
>>> when CONFIG_SYSCTL is not enabled.
>>
>> Add static inline stub functions to gracefully handle the case when sysctl
>> support is not present.
>>
>> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
>
>
> Yep, that works.
>
> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: linux-next: Tree for Apr 23 (ax.25 sysctl)
2012-04-23 16:25 ` linux-next: Tree for Apr 23 (ax.25 sysctl) Randy Dunlap
@ 2012-04-24 0:16 ` Eric W. Biederman
2012-04-24 0:23 ` [PATCH] net ax25: Fix the build when sysctl support is disabled Eric W. Biederman
2012-04-24 0:25 ` Eric W. Biederman
2 siblings, 0 replies; 10+ messages in thread
From: Eric W. Biederman @ 2012-04-24 0:16 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, linux-next, LKML, netdev, linux-hams,
Ralf Baechle
Randy Dunlap <rdunlap@xenotime.net> writes:
> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120420:
>
>
>
> include/net/ax25.h:447:75: error: expected ';' before '}' token
>
>
> static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
> static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
>
> Is this from Eric B.'s sysctl patches?
Sort of. I made the function per device and return 0.
I missed the inner ';' when I made the change. The outer '};' has
been there for years and has been weird but harmless.
Patch to fix it in a moment.
Eric
> First function: move ';' inside braces.
> Second function: drop the ';'.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] net ax25: Fix the build when sysctl support is disabled.
2012-04-23 16:25 ` linux-next: Tree for Apr 23 (ax.25 sysctl) Randy Dunlap
2012-04-24 0:16 ` Eric W. Biederman
@ 2012-04-24 0:23 ` Eric W. Biederman
2012-04-24 0:25 ` Eric W. Biederman
2 siblings, 0 replies; 10+ messages in thread
From: Eric W. Biederman @ 2012-04-24 0:23 UTC (permalink / raw)
To: Randy Dunlap
Cc: Stephen Rothwell, linux-next, LKML, netdev, linux-hams,
Ralf Baechle
Randy Dunlap <rdunlap@xenotime.net> reported:
> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120420:
>
>
> include/net/ax25.h:447:75: error: expected ';' before '}' token
>
> static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
> static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
>
> First function: move ';' inside braces.
> Second function: drop the ';'.
Put the semicolons where it makes sense.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
include/net/ax25.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 8a7a122..5d23521 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -444,8 +444,8 @@ extern void ax25_uid_free(void);
extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev);
extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev);
#else
-static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
-static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
+static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; }
+static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {}
#endif /* CONFIG_SYSCTL */
#endif
--
1.7.2.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] net ax25: Fix the build when sysctl support is disabled.
2012-04-23 16:25 ` linux-next: Tree for Apr 23 (ax.25 sysctl) Randy Dunlap
2012-04-24 0:16 ` Eric W. Biederman
2012-04-24 0:23 ` [PATCH] net ax25: Fix the build when sysctl support is disabled Eric W. Biederman
@ 2012-04-24 0:25 ` Eric W. Biederman
2012-04-24 1:28 ` Randy Dunlap
2 siblings, 1 reply; 10+ messages in thread
From: Eric W. Biederman @ 2012-04-24 0:25 UTC (permalink / raw)
To: David Miller
Cc: Stephen Rothwell, linux-next, LKML, netdev, linux-hams,
Ralf Baechle, Randy Dunlap
Randy Dunlap <rdunlap@xenotime.net> reported:
> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120420:
>
>
> include/net/ax25.h:447:75: error: expected ';' before '}' token
>
> static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
> static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
>
> First function: move ';' inside braces.
> Second function: drop the ';'.
Put the semicolons where it makes sense.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
Resent to include David Miller.
include/net/ax25.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 8a7a122..5d23521 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -444,8 +444,8 @@ extern void ax25_uid_free(void);
extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev);
extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev);
#else
-static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
-static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
+static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; }
+static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {}
#endif /* CONFIG_SYSCTL */
#endif
--
1.7.2.5
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] net ax25: Fix the build when sysctl support is disabled.
2012-04-24 0:25 ` Eric W. Biederman
@ 2012-04-24 1:28 ` Randy Dunlap
2012-04-24 2:15 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Randy Dunlap @ 2012-04-24 1:28 UTC (permalink / raw)
To: Eric W. Biederman
Cc: David Miller, Stephen Rothwell, linux-next, LKML, netdev,
linux-hams, Ralf Baechle
On 04/23/2012 05:25 PM, Eric W. Biederman wrote:
>
> Randy Dunlap <rdunlap@xenotime.net> reported:
>
>> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>>
>>> Hi all,
>>>
>>> Changes since 20120420:
>>
>>
>> include/net/ax25.h:447:75: error: expected ';' before '}' token
>>
>> static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
>> static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
>>
>> First function: move ';' inside braces.
>> Second function: drop the ';'.
>
> Put the semicolons where it makes sense.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Thanks.
> ---
>
> Resent to include David Miller.
>
> include/net/ax25.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/net/ax25.h b/include/net/ax25.h
> index 8a7a122..5d23521 100644
> --- a/include/net/ax25.h
> +++ b/include/net/ax25.h
> @@ -444,8 +444,8 @@ extern void ax25_uid_free(void);
> extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev);
> extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev);
> #else
> -static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
> -static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
> +static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; }
> +static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {}
> #endif /* CONFIG_SYSCTL */
>
> #endif
--
~Randy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] net ax25: Fix the build when sysctl support is disabled.
2012-04-24 1:28 ` Randy Dunlap
@ 2012-04-24 2:15 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2012-04-24 2:15 UTC (permalink / raw)
To: rdunlap; +Cc: ebiederm, sfr, linux-next, linux-kernel, netdev, linux-hams, ralf
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Mon, 23 Apr 2012 18:28:45 -0700
> On 04/23/2012 05:25 PM, Eric W. Biederman wrote:
>
>>
>> Randy Dunlap <rdunlap@xenotime.net> reported:
>>
>>> On 04/23/2012 12:07 AM, Stephen Rothwell wrote:
>>>
>>>> Hi all,
>>>>
>>>> Changes since 20120420:
>>>
>>>
>>> include/net/ax25.h:447:75: error: expected ';' before '}' token
>>>
>>> static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0 };
>>> static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {};
>>>
>>> First function: move ';' inside braces.
>>> Second function: drop the ';'.
>>
>> Put the semicolons where it makes sense.
>>
>> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
>
>
> Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Applied, thanks guys.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-04-24 2:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20120423170701.c96e402234b1387dece11dda@canb.auug.org.au>
2012-04-23 16:25 ` linux-next: Tree for Apr 23 (ax.25 sysctl) Randy Dunlap
2012-04-24 0:16 ` Eric W. Biederman
2012-04-24 0:23 ` [PATCH] net ax25: Fix the build when sysctl support is disabled Eric W. Biederman
2012-04-24 0:25 ` Eric W. Biederman
2012-04-24 1:28 ` Randy Dunlap
2012-04-24 2:15 ` David Miller
2012-04-23 16:38 ` linux-next: Tree for Apr 23 (phonet sysctl) Randy Dunlap
2012-04-23 22:13 ` [PATCH] net sysctl: Add place holder functions for when sysctl support is compiled out of the kernel Eric W. Biederman
2012-04-23 22:38 ` Randy Dunlap
2012-04-23 23:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).