2019-03-22 17:15:52

by Bharath Vedartham

[permalink] [raw]
Subject: [PATCH v3] staging: ralink-gdma: Use u32 over uint32_t

This fixes the checkpatch.pl warning: "Prefer u32 over uint32_t"

Signed-off-by: Bharath Vedartham <[email protected]>
---
Changes since v2
- Improved changelog
- Thanks for the good feedback. I am a beginner. I will learn
and grow. :)
---
drivers/staging/ralink-gdma/ralink-gdma.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
index d78042e..7e824d3 100644
--- a/drivers/staging/ralink-gdma/ralink-gdma.c
+++ b/drivers/staging/ralink-gdma/ralink-gdma.c
@@ -157,14 +157,14 @@ static struct gdma_dma_desc *to_gdma_dma_desc(struct virt_dma_desc *vdesc)
return container_of(vdesc, struct gdma_dma_desc, vdesc);
}

-static inline uint32_t gdma_dma_read(struct gdma_dma_dev *dma_dev,
+static inline u32 gdma_dma_read(struct gdma_dma_dev *dma_dev,
unsigned int reg)
{
return readl(dma_dev->base + reg);
}

static inline void gdma_dma_write(struct gdma_dma_dev *dma_dev,
- unsigned reg, uint32_t val)
+ unsigned reg, u32 val)
{
writel(val, dma_dev->base + reg);
}
@@ -283,7 +283,7 @@ static int rt305x_gdma_start_transfer(struct gdma_dmaengine_chan *chan)
struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
dma_addr_t src_addr, dst_addr;
struct gdma_dma_sg *sg;
- uint32_t ctrl0, ctrl1;
+ u32 ctrl0, ctrl1;

/* verify chan is already stopped */
ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id));
@@ -361,7 +361,7 @@ static int rt3883_gdma_start_transfer(struct gdma_dmaengine_chan *chan)
struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
dma_addr_t src_addr, dst_addr;
struct gdma_dma_sg *sg;
- uint32_t ctrl0, ctrl1;
+ u32 ctrl0, ctrl1;

/* verify chan is already stopped */
ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id));
@@ -753,7 +753,7 @@ static void gdma_dma_tasklet(unsigned long arg)

static void rt305x_gdma_init(struct gdma_dma_dev *dma_dev)
{
- uint32_t gct;
+ u32 gct;

/* all chans round robin */
gdma_dma_write(dma_dev, GDMA_RT305X_GCT, GDMA_REG_GCT_ARBIT_RR);
@@ -767,7 +767,7 @@ static void rt305x_gdma_init(struct gdma_dma_dev *dma_dev)

static void rt3883_gdma_init(struct gdma_dma_dev *dma_dev)
{
- uint32_t gct;
+ u32 gct;

/* all chans round robin */
gdma_dma_write(dma_dev, GDMA_REG_GCT, GDMA_REG_GCT_ARBIT_RR);
--
2.7.4



2019-03-23 00:55:21

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v3] staging: ralink-gdma: Use u32 over uint32_t

On Fri, 2019-03-22 at 22:43 +0530, Bharath Vedartham wrote:
> This fixes the checkpatch.pl warning: "Prefer u32 over uint32_t"

Please run your proposed patches through checkpatch before
submitting them.

> Signed-off-by: Bharath Vedartham <[email protected]>
> ---
> Changes since v2
> - Improved changelog
> - Thanks for the good feedback. I am a beginner. I will learn
> and grow. :)

More feedback for you.

> diff --git a/drivers/staging/ralink-gdma/ralink-gdma.c b/drivers/staging/ralink-gdma/ralink-gdma.c
[]
> @@ -157,14 +157,14 @@ static struct gdma_dma_desc *to_gdma_dma_desc(struct virt_dma_desc *vdesc)
> return container_of(vdesc, struct gdma_dma_desc, vdesc);
> }
>
> -static inline uint32_t gdma_dma_read(struct gdma_dma_dev *dma_dev,
> +static inline u32 gdma_dma_read(struct gdma_dma_dev *dma_dev,
> unsigned int reg)

Please realign the line following your change.