[v2,5/6] ethdev: fix mis-named parameter

Message ID 20200929165502.336919-6-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series improve building docs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Bruce Richardson Sept. 29, 2020, 4:55 p.m. UTC
  The parameter to rte_eth_link_speed_to_str was called "speed_link" in the
function prototype in the header file, but "link_speed" everywhere else.
This showed up as warnings when building the API docs, due to missing and
undocumented parameters from doxygen's viewpoint.

Rename the prototype value to the correct name to fix these issues.

Fixes: fbf931c9c392 ("ethdev: format link status text")
Cc: i.dyukov@samsung.com

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_ethdev/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

David Marchand Sept. 29, 2020, 5:34 p.m. UTC | #1
On Tue, Sep 29, 2020 at 6:57 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> The parameter to rte_eth_link_speed_to_str was called "speed_link" in the
> function prototype in the header file, but "link_speed" everywhere else.
> This showed up as warnings when building the API docs, due to missing and
> undocumented parameters from doxygen's viewpoint.
>
> Rename the prototype value to the correct name to fix these issues.
>
> Fixes: fbf931c9c392 ("ethdev: format link status text")
> Cc: i.dyukov@samsung.com
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Already fixed with:
https://git.dpdk.org/next/dpdk-next-net/commit/?id=10c835f2f57a62e50c83c764926d2481afbb60d5
  
Thomas Monjalon Sept. 29, 2020, 5:34 p.m. UTC | #2
> The parameter to rte_eth_link_speed_to_str was called "speed_link" in the
> function prototype in the header file, but "link_speed" everywhere else.
> This showed up as warnings when building the API docs, due to missing and
> undocumented parameters from doxygen's viewpoint.
> 
> Rename the prototype value to the correct name to fix these issues.

It has been fixed by David and merged already by Ferruh.
  
Bruce Richardson Sept. 30, 2020, 9:01 a.m. UTC | #3
On Tue, Sep 29, 2020 at 07:34:17PM +0200, Thomas Monjalon wrote:
> > The parameter to rte_eth_link_speed_to_str was called "speed_link" in
> > the function prototype in the header file, but "link_speed" everywhere
> > else.  This showed up as warnings when building the API docs, due to
> > missing and undocumented parameters from doxygen's viewpoint.
> > 
> > Rename the prototype value to the correct name to fix these issues.
> 
> It has been fixed by David and merged already by Ferruh.
> 
Yep, I guessed there was a patch outstanding for it from someone, though I
think the patch wasn't merged when I did this patch, so I included it to
guarantee that this patchset didn't break the build when werror was turned
on.

/Bruce
  

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 645a18664..9759f1330 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2452,7 +2452,7 @@  int rte_eth_link_get_nowait(uint16_t port_id, struct rte_eth_link *link);
  *   No free is required.
  */
 __rte_experimental
-const char *rte_eth_link_speed_to_str(uint32_t speed_link);
+const char *rte_eth_link_speed_to_str(uint32_t link_speed);
 
 /**
  * @warning