Skip to contentSkip to conversation

MIPS: Lemote 2F: Add basic CS5536 VSM support

bug report Dan Carpenter 1 participant 1 message Jul 15, 2016 MIPS

lore
Share & tools
lore
#0 lore raw

Hello Wu Zhangjin,

The patch 22c21003a91b: "MIPS: Lemote 2F: Add basic CS5536 VSM support" from Nov 10, 2009, leads to the following static checker warning:

	arch/mips/loongson64/common/cs5536/cs5536_ohci.c:141 pci_ohci_read_reg()
	warn: masked condition '(lo & 3840) == 11' is always false.

arch/mips/loongson64/common/cs5536/cs5536_ohci.c
135 case PCI_INTERRUPT_LINE:
136 conf_data =
137 CFG_PCI_INTERRUPT_LINE(PCI_DEFAULT_PIN, CS5536_USB_INTR);
138 break;
139 case PCI_OHCI_INT_REG:
140 _rdmsr(DIVIL_MSR_REG(PIC_YSEL_LOW), &hi, &lo);
141 if ((lo & 0x00000f00) == CS5536_USB_INTR)

                                                 ^^^^^^^^^^^^^^^

This is 11 so the condition can't be true. I don't know what was intended.

   142                          conf_data = 1;
   143                  break;
   144          default:
   145                  break;
   146          }

regards,
dan carpenter