aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa/sja1105/sja1105_ethtool.c
AgeCommit message (Collapse)AuthorFilesLines
2020-05-10dsa: sja1105: fix semicolon.cocci warningskbuild test robot1-1/+1
drivers/net/dsa/sja1105/sja1105_ethtool.c:481:11-12: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: ae1804de93f6 ("dsa: sja1105: dynamically allocate stats structure") CC: Arnd Bergmann <[email protected]> Signed-off-by: kbuild test robot <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2020-05-06dsa: sja1105: dynamically allocate stats structureArnd Bergmann1-70/+74
The addition of sja1105_port_status_ether structure into the statistics causes the frame size to go over the warning limit: drivers/net/dsa/sja1105/sja1105_ethtool.c:421:6: error: stack frame size of 1104 bytes in function 'sja1105_get_ethtool_stats' [-Werror,-Wframe-larger-than=] Use dynamic allocation to avoid this. Fixes: 336aa67bd027 ("net: dsa: sja1105: show more ethtool statistics counters for P/Q/R/S") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2020-03-29net: dsa: sja1105: show more ethtool statistics counters for P/Q/R/SVladimir Oltean1-1/+132
It looks like the P/Q/R/S series supports some more counters, generically named "Ethernet statistics counter", which we were not printing. Add them. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-10-02net: dsa: sja1105: Rename sja1105_spi_send_packed_buf to sja1105_xfer_bufVladimir Oltean1-8/+8
The most commonly called function in the driver is long due for a rename. The "packed" word is redundant (it doesn't make sense to transfer an unpacked structure, since that is in CPU endianness yadda yadda), and the "spi" word is also redundant since argument 2 of the function is SPI_READ or SPI_WRITE. As for the sja1105_spi_send_long_packed_buf function, it is only being used from sja1105_spi.c, so remove its global prototype. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-07net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_statsNathan Chancellor1-1/+3
Clang warns: drivers/net/dsa/sja1105/sja1105_ethtool.c:316:39: warning: suggest braces around initialization of subobject [-Wmissing-braces] struct sja1105_port_status status = {0}; ^ {} 1 warning generated. One way to fix these warnings is to add additional braces like Clang suggests; however, there has been a bit of push back from some maintainers[1][2], who just prefer memset as it is unambiguous, doesn't depend on a particular compiler version[3], and properly initializes all subobjects. Do that here so there are no more warnings. [1]: https://lore.kernel.org/lkml/[email protected]/ [2]: https://lore.kernel.org/lkml/[email protected]/ [3]: https://lore.kernel.org/lkml/[email protected]/ Fixes: 52c34e6e125c ("net: dsa: sja1105: Add support for ethtool port counters") Link: https://github.com/ClangBuiltLinux/linux/issues/471 Signed-off-by: Nathan Chancellor <[email protected]> Acked-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-03net: dsa: sja1105: Add support for ethtool port countersVladimir Oltean1-0/+417
Signed-off-by: Vladimir Oltean <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>