Skip to contentSkip to conversation

MIPS: Lemote 2F: Add basic CS5536 VSM support

bug report Dan Carpenter 2 participants 2 messages Aug 24, 2017 MIPS

lore
Share & tools
lore
#0 lore raw

[ This code is 8 years old, so it's possible no one has this hardware
any more. -dan ]

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 (null)()
	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)

CS5536_USB_INTR is 11 so this condition can't possibly be true. I'm not sure what was intended.

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

regards,
dan carpenter

#1 lore raw

Hi,

Quoted 2 lines · Dan Carpenter

[ This code is 8 years old, so it's possible no one has this hardware
any more. -dan ]

I have a working Lemote 2F system running current mainline in active use.

A.