[EXT] Re: [PATCH v11 5/6] PCI: endpoint: cleanup pci-epf-vntb.c

Frank Li frank.li at nxp.com
Mon Sep 19 10:07:26 PDT 2022



> -----Original Message-----
> From: Bjorn Helgaas <helgaas at kernel.org>
> Sent: Monday, September 19, 2022 12:03 PM
> To: Frank Li <frank.li at nxp.com>
> Cc: maz at kernel.org; tglx at linutronix.de; robh+dt at kernel.org;
> krzysztof.kozlowski+dt at linaro.org; shawnguo at kernel.org;
> s.hauer at pengutronix.de; kw at linux.com; bhelgaas at google.com; linux-
> kernel at vger.kernel.org; devicetree at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; linux-pci at vger.kernel.org; Peng Fan
> <peng.fan at nxp.com>; Aisheng Dong <aisheng.dong at nxp.com>;
> jdmason at kudzu.us; kernel at pengutronix.de; festevam at gmail.com; dl-linux-
> imx <linux-imx at nxp.com>; kishon at ti.com; lorenzo.pieralisi at arm.com;
> ntb at lists.linux.dev; lznuaa at gmail.com; imx at lists.linux.dev;
> manivannan.sadhasivam at linaro.org
> Subject: [EXT] Re: [PATCH v11 5/6] PCI: endpoint: cleanup pci-epf-vntb.c
> 
> Caution: EXT Email
> 
> In subject (I mentioned this last time, too):
> 
>   PCI: endpoint: pci-epf-vntb: Clean up
> 
> On Mon, Sep 19, 2022 at 10:40:37AM -0500, Frank Li wrote:
> > Remove unused field: epf_db_phy.
> > Remove __iomem before epf_db.
> > Change epf_db to u32* from void *
> > Remove dupicate check if (readl(ntb->epf_db + i * 4)).
> 
> s/dupicate/duplicate/
> 
> > Using sizeof(u32) instead of number 4 at all place.
> >
> > Clean up sparse build warning
> >   Using  epf_db[i] instead of readl() because epf_db is located in local
> memory
> >   and allocated by dma_alloc_coherent()
> 
> Is "Using epf_db[i] ..." an sparse warning?  The indentation suggests
> that it is, but it doesn't seem related.

[Frank Li] sparse warning about __IOMEM.  Dma_alloc_conherece()
Return void *.  Not void __IOMEM *.  

Readl() use void __IOMEM *. 

Epf_db[i] is more simple and have not memory order risk here.    

> 
> > Replace pci_epc_mem_free_addr() with pci_epf_free_space() at error
> handle path
> > to match pci_epf_alloc_space().
> >
> > Cleanup warning found by scripts/kernel-doc
> > Fix indentation of the struct epf_ntb_ctrl
> > Consildate term
> 
> s/Consildate/Consolidate/
> 
> >   host, host1 to HOST
> >   vhost, vHost, Vhost, VHOST2 to VHOST



More information about the linux-arm-kernel mailing list