All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] MIPS: Lemote 2F: Add basic CS5536 VSM support
@ 2016-07-15 20:03 Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-07-15 20:03 UTC (permalink / raw)
  To: wuzhangjin; +Cc: linux-mips

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bug report] MIPS: Lemote 2F: Add basic CS5536 VSM support
  2017-08-24 19:10 Dan Carpenter
@ 2017-08-24 22:04 ` Aaro Koskinen
  0 siblings, 0 replies; 3+ messages in thread
From: Aaro Koskinen @ 2017-08-24 22:04 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: wuzhangjin, linux-mips

Hi,

On Thu, Aug 24, 2017 at 10:10:00PM +0300, Dan Carpenter wrote:
> [ 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug report] MIPS: Lemote 2F: Add basic CS5536 VSM support
@ 2017-08-24 19:10 Dan Carpenter
  2017-08-24 22:04 ` Aaro Koskinen
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2017-08-24 19:10 UTC (permalink / raw)
  To: wuzhangjin; +Cc: linux-mips

[ 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-24 22:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15 20:03 [bug report] MIPS: Lemote 2F: Add basic CS5536 VSM support Dan Carpenter
2017-08-24 19:10 Dan Carpenter
2017-08-24 22:04 ` Aaro Koskinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.