linux_dsm_epyc7002/drivers/net/ethernet/renesas
Jesse Brandeburg 2602ddfe19 drivers/net/ethernet: handle one warning explicitly
While fixing the W=1 builds, this warning came up because the
developers used a very tricky way to get structures initialized
to a non-zero value, but this causes GCC to warn about an
override. In this case the override was intentional, so just
disable the warning for this code with a kernel macro that results
in disabling the warning for compiles on GCC versions after 8.

It is not appropriate to change the struct to initialize all the
values as it will just add a lot more code for no value. The code
is completely correct as is, we just want to acknowledge that
this code could generate a warning and we're ok with that.

NOTE: the __diag_ignore macro currently only accepts a second
argument of 8 (version 80000), it's either use this one or
open code the pragma.

Fixed Warnings example (all the same):
drivers/net/ethernet/renesas/sh_eth.c:51:12: warning: initialized field overwritten [-Woverride-init]
drivers/net/ethernet/renesas/sh_eth.c:52:12: warning: initialized field overwritten [-Woverride-init]
drivers/net/ethernet/renesas/sh_eth.c:53:13: warning: initialized field overwritten [-Woverride-init]
+ 256 more...

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-25 16:29:00 -07:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ethernet: renesas: convert to SPDX identifiers 2018-09-10 10:11:53 -07:00
ravb_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-04 21:28:59 -07:00
ravb_ptp.c ptp: Introduce strict checking of external time stamp options. 2019-11-15 12:48:32 -08:00
ravb.h ravb: implement MTU change while device is up 2019-11-14 18:05:25 -08:00
sh_eth.c drivers/net/ethernet: handle one warning explicitly 2020-09-25 16:29:00 -07:00
sh_eth.h sh_eth: use Gigabit register map for R7S72100 2020-02-16 19:44:41 -08:00