[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53E183A7.80905@huawei.com>
Date: Wed, 6 Aug 2014 09:23:51 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: Stuart Yoder <b08248@...il.com>
CC: <linux-kernel@...r.kernel.org>, Xinwei Hu <huxinwei@...wei.com>,
Wuyun <wuyun.wu@...wei.com>, Bjorn Helgaas <bhelgaas@...gle.com>,
<linux-pci@...r.kernel.org>, <Paul.Mundt@...wei.com>,
"James E.J. Bottomley" <jejb@...isc-linux.org>,
Marc Zyngier <marc.zyngier@....com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Russell King <linux@....linux.org.uk>,
<linux-arch@...r.kernel.org>, <arnab.basu@...escale.com>,
<virtualization@...ts.linux-foundation.org>,
Hanjun Guo <guohanjun@...wei.com>
Subject: Re: [RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()
On 2014/8/6 6:35, Stuart Yoder wrote:
> On Fri, Jul 25, 2014 at 10:08 PM, Yijing Wang <wangyijing@...wei.com> wrote:
>> Pci_dev_msi_enabled() is used to check whether device
>> MSI/MSIX enabled. Refactor this function to suuport
>> checking only device MSI or MSIX enabled.
>>
>> Signed-off-by: Yijing Wang <wangyijing@...wei.com>
>
> So this patch refactors things so that checks like this:
> > - if (!dev->msi_enabled)
>
> are moved into a function:
> > + if (!pci_dev_msi_enabled(dev, MSI_TYPE))
>
> Can you explain a bit more why this needed. Is it just cleanup?
Hi Stuart, it's not just cleanup, because "[RFC PATCH 08/11] PCI/MSI: Introduce new struct msi_irqs and struct msi_ops"
introduced struct msi_irqs, so the code will change to
if (!dev->msi_irqs->msi_enabled)
I think driver should not need to know the details of MSI members.
So I try to rework the pci_dev_msi_enabled() to hide the detailed MSI info.
Thanks!
Yijing.
>
> .
>
--
Thanks!
Yijing
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists