[v2,1/5] eal: use unsigned int in rte_lcore.h functions

Message ID 20190410171603.8979-2-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series make lcore_config internal |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

Commit Message

Stephen Hemminger April 10, 2019, 5:15 p.m. UTC
  Purely cosmetic change, use unsigned int instead of unsigned alone.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_eal/common/include/rte_lcore.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
  

Comments

David Marchand May 3, 2019, 7:24 a.m. UTC | #1
On Wed, Apr 10, 2019 at 7:16 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> Purely cosmetic change, use unsigned int instead of unsigned alone.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  lib/librte_eal/common/include/rte_lcore.h | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/lib/librte_eal/common/include/rte_lcore.h
> b/lib/librte_eal/common/include/rte_lcore.h
> index dea17f500065..959ef9ece4b2 100644
> --- a/lib/librte_eal/common/include/rte_lcore.h
> +++ b/lib/librte_eal/common/include/rte_lcore.h
> @@ -137,7 +137,7 @@ rte_lcore_index(int lcore_id)
>   * @return
>   *   the ID of current lcoreid's physical socket
>   */
> -unsigned rte_socket_id(void);
> +unsigned int rte_socket_id(void);
>
>  /**
>   * Return number of physical sockets detected on the system.
> @@ -177,8 +177,8 @@ rte_socket_id_by_idx(unsigned int idx);
>   * @return
>   *   the ID of lcoreid's physical socket
>   */
> -static inline unsigned
> -rte_lcore_to_socket_id(unsigned lcore_id)
> +static inline unsigned int
> +rte_lcore_to_socket_id(unsigned int lcore_id)
>  {
>         return lcore_config[lcore_id].socket_id;
>  }
> @@ -193,7 +193,7 @@ rte_lcore_to_socket_id(unsigned lcore_id)
>   *   True if the given lcore is enabled; false otherwise.
>   */
>  static inline int
> -rte_lcore_is_enabled(unsigned lcore_id)
> +rte_lcore_is_enabled(unsigned int lcore_id)
>  {
>         struct rte_config *cfg = rte_eal_get_configuration();
>         if (lcore_id >= RTE_MAX_LCORE)
> @@ -214,8 +214,8 @@ rte_lcore_is_enabled(unsigned lcore_id)
>   * @return
>   *   The next lcore_id or RTE_MAX_LCORE if not found.
>   */
> -static inline unsigned
> -rte_get_next_lcore(unsigned i, int skip_master, int wrap)
> +static inline unsigned int
> +rte_get_next_lcore(unsigned int i, int skip_master, int wrap)
>  {
>         i++;
>         if (wrap)
> --
> 2.17.1
>
>
Reviewed-by: David Marchand <david.marchand@redhat.com>
  

Patch

diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h
index dea17f500065..959ef9ece4b2 100644
--- a/lib/librte_eal/common/include/rte_lcore.h
+++ b/lib/librte_eal/common/include/rte_lcore.h
@@ -137,7 +137,7 @@  rte_lcore_index(int lcore_id)
  * @return
  *   the ID of current lcoreid's physical socket
  */
-unsigned rte_socket_id(void);
+unsigned int rte_socket_id(void);
 
 /**
  * Return number of physical sockets detected on the system.
@@ -177,8 +177,8 @@  rte_socket_id_by_idx(unsigned int idx);
  * @return
  *   the ID of lcoreid's physical socket
  */
-static inline unsigned
-rte_lcore_to_socket_id(unsigned lcore_id)
+static inline unsigned int
+rte_lcore_to_socket_id(unsigned int lcore_id)
 {
 	return lcore_config[lcore_id].socket_id;
 }
@@ -193,7 +193,7 @@  rte_lcore_to_socket_id(unsigned lcore_id)
  *   True if the given lcore is enabled; false otherwise.
  */
 static inline int
-rte_lcore_is_enabled(unsigned lcore_id)
+rte_lcore_is_enabled(unsigned int lcore_id)
 {
 	struct rte_config *cfg = rte_eal_get_configuration();
 	if (lcore_id >= RTE_MAX_LCORE)
@@ -214,8 +214,8 @@  rte_lcore_is_enabled(unsigned lcore_id)
  * @return
  *   The next lcore_id or RTE_MAX_LCORE if not found.
  */
-static inline unsigned
-rte_get_next_lcore(unsigned i, int skip_master, int wrap)
+static inline unsigned int
+rte_get_next_lcore(unsigned int i, int skip_master, int wrap)
 {
 	i++;
 	if (wrap)