Re: [PATCH iwl-next v2 03/14] libie: add PCI device initialization helpers to libie

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 24, 2025 at 01:32:26PM +0200, Larysa Zaremba wrote:
> From: Phani R Burra <phani.r.burra@xxxxxxxxx>
> 
> Add memory related support functions for drivers to access MMIO space and
> allocate/free dma buffers.
> 
> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
> Signed-off-by: Phani R Burra <phani.r.burra@xxxxxxxxx>
> Co-developed-by: Victor Raj <victor.raj@xxxxxxxxx>
> Signed-off-by: Victor Raj <victor.raj@xxxxxxxxx>
> Co-developed-by: Sridhar Samudrala <sridhar.samudrala@xxxxxxxxx>
> Signed-off-by: Sridhar Samudrala <sridhar.samudrala@xxxxxxxxx>
> Co-developed-by: Pavan Kumar Linga <pavan.kumar.linga@xxxxxxxxx>
> Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@xxxxxxxxx>
> Co-developed-by: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>
> Signed-off-by: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>

...

> diff --git a/include/linux/intel/libie/pci.h b/include/linux/intel/libie/pci.h

...

> +#define libie_pci_map_mmio_region(mmio_info, offset, size, ...)	\
> +	__libie_pci_map_mmio_region(mmio_info, offset, size,		\
> +				     COUNT_ARGS(__VA_ARGS__), ##__VA_ARGS__)
> +
> +#define libie_pci_get_mmio_addr(mmio_info, offset, ...)		\
> +	__libie_pci_get_mmio_addr(mmio_info, offset,			\
> +				   COUNT_ARGS(__VA_ARGS__), ##__VA_ARGS__)

Perhaps I'm missing something terribly obvious.  But it seems to me that
both libie_pci_map_mmio_region() and libie_pci_get_mmio_addr() are always
called with the same number of arguments in this patchset. And if so,
perhaps the va_args handling would be best dropped.

> +
> +bool __libie_pci_map_mmio_region(struct libie_mmio_info *mmio_info,
> +				 resource_size_t offset, resource_size_t size,
> +				 int num_args, ...);
> +void __iomem *__libie_pci_get_mmio_addr(struct libie_mmio_info *mmio_info,
> +					resource_size_t region_offset,
> +					int num_args, ...);
> +void libie_pci_unmap_all_mmio_regions(struct libie_mmio_info *mmio_info);
> +int libie_pci_init_dev(struct pci_dev *pdev);
> +void libie_pci_deinit_dev(struct pci_dev *pdev);
> +
> +#endif /* __LIBIE_PCI_H */
> -- 
> 2.47.0
> 




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux