From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [bug report] IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters
Date: Wed, 22 Nov 2017 12:32:32 +0300 [thread overview]
Message-ID: <20171122093054.5ys5ur7chetnz7it@mwanda> (raw)
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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2017-11-22 9:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 9:32 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-25 8:42 [bug report] IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters Dan Carpenter
2017-10-25 8:59 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171122093054.5ys5ur7chetnz7it@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ralph.campbell-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox