OSDN Git Service

appletalk: Fix compile regression
authorArnd Bergmann <arnd@arndb.de>
Wed, 6 Mar 2019 10:52:36 +0000 (11:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Mar 2019 18:46:29 +0000 (10:46 -0800)
commit27da0d2ef998e222a876c0cec72aa7829a626266
tree3d63a11e33750014e1704beb4ce46cf24a1dd1cd
parentf4b3ec4e6aa1a2ca437905a519ae08e8cf6af754
appletalk: Fix compile regression

A bugfix just broke compilation of appletalk when CONFIG_SYSCTL
is disabled:

In file included from net/appletalk/ddp.c:65:
net/appletalk/ddp.c: In function 'atalk_init':
include/linux/atalk.h:164:34: error: expected expression before 'do'
 #define atalk_register_sysctl()  do { } while(0)
                                  ^~
net/appletalk/ddp.c:1934:7: note: in expansion of macro 'atalk_register_sysctl'
  rc = atalk_register_sysctl();

This is easier to avoid by using conventional inline functions
as stubs rather than macros. The header already has inline
functions for other purposes, so I'm changing over all the
macros for consistency.

Fixes: 6377f787aeb9 ("appletalk: Fix use-after-free in atalk_proc_exit")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/atalk.h