[bug report] IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ralph Campbell,

The patch f931551bafe1: "IB/qib: Add new qib driver for QLogic PCIe
InfiniBand adapters" from May 23, 2010, leads to the following static
checker warning:

	drivers/infiniband/hw/qib/qib_iba7322.c:5700 gpio_7322_mod()
	warn: was expecting a 64 bit value instead of '~mask'

drivers/infiniband/hw/qib/qib_iba7322.c
  5688  static int gpio_7322_mod(struct qib_devdata *dd, u32 out, u32 dir, u32 mask)
  5689  {
  5690          u64 read_val, new_out;
  5691          unsigned long flags;
  5692  
  5693          if (mask) {
  5694                  /* some bits being written, lock access to GPIO */
  5695                  dir &= mask;
  5696                  out &= mask;
  5697                  spin_lock_irqsave(&dd->cspec->gpio_lock, flags);
  5698                  dd->cspec->extctrl &= ~((u64)mask << SYM_LSB(EXTCtrl, GPIOOe));
  5699                  dd->cspec->extctrl |= ((u64) dir << SYM_LSB(EXTCtrl, GPIOOe));
  5700                  new_out = (dd->cspec->gpio_out & ~mask) | out;
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We never use the high 32 bits of ->gpio_out so it could probably be
declared as a u32 the same as "out".

  5701  
  5702                  qib_write_kreg(dd, kr_extctrl, dd->cspec->extctrl);
  5703                  qib_write_kreg(dd, kr_gpio_out, new_out);
  5704                  dd->cspec->gpio_out = new_out;
  5705                  spin_unlock_irqrestore(&dd->cspec->gpio_lock, flags);
  5706          }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux