> -----Original Message----- > From: David Marchand <david.march...@redhat.com> > Sent: Monday, August 21, 2023 7:36 PM > To: dev@dpdk.org > Cc: tho...@monjalon.net; ferruh.yi...@amd.com; Xia, Chenbo > <chenbo....@intel.com>; nipun.gu...@amd.com; Richardson, Bruce > <bruce.richard...@intel.com> > Subject: [PATCH v2 02/15] bus/pci: add const to some experimental API > > Those functions are fine with a const on the device pointer. > > Signed-off-by: David Marchand <david.march...@redhat.com> > Acked-by: Bruce Richardson <bruce.richard...@intel.com> > --- > drivers/bus/pci/pci_common.c | 4 ++-- > drivers/bus/pci/rte_bus_pci.h | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index 52404ab0fe..382b0b8946 100644 > --- a/drivers/bus/pci/pci_common.c > +++ b/drivers/bus/pci/pci_common.c > @@ -814,7 +814,7 @@ rte_pci_get_iommu_class(void) > } > > off_t > -rte_pci_find_ext_capability(struct rte_pci_device *dev, uint32_t cap) > +rte_pci_find_ext_capability(const struct rte_pci_device *dev, uint32_t > cap) > { > off_t offset = RTE_PCI_CFG_SPACE_SIZE; > uint32_t header; > @@ -857,7 +857,7 @@ rte_pci_find_ext_capability(struct rte_pci_device *dev, > uint32_t cap) > } > > int > -rte_pci_set_bus_master(struct rte_pci_device *dev, bool enable) > +rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable) > { > uint16_t old_cmd, cmd; > > diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h > index 9d59c4aef3..75d0030eae 100644 > --- a/drivers/bus/pci/rte_bus_pci.h > +++ b/drivers/bus/pci/rte_bus_pci.h > @@ -85,7 +85,7 @@ void rte_pci_dump(FILE *f); > * = 0: Device does not support it. > */ > __rte_experimental > -off_t rte_pci_find_ext_capability(struct rte_pci_device *dev, uint32_t > cap); > +off_t rte_pci_find_ext_capability(const struct rte_pci_device *dev, > uint32_t cap); > > /** > * Enables/Disables Bus Master for device's PCI command register. > @@ -99,7 +99,7 @@ off_t rte_pci_find_ext_capability(struct rte_pci_device > *dev, uint32_t cap); > * 0 on success, -1 on error in PCI config space read/write. > */ > __rte_experimental > -int rte_pci_set_bus_master(struct rte_pci_device *dev, bool enable); > +int rte_pci_set_bus_master(const struct rte_pci_device *dev, bool enable); > > /** > * Read PCI config space. > -- > 2.41.0
Reviewed-by: Chenbo Xia <chenbo....@intel.com>