[v2,2/2] bus/pci: rename probe/remove operation types

Message ID 20210405091506.562830-3-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series pci: add rte prefix |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/intel-Testing success Testing PASS

Commit Message

Thomas Monjalon April 5, 2021, 9:15 a.m. UTC
  The names of the prototypes pci_probe_t and pci_remove_t
are missing a prefix rte_.
These function types are simply renamed.

No compatibility break is expected for the applications
because it is considered as an internal name in the driver interface.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/pci/rte_bus_pci.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Comments

Xueming Li April 6, 2021, 6:32 a.m. UTC | #1
>-----Original Message-----
>From: dev <dev-bounces@dpdk.org> On Behalf Of Thomas Monjalon
>Sent: Monday, April 5, 2021 5:15 PM
>To: dev@dpdk.org
>Subject: [dpdk-dev] [PATCH v2 2/2] bus/pci: rename probe/remove operation types
>
>The names of the prototypes pci_probe_t and pci_remove_t are missing a prefix rte_.
>These function types are simply renamed.
>
>No compatibility break is expected for the applications because it is considered as an internal name in the driver interface.

No long line warning with checkpatch?

Besides this,
Reviewed-by: Xueming Li <xuemingl@nvidia.com>

>
>Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
>---
> drivers/bus/pci/rte_bus_pci.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h index 3a092bc6d5..64886b4731 100644
>--- a/drivers/bus/pci/rte_bus_pci.h
>+++ b/drivers/bus/pci/rte_bus_pci.h
>@@ -112,12 +112,12 @@ struct rte_pci_device {
> /**
>  * Initialisation function for the driver called during PCI probing.
>  */
>-typedef int (pci_probe_t)(struct rte_pci_driver *, struct rte_pci_device *);
>+typedef int (rte_pci_probe_t)(struct rte_pci_driver *, struct
>+rte_pci_device *);
>
> /**
>  * Uninitialisation function for the driver called during hotplugging.
>  */
>-typedef int (pci_remove_t)(struct rte_pci_device *);
>+typedef int (rte_pci_remove_t)(struct rte_pci_device *);
>
> /**
>  * Driver-specific DMA mapping. After a successful call the device @@ -164,8 +164,8 @@ struct rte_pci_driver {
> 	TAILQ_ENTRY(rte_pci_driver) next;  /**< Next in list. */
> 	struct rte_driver driver;          /**< Inherit core driver. */
> 	struct rte_pci_bus *bus;           /**< PCI bus reference. */
>-	pci_probe_t *probe;                /**< Device Probe function. */
>-	pci_remove_t *remove;              /**< Device Remove function. */
>+	rte_pci_probe_t *probe;            /**< Device probe function. */
>+	rte_pci_remove_t *remove;          /**< Device remove function. */
> 	pci_dma_map_t *dma_map;		   /**< device dma map function. */
> 	pci_dma_unmap_t *dma_unmap;	   /**< device dma unmap function. */
> 	const struct rte_pci_id *id_table; /**< ID table, NULL terminated. */
>--
>2.31.1
  
Thomas Monjalon April 6, 2021, 9:38 a.m. UTC | #2
06/04/2021 08:32, Xueming(Steven) Li:
> From: Thomas Monjalon
> >
> >The names of the prototypes pci_probe_t and pci_remove_t are missing a prefix rte_.
> >These function types are simply renamed.
> >
> >No compatibility break is expected for the applications because it is considered as an internal name in the driver interface.
> 
> No long line warning with checkpatch?

No, this is your mail client which makes this line so long.
Please check config of your mail client (or use a real one :)

Note: the quoted lines should be prefixed with "> " (with a space)
  
Xueming Li April 6, 2021, 10:51 a.m. UTC | #3
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, April 6, 2021 5:39 PM
> To: Xueming(Steven) Li <xuemingl@nvidia.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 2/2] bus/pci: rename probe/remove operation types
> 
> 06/04/2021 08:32, Xueming(Steven) Li:
> > From: Thomas Monjalon
> > >
> > >The names of the prototypes pci_probe_t and pci_remove_t are missing a prefix rte_.
> > >These function types are simply renamed.
> > >
> > >No compatibility break is expected for the applications because it is considered as an internal name in the driver interface.
> >
> > No long line warning with checkpatch?
> 
> No, this is your mail client which makes this line so long.
> Please check config of your mail client (or use a real one :)

Strange, this never happen before with Outlook.

> 
> Note: the quoted lines should be prefixed with "> " (with a space)
> 
Thanks.
  

Patch

diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h
index 3a092bc6d5..64886b4731 100644
--- a/drivers/bus/pci/rte_bus_pci.h
+++ b/drivers/bus/pci/rte_bus_pci.h
@@ -112,12 +112,12 @@  struct rte_pci_device {
 /**
  * Initialisation function for the driver called during PCI probing.
  */
-typedef int (pci_probe_t)(struct rte_pci_driver *, struct rte_pci_device *);
+typedef int (rte_pci_probe_t)(struct rte_pci_driver *, struct rte_pci_device *);
 
 /**
  * Uninitialisation function for the driver called during hotplugging.
  */
-typedef int (pci_remove_t)(struct rte_pci_device *);
+typedef int (rte_pci_remove_t)(struct rte_pci_device *);
 
 /**
  * Driver-specific DMA mapping. After a successful call the device
@@ -164,8 +164,8 @@  struct rte_pci_driver {
 	TAILQ_ENTRY(rte_pci_driver) next;  /**< Next in list. */
 	struct rte_driver driver;          /**< Inherit core driver. */
 	struct rte_pci_bus *bus;           /**< PCI bus reference. */
-	pci_probe_t *probe;                /**< Device Probe function. */
-	pci_remove_t *remove;              /**< Device Remove function. */
+	rte_pci_probe_t *probe;            /**< Device probe function. */
+	rte_pci_remove_t *remove;          /**< Device remove function. */
 	pci_dma_map_t *dma_map;		   /**< device dma map function. */
 	pci_dma_unmap_t *dma_unmap;	   /**< device dma unmap function. */
 	const struct rte_pci_id *id_table; /**< ID table, NULL terminated. */