]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: remove empty structures from config table ops
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 20 Jun 2020 17:18:30 +0000 (20:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jun 2020 23:01:28 +0000 (16:01 -0700)
commitaf572cea838339c5376d6ff0aea9894a978d1dca
tree111066cd977fcd2558a010f04221503ea9b1dd49
parent1b0a4b9fd9f21382e956892c02e16302ba1181e4
net: dsa: sja1105: remove empty structures from config table ops

Sparse is complaining and giving the following warning message:
'Using plain integer as NULL pointer'.

This is not what's going on, instead {0} is used as a zero initializer
for the structure members, to indicate that the particular chip revision
does not support those particular config tables.

But since the config tables are declared globally, the unpopulated
elements are zero-initialized anyway. So, to make sparse shut up, let's
remove the zero initializers.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_dynamic_config.c
drivers/net/dsa/sja1105/sja1105_static_config.c