* [PATCH net-next] bridge: remove extern from function prototypes
@ 2013-12-26 6:19 Duan Jiong
2013-12-26 6:39 ` Duan Jiong
2013-12-26 11:26 ` Sergei Shtylyov
0 siblings, 2 replies; 3+ messages in thread
From: Duan Jiong @ 2013-12-26 6:19 UTC (permalink / raw)
To: David Miller; +Cc: netdev
There are a mix of function prototypes with and without extern
in the kernel sources. Standardize on not using extern for
function prototypes.
Function prototypes don't need to be written with extern.
extern is assumed by the compiler. Its use is as unnecessary as
using auto to declare automatic/local variables in a block.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
---
net/bridge/br_private.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 2e77d92..458889e 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -762,7 +762,7 @@ unsigned long br_timer_value(const struct timer_list *timer);
/* br.c */
#if IS_ENABLED(CONFIG_ATM_LANE)
-extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
+int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
#endif
/* br_netlink.c */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] bridge: remove extern from function prototypes
2013-12-26 6:19 [PATCH net-next] bridge: remove extern from function prototypes Duan Jiong
@ 2013-12-26 6:39 ` Duan Jiong
2013-12-26 11:26 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Duan Jiong @ 2013-12-26 6:39 UTC (permalink / raw)
To: David Miller; +Cc: netdev
I'm so sorry, there is something wrong with it,
please just ignore this patch!
于 2013年12月26日 14:19, Duan Jiong 写道:
>
> There are a mix of function prototypes with and without extern
> in the kernel sources. Standardize on not using extern for
> function prototypes.
>
> Function prototypes don't need to be written with extern.
> extern is assumed by the compiler. Its use is as unnecessary as
> using auto to declare automatic/local variables in a block.
>
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
> ---
> net/bridge/br_private.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> index 2e77d92..458889e 100644
> --- a/net/bridge/br_private.h
> +++ b/net/bridge/br_private.h
> @@ -762,7 +762,7 @@ unsigned long br_timer_value(const struct timer_list *timer);
>
> /* br.c */
> #if IS_ENABLED(CONFIG_ATM_LANE)
> -extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
> +int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
> #endif
>
> /* br_netlink.c */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] bridge: remove extern from function prototypes
2013-12-26 6:19 [PATCH net-next] bridge: remove extern from function prototypes Duan Jiong
2013-12-26 6:39 ` Duan Jiong
@ 2013-12-26 11:26 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-12-26 11:26 UTC (permalink / raw)
To: Duan Jiong, David Miller; +Cc: netdev
Hello.
On 26-12-2013 10:19, Duan Jiong wrote:
> There are a mix of function prototypes with and without extern
> in the kernel sources. Standardize on not using extern for
> function prototypes.
> Function prototypes don't need to be written with extern.
> extern is assumed by the compiler. Its use is as unnecessary as
> using auto to declare automatic/local variables in a block.
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
> ---
> net/bridge/br_private.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
> index 2e77d92..458889e 100644
> --- a/net/bridge/br_private.h
> +++ b/net/bridge/br_private.h
> @@ -762,7 +762,7 @@ unsigned long br_timer_value(const struct timer_list *timer);
>
> /* br.c */
> #if IS_ENABLED(CONFIG_ATM_LANE)
> -extern int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
> +int (*br_fdb_test_addr_hook)(struct net_device *dev, unsigned char *addr);
This is not a function prototype, this is a pointer to function, so
removing *extern* is not right.
> #endif
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-26 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-26 6:19 [PATCH net-next] bridge: remove extern from function prototypes Duan Jiong
2013-12-26 6:39 ` Duan Jiong
2013-12-26 11:26 ` Sergei Shtylyov
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).