linux/arch/mips/loongson64
Paul Burton cd87668d60
MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads
The PCI_OHCI_INT_REG case in pci_ohci_read_reg() contains the following
if statement:

  if ((lo & 0x00000f00) == CS5536_USB_INTR)

CS5536_USB_INTR expands to the constant 11, which gives us the following
condition which can never evaluate true:

  if ((lo & 0xf00) == 11)

At least when using GCC 8.1.0 this falls foul of the tautoligcal-compare
warning, and since the code is built with the -Werror flag the build
fails.

Fix this by shifting lo right by 8 bits in order to match the
corresponding PCI_OHCI_INT_REG case in pci_ohci_write_reg().

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/19861/
Cc: Huacai Chen <chenhc@lemote.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
2018-07-17 10:32:08 -07:00
..
common MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads 2018-07-17 10:32:08 -07:00
fuloong-2e MIPS, CPUFREQ: Fix spelling of Institute. 2015-07-07 20:59:42 +02:00
lemote-2f MIPS: Loongson 2F: allow NULL clock for clk_get_rate 2017-09-06 12:36:59 +02:00
loongson-3 MIPS: loongson: untangle dma implementations 2018-06-24 09:26:04 -07:00
Kconfig MIPS: loongson64: use generic dma noncoherent ops 2018-06-24 09:27:27 -07:00
Makefile MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
Platform MIPS: Loongson-3: Fix build error after ld-version.sh modification 2016-05-09 12:00:03 +02:00