Patchwork net ax25: Fix the build when sysctl support is disabled.

login
register
mail settings
Submitter Eric W. Biederman
Date April 24, 2012, 12:25 a.m.
Message ID <m1obqirn5e.fsf_-_@fess.ebiederm.org>
Download mbox | patch
Permalink /patch/154560/
State Accepted
Delegated to: David Miller
Headers show

Comments

Eric W. Biederman - April 24, 2012, 12:25 a.m.
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(-)
Randy.Dunlap - April 24, 2012, 1:28 a.m.
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
David Miller - April 24, 2012, 2:15 a.m.
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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