lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cdbbe32-e255-8a94-5bd-412ecddf4b1d@linux.intel.com>
Date:   Fri, 18 Aug 2023 11:30:54 +0300 (EEST)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     黄少波 <huangshaobo3@...omi.com>
cc:     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>,
        李高鹏 <chenwei29@...omi.com>,
        梁伟鹏 <weipengliang@...omi.com>,
        翁金飞 <wengjinfei@...omi.com>,
        熊亮 <xiongliang@...omi.com>
Subject: Re: Subject: [PATCH] pci/msi: remove redundant calculation in
 msi_setup_msi_desc

On Fri, 18 Aug 2023, 黄少波 wrote:

You should add () to the function name in the subject and use capital 
PCI/MSI.

> 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

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ