All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: 黄少波 <huangshaobo3@xiaomi.com>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Ahmed S. Darwish" <darwi@linutronix.de>,
	"Jason Gunthorpe" <jgg@ziepe.ca>,
	"Kevin Tian" <kevin.tian@intel.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	李高鹏 <chenwei29@xiaomi.com>, 梁伟鹏 <weipengliang@xiaomi.com>,
	翁金飞 <wengjinfei@xiaomi.com>, 熊亮 <xiongliang@xiaomi.com>
Subject: Re: Subject: [PATCH] pci/msi: remove redundant calculation in msi_setup_msi_desc
Date: Fri, 18 Aug 2023 11:30:54 +0300 (EEST)	[thread overview]
Message-ID: <cdbbe32-e255-8a94-5bd-412ecddf4b1d@linux.intel.com> (raw)
In-Reply-To: <3ebf5d8032ad418da4f24516cd23406e@xiaomi.com>

[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]

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@xiaomi.com>
> Signed-off-by: sparkhuang <huangshaobo3@xiaomi.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@linux.intel.com>

-- 
 i.

  reply	other threads:[~2023-08-18  8:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  7:26 Subject: [PATCH] pci/msi: remove redundant calculation in msi_setup_msi_desc 黄少波
2023-08-18  8:30 ` Ilpo Järvinen [this message]
2023-08-23 14:15 ` Thomas Gleixner
2023-08-24  7:27   ` huangshaobo3
2023-08-24  9:04     ` Thomas Gleixner
2023-08-24 10:52       ` sparkhuang

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=cdbbe32-e255-8a94-5bd-412ecddf4b1d@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=chenwei29@xiaomi.com \
    --cc=darwi@linutronix.de \
    --cc=huangshaobo3@xiaomi.com \
    --cc=jgg@ziepe.ca \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=weipengliang@xiaomi.com \
    --cc=wengjinfei@xiaomi.com \
    --cc=xiongliang@xiaomi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.