dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH linux-next] drivers: dma: Fix sparse warning for mux_configure32
@ 2019-08-12  7:42 Mao Wenan
  2019-08-13  4:43 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Mao Wenan @ 2019-08-12  7:42 UTC (permalink / raw)
  To: dan.j.williams, dmaengine; +Cc: linux-kernel, kernel-janitors, Mao Wenan

There is one sparse warning in drivers/dma/fsl-edma-common.c,
fix it by setting mux_configure32() as static.

make allmodconfig ARCH=mips CROSS_COMPILE=mips-linux-gnu-
make C=2 drivers/dma/fsl-edma-common.o ARCH=mips CROSS_COMPILE=mips-linux-gnu-
drivers/dma/fsl-edma-common.c:93:6: warning: symbol 'mux_configure32' was not declared. Should it be static?

Fixes: 232a7f18cf8ec ("dmaengine: fsl-edma: add i.mx7ulp edma2 version support")
Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/dma/fsl-edma-common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
index 6d6d8a4..7dbf7df 100644
--- a/drivers/dma/fsl-edma-common.c
+++ b/drivers/dma/fsl-edma-common.c
@@ -90,8 +90,8 @@ static void mux_configure8(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
 	iowrite8(val8, addr + off);
 }
 
-void mux_configure32(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
-		     u32 off, u32 slot, bool enable)
+static void mux_configure32(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
+			    u32 off, u32 slot, bool enable)
 {
 	u32 val;
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] drivers: dma: Fix sparse warning for mux_configure32
  2019-08-12  7:42 [PATCH linux-next] drivers: dma: Fix sparse warning for mux_configure32 Mao Wenan
@ 2019-08-13  4:43 ` Vinod Koul
  2019-08-14  2:40   ` maowenan
  0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2019-08-13  4:43 UTC (permalink / raw)
  To: Mao Wenan; +Cc: dan.j.williams, dmaengine, linux-kernel, kernel-janitors

On 12-08-19, 15:42, Mao Wenan wrote:

Patch title is incorrect, it should mention the changes in patch, for
example make mux_configure32 static

Do read up on Documentation/process/submitting-patches.rst again!

> There is one sparse warning in drivers/dma/fsl-edma-common.c,

It will help to explain the warning before the fix

> fix it by setting mux_configure32() as static.
> 
> make allmodconfig ARCH=mips CROSS_COMPILE=mips-linux-gnu-
> make C=2 drivers/dma/fsl-edma-common.o ARCH=mips CROSS_COMPILE=mips-linux-gnu-

Make cmds are not relevant for the log

> drivers/dma/fsl-edma-common.c:93:6: warning: symbol 'mux_configure32' was not declared. Should it be static?

This one is and should be retained

> 
> Fixes: 232a7f18cf8ec ("dmaengine: fsl-edma: add i.mx7ulp edma2 version support")
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  drivers/dma/fsl-edma-common.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
> index 6d6d8a4..7dbf7df 100644
> --- a/drivers/dma/fsl-edma-common.c
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -90,8 +90,8 @@ static void mux_configure8(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
>  	iowrite8(val8, addr + off);
>  }
>  
> -void mux_configure32(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
> -		     u32 off, u32 slot, bool enable)
> +static void mux_configure32(struct fsl_edma_chan *fsl_chan, void __iomem *addr,

just change this to static

> +			    u32 off, u32 slot, bool enable)

and dont change anything else.

If you feel to change this, propose a new patch for this line explaining
why this should be changed

>  {
>  	u32 val;
>  
> -- 
> 2.7.4

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] drivers: dma: Fix sparse warning for mux_configure32
  2019-08-13  4:43 ` Vinod Koul
@ 2019-08-14  2:40   ` maowenan
  0 siblings, 0 replies; 3+ messages in thread
From: maowenan @ 2019-08-14  2:40 UTC (permalink / raw)
  To: Vinod Koul; +Cc: dan.j.williams, dmaengine, linux-kernel, kernel-janitors



On 2019/8/13 12:43, Vinod Koul wrote:
> On 12-08-19, 15:42, Mao Wenan wrote:
> 
> Patch title is incorrect, it should mention the changes in patch, for
> example make mux_configure32 static
> 
> Do read up on Documentation/process/submitting-patches.rst again!
> 
>> There is one sparse warning in drivers/dma/fsl-edma-common.c,
> 
> It will help to explain the warning before the fix
> 
>> fix it by setting mux_configure32() as static.
>>
>> make allmodconfig ARCH=mips CROSS_COMPILE=mips-linux-gnu-
>> make C=2 drivers/dma/fsl-edma-common.o ARCH=mips CROSS_COMPILE=mips-linux-gnu-
> 
> Make cmds are not relevant for the log
> 
>> drivers/dma/fsl-edma-common.c:93:6: warning: symbol 'mux_configure32' was not declared. Should it be static?
> 
> This one is and should be retained
> 
>>
>> Fixes: 232a7f18cf8ec ("dmaengine: fsl-edma: add i.mx7ulp edma2 version support")
>> Signed-off-by: Mao Wenan <maowenan@huawei.com>
>> ---
>>  drivers/dma/fsl-edma-common.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/dma/fsl-edma-common.c b/drivers/dma/fsl-edma-common.c
>> index 6d6d8a4..7dbf7df 100644
>> --- a/drivers/dma/fsl-edma-common.c
>> +++ b/drivers/dma/fsl-edma-common.c
>> @@ -90,8 +90,8 @@ static void mux_configure8(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
>>  	iowrite8(val8, addr + off);
>>  }
>>  
>> -void mux_configure32(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
>> -		     u32 off, u32 slot, bool enable)
>> +static void mux_configure32(struct fsl_edma_chan *fsl_chan, void __iomem *addr,
> 
> just change this to static
> 
>> +			    u32 off, u32 slot, bool enable)
> 
> and dont change anything else.
> 
> If you feel to change this, propose a new patch for this line explaining
> why this should be changed

thanks, I will send v2.

> 
>>  {
>>  	u32 val;
>>  
>> -- 
>> 2.7.4
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12  7:42 [PATCH linux-next] drivers: dma: Fix sparse warning for mux_configure32 Mao Wenan
2019-08-13  4:43 ` Vinod Koul
2019-08-14  2:40   ` maowenan

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox