[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ebf5d8032ad418da4f24516cd23406e@xiaomi.com>
Date: Fri, 18 Aug 2023 07:26:38 +0000
From: 黄少波 <huangshaobo3@...omi.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Ahmed S. Darwish" <darwi@...utronix.de>,
Jason Gunthorpe <jgg@...pe.ca>,
Kevin Tian <kevin.tian@...el.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: 李高鹏 <chenwei29@...omi.com>,
梁伟鹏 <weipengliang@...omi.com>,
翁金飞 <wengjinfei@...omi.com>,
熊亮 <xiongliang@...omi.com>
Subject: Subject: [PATCH] pci/msi: remove redundant calculation in
msi_setup_msi_desc
Whether to support 64-bit address status has been calculated before,
and the calculation result can be used directly afterwards, so use
msi_attrib.is_64 to avoid double calculation.
Suggested-by: weipengliang <weipengliang@...omi.com>
Signed-off-by: sparkhuang <huangshaobo3@...omi.com>
---
drivers/pci/msi/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index ef1d885..304e889 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -303,7 +303,7 @@ static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
desc.pci.msi_attrib.multiple = ilog2(__roundup_pow_of_two(nvec));
desc.affinity = masks;
- if (control & PCI_MSI_FLAGS_64BIT)
+ if (desc.pci.msi_attrib.is_64)
desc.pci.mask_pos = dev->msi_cap + PCI_MSI_MASK_64;
else
desc.pci.mask_pos = dev->msi_cap + PCI_MSI_MASK_32;
--
2.7.4
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
Powered by blists - more mailing lists