1
0
Fork 0
alistair23-linux/arch/mips/include/asm/netlogic/xlr
Paul Burton 02eec6c9fc
MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()
In nlm_fmn_send() we have a loop which attempts to send a message
multiple times in order to handle the transient failure condition of a
lack of available credit. When examining the status register to detect
the failure we check for a condition that can never be true, which falls
foul of gcc 8's -Wtautological-compare:

  In file included from arch/mips/netlogic/common/irq.c:65:
  ./arch/mips/include/asm/netlogic/xlr/fmn.h: In function 'nlm_fmn_send':
  ./arch/mips/include/asm/netlogic/xlr/fmn.h:304:22: error: bitwise
    comparison always evaluates to false [-Werror=tautological-compare]
     if ((status & 0x2) == 1)
                        ^~

If the path taken if this condition were true all we do is print a
message to the kernel console. Since failures seem somewhat expected
here (making the console message questionable anyway) and the condition
has clearly never evaluated true we simply remove it, rather than
attempting to fix it to check status correctly.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20174/
Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Jayachandran C <jnair@caviumnetworks.com>
Cc: John Crispin <john@phrozen.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
2018-08-08 09:48:32 -07:00
..
bridge.h MIPS: Netlogic: Platform NAND/NOR flash support 2012-07-24 17:28:54 +02:00
flash.h MIPS: Netlogic: Platform NAND/NOR flash support 2012-07-24 17:28:54 +02:00
fmn.h MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send() 2018-08-08 09:48:32 -07:00
gpio.h MIPS: Netlogic: Remove NETLOGIC_ prefix 2012-07-24 17:28:53 +02:00
iomap.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
msidef.h MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
pic.h MIPS: Netlogic: XLP2XX CPU and PIC frequency 2013-09-03 23:22:19 +02:00
xlr.h MIPS: Netlogic: Remove XLR early serial setup 2014-01-24 22:39:50 +01:00