OSDN Git Service

net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 30 May 2020 10:29:52 +0000 (13:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 May 2020 01:00:36 +0000 (18:00 -0700)
commit53bd63afbd659017d20dfb7ac3a53ceb8cbb338a
tree77c4c2992acaba4848da72bf915f250cd8a7ed01
parent4300c7e7fe152be96b41b2135e3ace9a1e8db308
net: dsa: sja1105: suppress -Wmissing-prototypes in sja1105_static_config.c

Newer compilers complain with W=1 builds that there are non-static
functions defined in sja1105_static_config.c that don't have a
prototype, because their prototype is defined in sja1105.h which this
translation unit does not include.

I don't entirely understand what is the point of these warnings, since
in principle there's nothing wrong with that. But let's move the
prototypes to a header file that _is_ included by
sja1105_static_config.c, since that will make these warnings go away.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105.h
drivers/net/dsa/sja1105/sja1105_static_config.h