All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c
@ 2020-05-30 14:03 Vladimir Oltean
  2020-05-30 18:40 ` Florian Fainelli
  2020-05-31  1:10 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2020-05-30 14:03 UTC (permalink / raw)
  To: andrew, f.fainelli, vivien.didelot, davem; +Cc: netdev

From: Vladimir Oltean <vladimir.oltean@nxp.com>

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.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/sja1105/sja1105_vl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c b/drivers/net/dsa/sja1105/sja1105_vl.c
index f37611885376..41ef95e750aa 100644
--- a/drivers/net/dsa/sja1105/sja1105_vl.c
+++ b/drivers/net/dsa/sja1105/sja1105_vl.c
@@ -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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c
  2020-05-30 14:03 [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c Vladimir Oltean
@ 2020-05-30 18:40 ` Florian Fainelli
  2020-05-31  1:10 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-05-30 18:40 UTC (permalink / raw)
  To: Vladimir Oltean, andrew, vivien.didelot, davem; +Cc: netdev



On 5/30/2020 7:03 AM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> 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.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c
  2020-05-30 14:03 [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c Vladimir Oltean
  2020-05-30 18:40 ` Florian Fainelli
@ 2020-05-31  1:10 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-05-31  1:10 UTC (permalink / raw)
  To: olteanv; +Cc: andrew, f.fainelli, vivien.didelot, netdev

From: Vladimir Oltean <olteanv@gmail.com>
Date: Sat, 30 May 2020 17:03:22 +0300

> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> 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.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

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,
      |     ^~~~~~~~~~~~~~~~

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-31  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 14:03 [PATCH net-next] net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_vl.c Vladimir Oltean
2020-05-30 18:40 ` Florian Fainelli
2020-05-31  1:10 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.