mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH]PCI: utilize calculated results when detecting MSI features
@ 2008-09-09 15:42 Jike Song
  2008-09-09 15:42 ` [PATCH] PCI: " Jike Song
  0 siblings, 1 reply; 3+ messages in thread
From: Jike Song @ 2008-09-09 15:42 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-pci, linux-kernel



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

* [PATCH] PCI: utilize calculated results when detecting MSI features
  2008-09-09 15:42 [PATCH]PCI: utilize calculated results when detecting MSI features Jike Song
@ 2008-09-09 15:42 ` Jike Song
  2008-09-23 18:12   ` Jesse Barnes
  0 siblings, 1 reply; 3+ messages in thread
From: Jike Song @ 2008-09-09 15:42 UTC (permalink / raw)
  To: jbarnes; +Cc: linux-pci, linux-kernel, Jike Song

in function msi_capability_init, we can make use of the calculated
results instead of calling is_mask_bit_support and is_64bit_address
twice, in spite of the fact that they are macros.

Signed-off-by: Jike Song <albcamus@gmail.com>
---
 drivers/pci/msi.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 4a10b56..d281201 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -378,23 +378,21 @@ static int msi_capability_init(struct pci_dev *dev)
 	entry->msi_attrib.masked = 1;
 	entry->msi_attrib.default_irq = dev->irq;	/* Save IOAPIC IRQ */
 	entry->msi_attrib.pos = pos;
-	if (is_mask_bit_support(control)) {
+	if (entry->msi_attrib.maskbit) {
 		entry->mask_base = (void __iomem *)(long)msi_mask_bits_reg(pos,
-				is_64bit_address(control));
+				entry->msi_attrib.is_64);
 	}
 	entry->dev = dev;
 	if (entry->msi_attrib.maskbit) {
 		unsigned int maskbits, temp;
 		/* All MSIs are unmasked by default, Mask them all */
 		pci_read_config_dword(dev,
-			msi_mask_bits_reg(pos, is_64bit_address(control)),
+			msi_mask_bits_reg(pos, entry->msi_attrib.is_64),
 			&maskbits);
 		temp = (1 << multi_msi_capable(control));
 		temp = ((temp - 1) & ~temp);
 		maskbits |= temp;
-		pci_write_config_dword(dev,
-			msi_mask_bits_reg(pos, is_64bit_address(control)),
-			maskbits);
+		pci_write_config_dword(dev, entry->msi_attrib.is_64, maskbits);
 		entry->msi_attrib.maskbits_mask = temp;
 	}
 	list_add_tail(&entry->list, &dev->msi_list);
-- 
1.5.6


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

* Re: [PATCH] PCI: utilize calculated results when detecting MSI features
  2008-09-09 15:42 ` [PATCH] PCI: " Jike Song
@ 2008-09-23 18:12   ` Jesse Barnes
  0 siblings, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2008-09-23 18:12 UTC (permalink / raw)
  To: Jike Song; +Cc: linux-pci, linux-kernel

On Tuesday, September 9, 2008 8:42 am Jike Song wrote:
> in function msi_capability_init, we can make use of the calculated
> results instead of calling is_mask_bit_support and is_64bit_address
> twice, in spite of the fact that they are macros.
>
> Signed-off-by: Jike Song <albcamus@gmail.com>

Applied to linux-next.  Thanks.

Jesse

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

end of thread, other threads:[~2008-09-23 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-09 15:42 [PATCH]PCI: utilize calculated results when detecting MSI features Jike Song
2008-09-09 15:42 ` [PATCH] PCI: " Jike Song
2008-09-23 18:12   ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome