Re: [PATCH v5 1/2] PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup
From: Frank Li
Date: Wed Oct 14 2026 - 22:06:05 EST
On Thu, Oct 15, 2026 at 10:44:01AM +0900, Koichiro Den wrote:
> Use a local epf pointer in epf_ntb_configure_interrupt() to shorten the
> repeated ntb->epf accesses.
>
> No functional changes.
>
> Signed-off-by: Koichiro Den <den@xxxxxxxxxxxxx>
> ---
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
> Changes since v4:
> - New patch. (Frank)
>
> drivers/pci/endpoint/functions/pci-epf-vntb.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/endpoint/functions/pci-epf-vntb.c b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> index a11f9260ee86..d74402ea10bf 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-vntb.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-vntb.c
> @@ -545,12 +545,14 @@ static int epf_ntb_config_spad_bar_alloc(struct epf_ntb *ntb)
> static int epf_ntb_configure_interrupt(struct epf_ntb *ntb)
> {
> const struct pci_epc_features *epc_features;
> + struct pci_epf *epf = ntb->epf;
> struct device *dev;
> int ret;
>
> - dev = &ntb->epf->dev;
> + dev = &epf->dev;
>
> - epc_features = pci_epc_get_features(ntb->epf->epc, ntb->epf->func_no, ntb->epf->vfunc_no);
> + epc_features = pci_epc_get_features(epf->epc, epf->func_no,
> + epf->vfunc_no);
>
> if (!(epc_features->msix_capable || epc_features->msi_capable)) {
> dev_err(dev, "MSI or MSI-X is required for doorbell\n");
> @@ -564,10 +566,7 @@ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb)
> }
>
> if (epc_features->msi_capable) {
> - ret = pci_epc_set_msi(ntb->epf->epc,
> - ntb->epf->func_no,
> - ntb->epf->vfunc_no,
> - 16);
> + ret = pci_epc_set_msi(epf->epc, epf->func_no, epf->vfunc_no, 16);
> if (ret) {
> dev_err(dev, "MSI configuration failed\n");
> return ret;
> --
> 2.54.0
>