net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c
Vladimir Oltean
maintainerPATCH 1/1 net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c
From: Vladimir Oltean <[email protected]>
Newer C compilers are complaining about the fact that there are no function prototypes in sja1105_vl.c for the non-static functions. Give them what they want.
--- drivers/net/dsa/sja1105/sja1105_vl.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/dsa/sja1105/sja1105_vl.c +1 -0
@@ -3,6 +3,7 @@*/ #include <net/tc_act/tc_gate.h> #include <linux/dsa/8021q.h> +#include "sja1105_vl.h" #include "sja1105.h" #define SJA1105_SIZE_VL_STATUS 8
Signature · 1 line
2.25.1
Quoted 7 lines · Vladimir Oltean
From: Vladimir Oltean <[email protected]>
Newer C compilers are complaining about the fact that there are no function prototypes in
sja1105_vl.cfor the non-static functions. Give them what they want.Signed-off-by Vladimir Oltean <[email protected]>
Signature · 1 line
Florian
David Miller
maintainerFrom: Vladimir Oltean <[email protected]>
Date: Sat, 30 May 2020 17:03:22 +0300
Quoted 7 lines
From: Vladimir Oltean <[email protected]>
Newer C compilers are complaining about the fact that there are no function prototypes in
sja1105_vl.cfor the non-static functions. Give them what they want.Signed-off-by Vladimir Oltean <[email protected]>
This actually breaks the build on current net-next:
In file included from drivers/net/dsa/sja1105/sja1105_vl.c:6:drivers/net/dsa/sja1105/sja1105_vl.h:11:11: warning: ‘struct sja1105_key’ declared inside parameter list will not be visible outside of this definition or declaration
11 | struct sja1105_key *key, unsigned long destports,
| ^~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:9:32: warning: ‘struct sja1105_private’ declared inside parameter list will not be visible outside of this definition or declaration
9 | int sja1105_vl_redirect(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:15:16: warning: ‘struct sja1105_rule’ declared inside parameter list will not be visible outside of this definition or declaration
15 | struct sja1105_rule *rule,
| ^~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:14:30: warning: ‘struct sja1105_private’ declared inside parameter list will not be visible outside of this definition or declaration
14 | int sja1105_vl_delete(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:20:14: warning: ‘struct sja1105_key’ declared inside parameter list will not be visible outside of this definition or declaration
20 | struct sja1105_key *key, u32 index, s32 prio,
| ^~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:18:28: warning: ‘struct sja1105_private’ declared inside parameter list will not be visible outside of this definition or declaration
18 | int sja1105_vl_gate(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:25:15: warning: ‘struct sja1105_rule’ declared inside parameter list will not be visible outside of this definition or declaration
25 | struct sja1105_rule *rule, struct flow_stats *stats,
| ^~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.h:24:29: warning: ‘struct sja1105_private’ declared inside parameter list will not be visible outside of this definition or declaration
24 | int sja1105_vl_stats(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.c:333:5: error: conflicting types for ‘sja1105_vl_redirect’
333 | int sja1105_vl_redirect(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~~~~~
In file included from drivers/net/dsa/sja1105/sja1105_vl.c:6:
drivers/net/dsa/sja1105/sja1105_vl.h:9:5: note: previous declaration of ‘sja1105_vl_redirect’ was here
9 | int sja1105_vl_redirect(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.c:381:5: error: conflicting types for ‘sja1105_vl_delete’
381 | int sja1105_vl_delete(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~~~
In file included from drivers/net/dsa/sja1105/sja1105_vl.c:6:
drivers/net/dsa/sja1105/sja1105_vl.h:14:5: note: previous declaration of ‘sja1105_vl_delete’ was here
14 | int sja1105_vl_delete(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.c:559:5: error: conflicting types for ‘sja1105_vl_gate’
559 | int sja1105_vl_gate(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~
In file included from drivers/net/dsa/sja1105/sja1105_vl.c:6:
drivers/net/dsa/sja1105/sja1105_vl.h:18:5: note: previous declaration of ‘sja1105_vl_gate’ was here
18 | int sja1105_vl_gate(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~
drivers/net/dsa/sja1105/sja1105_vl.c:743:5: error: conflicting types for ‘sja1105_vl_stats’
743 | int sja1105_vl_stats(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~~
In file included from drivers/net/dsa/sja1105/sja1105_vl.c:6:
drivers/net/dsa/sja1105/sja1105_vl.h:24:5: note: previous declaration of ‘sja1105_vl_stats’ was here
24 | int sja1105_vl_stats(struct sja1105_private *priv, int port,
| ^~~~~~~~~~~~~~~~