argparse: fix parser callback type name

Message ID 20240307161402.1460071-1-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series argparse: fix parser callback type name |

Checks

Context Check Description
ci/loongarch-compilation success Compilation OK
ci/checkpatch success coding style OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

David Marchand March 7, 2024, 4:14 p.m. UTC
  All types exposed in a public header must be prefixed with rte_.

Fixes: e3e579f5bab5 ("argparse: introduce argparse library")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/argparse/rte_argparse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Tyler Retzlaff March 7, 2024, 5:50 p.m. UTC | #1
On Thu, Mar 07, 2024 at 05:14:02PM +0100, David Marchand wrote:
> All types exposed in a public header must be prefixed with rte_.
> 
> Fixes: e3e579f5bab5 ("argparse: introduce argparse library")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  
fengchengwen March 8, 2024, 12:49 a.m. UTC | #2
Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2024/3/8 0:14, David Marchand wrote:
> All types exposed in a public header must be prefixed with rte_.
> 
> Fixes: e3e579f5bab5 ("argparse: introduce argparse library")
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  lib/argparse/rte_argparse.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/argparse/rte_argparse.h b/lib/argparse/rte_argparse.h
> index 47e231bef9..5e5936f96c 100644
> --- a/lib/argparse/rte_argparse.h
> +++ b/lib/argparse/rte_argparse.h
> @@ -144,7 +144,7 @@ struct rte_argparse_arg {
>   * @return
>   *   0 on success. Otherwise negative value is returned.
>   */
> -typedef int (*arg_parser_t)(uint32_t index, const char *value, void *opaque);
> +typedef int (*rte_arg_parser_t)(uint32_t index, const char *value, void *opaque);
>  
>  /**
>   * A structure used to hold argparse's configuration.
> @@ -161,7 +161,7 @@ struct rte_argparse {
>  	/** Whether exit when error. */
>  	bool exit_on_error;
>  	/** User callback for parsing arguments. */
> -	arg_parser_t callback;
> +	rte_arg_parser_t callback;
>  	/** Opaque which used to invoke callback. */
>  	void *opaque;
>  	/** Reserved field used for future extension. */
>
  
Thomas Monjalon March 21, 2024, 5:20 p.m. UTC | #3
07/03/2024 18:50, Tyler Retzlaff:
> On Thu, Mar 07, 2024 at 05:14:02PM +0100, David Marchand wrote:
> > All types exposed in a public header must be prefixed with rte_.
> > 
> > Fixes: e3e579f5bab5 ("argparse: introduce argparse library")
> > 
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> 
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>

Applied, thanks.
  

Patch

diff --git a/lib/argparse/rte_argparse.h b/lib/argparse/rte_argparse.h
index 47e231bef9..5e5936f96c 100644
--- a/lib/argparse/rte_argparse.h
+++ b/lib/argparse/rte_argparse.h
@@ -144,7 +144,7 @@  struct rte_argparse_arg {
  * @return
  *   0 on success. Otherwise negative value is returned.
  */
-typedef int (*arg_parser_t)(uint32_t index, const char *value, void *opaque);
+typedef int (*rte_arg_parser_t)(uint32_t index, const char *value, void *opaque);
 
 /**
  * A structure used to hold argparse's configuration.
@@ -161,7 +161,7 @@  struct rte_argparse {
 	/** Whether exit when error. */
 	bool exit_on_error;
 	/** User callback for parsing arguments. */
-	arg_parser_t callback;
+	rte_arg_parser_t callback;
 	/** Opaque which used to invoke callback. */
 	void *opaque;
 	/** Reserved field used for future extension. */