linux-brain/arch/mips/loongson64/common/cs5536
Paul Burton bffe67b9fe MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads
[ Upstream commit cd87668d60 ]

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
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:36:38 +02:00
..
Makefile
cs5536_acc.c
cs5536_ehci.c
cs5536_ide.c
cs5536_isa.c
cs5536_mfgpt.c MIPS: loongson64/timer: Migrate to new 'set-state' interface 2015-09-03 12:07:53 +02:00
cs5536_ohci.c MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads 2018-09-26 08:36:38 +02:00
cs5536_pci.c