Skip to content

Commit

Permalink
eth: sun: cassini: remove dead code
Browse files Browse the repository at this point in the history
commit 32329216ca1d6ee29c41215f18b3053bb6158541 upstream.

Fixes the following GCC warning:

drivers/net/ethernet/sun/cassini.c:1316:29: error: comparison between two arrays [-Werror=array-compare]
drivers/net/ethernet/sun/cassini.c:3783:34: error: comparison between two arrays [-Werror=array-compare]

Note that 2 arrays should be compared by comparing of their addresses:
note: use ‘&cas_prog_workaroundtab[0] == &cas_prog_null[0]’ to compare the addresses

Signed-off-by: Martin Liska <mliska@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
marxin authored and RT1648 committed Feb 6, 2024
1 parent 2776b31 commit 51f3e2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/sun/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ static void cas_init_rx_dma(struct cas *cp)
writel(val, cp->regs + REG_RX_PAGE_SIZE);

/* enable the header parser if desired */
if (CAS_HP_FIRMWARE == cas_prog_null)
if (&CAS_HP_FIRMWARE[0] == &cas_prog_null[0])
return;

val = CAS_BASE(HP_CFG_NUM_CPU, CAS_NCPUS > 63 ? 0 : CAS_NCPUS);
Expand Down Expand Up @@ -3819,7 +3819,7 @@ static void cas_reset(struct cas *cp, int blkflag)

/* program header parser */
if ((cp->cas_flags & CAS_FLAG_TARGET_ABORT) ||
(CAS_HP_ALT_FIRMWARE == cas_prog_null)) {
(&CAS_HP_ALT_FIRMWARE[0] == &cas_prog_null[0])) {
cas_load_firmware(cp, CAS_HP_FIRMWARE);
} else {
cas_load_firmware(cp, CAS_HP_ALT_FIRMWARE);
Expand Down

0 comments on commit 51f3e2a

Please sign in to comment.