From: "Jan Beulich" <jbeulich@novell.com>
To: <linux-pci@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] fix multi_msi_enable()
Date: Tue, 11 Nov 2008 10:47:06 +0000 [thread overview]
Message-ID: <491970BA.76E4.0078.0@novell.com> (raw)
And isn't multi_msi_enable(), though unused (since msi_{en,dis}able() are
unused), broken altogether (shifting num right by 1 instead of taking the
binary log)?
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
drivers/pci/msi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.28-rc4/drivers/pci/msi.h 2007-02-04 19:44:54.000000000 +0100
+++ 2.6.28-rc4-pci-multi-msi-enable/drivers/pci/msi.h 2008-11-07 09:13:09.000000000 +0100
@@ -23,7 +23,7 @@
#define multi_msi_capable(control) \
(1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1))
#define multi_msi_enable(control, num) \
- control |= (((num >> 1) << 4) & PCI_MSI_FLAGS_QSIZE);
+ control |= ((fls((num) - 1) << 4) & PCI_MSI_FLAGS_QSIZE)
#define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))
#define is_mask_bit_support(control) (!!(control & PCI_MSI_FLAGS_MASKBIT))
#define msi_enable(control, num) multi_msi_enable(control, num); \
reply other threads:[~2008-11-11 10:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=491970BA.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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