Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570503 > unrolled thread

[PATCH 17/17] net: stmmac: replace unsigned by u32

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2017-01-31 10:20 +0100
Last post2017-01-31 11:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 17/17] net: stmmac: replace unsigned by u32 Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-01-31 10:20 +0100
    Re: [PATCH 17/17] net: stmmac: replace unsigned by u32 Giuseppe CAVALLARO <peppe.cavallaro@st.com> - 2017-01-31 11:20 +0100

#1570503 — [PATCH 17/17] net: stmmac: replace unsigned by u32

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-01-31 10:20 +0100
Subject[PATCH 17/17] net: stmmac: replace unsigned by u32
Message-ID<t5CLw-7mj-17@gated-at.bofh.it>
checkpatch complains about two unsigned without type after.
Since the value return is u32, it is simpler to replace it by u32 instead
of "unsigned int"

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index f0ce780..6260b6f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -187,7 +187,7 @@ static void print_pkt(unsigned char *buf, int len)
 
 static inline u32 stmmac_tx_avail(struct stmmac_priv *priv)
 {
-	unsigned avail;
+	u32 avail;
 
 	if (priv->dirty_tx > priv->cur_tx)
 		avail = priv->dirty_tx - priv->cur_tx - 1;
@@ -199,7 +199,7 @@ static inline u32 stmmac_tx_avail(struct stmmac_priv *priv)
 
 static inline u32 stmmac_rx_dirty(struct stmmac_priv *priv)
 {
-	unsigned dirty;
+	u32 dirty;
 
 	if (priv->dirty_rx <= priv->cur_rx)
 		dirty = priv->cur_rx - priv->dirty_rx;
-- 
2.10.2

[toc] | [next] | [standalone]


#1570565

FromGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Date2017-01-31 11:20 +0100
Message-ID<t5DHA-7V9-29@gated-at.bofh.it>
In reply to#1570503
On 1/31/2017 10:11 AM, Corentin Labbe wrote:
> checkpatch complains about two unsigned without type after.
> Since the value return is u32, it is simpler to replace it by u32 instead
> of "unsigned int"
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>


Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index f0ce780..6260b6f 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -187,7 +187,7 @@ static void print_pkt(unsigned char *buf, int len)
>
>  static inline u32 stmmac_tx_avail(struct stmmac_priv *priv)
>  {
> -	unsigned avail;
> +	u32 avail;
>
>  	if (priv->dirty_tx > priv->cur_tx)
>  		avail = priv->dirty_tx - priv->cur_tx - 1;
> @@ -199,7 +199,7 @@ static inline u32 stmmac_tx_avail(struct stmmac_priv *priv)
>
>  static inline u32 stmmac_rx_dirty(struct stmmac_priv *priv)
>  {
> -	unsigned dirty;
> +	u32 dirty;
>
>  	if (priv->dirty_rx <= priv->cur_rx)
>  		dirty = priv->cur_rx - priv->dirty_rx;
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web