dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] dmaengine: sf-pdma: fix kernel-doc W=1 warning
@ 2019-11-15  3:10 Green Wan
  2019-11-18  7:58 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Green Wan @ 2019-11-15  3:10 UTC (permalink / raw)
  To: unlisted-recipients:; (no To-header on input)
  Cc: Green Wan, Vinod Koul, Dan Williams, dmaengine, linux-kernel

Fix kernel-doc W=1 warning. There are several comments starting from "/**"
but not for function comment purpose. Remove them to fix the warning.
Another definition in front of function causes warning. Move definition
to header file.

kernel-doc warning:

drivers/dma/sf-pdma/sf-pdma.c:28: warning: Function parameter or member
	'addr' not described in 'readq'
drivers/dma/sf-pdma/sf-pdma.c:438: warning: Function parameter or member
	'ch' not described in 'SF_PDMA_REG_BASE'
drivers/dma/sf-pdma/sf-pdma.c:438: warning: Excess function parameter
	'pdma' description in 'SF_PDMA_REG_BASE'

Changes:
 - Replace string '/**' with '/*' not for comment purpose
 - Move definition, "SF_PDMA_REG_BASE", fomr sf-pdma.c to sf-pdma.h

Signed-off-by: Green Wan <green.wan@sifive.com>
---
 drivers/dma/sf-pdma/sf-pdma.c | 3 +--
 drivers/dma/sf-pdma/sf-pdma.h | 4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index 16fe00553496..465256fe8b1f 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
-/**
+/*
  * SiFive FU540 Platform DMA driver
  * Copyright (C) 2019 SiFive
  *
@@ -435,7 +435,6 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
  *
  * Return: none
  */
-#define SF_PDMA_REG_BASE(ch)	(pdma->membase + (PDMA_CHAN_OFFSET * (ch)))
 static void sf_pdma_setup_chans(struct sf_pdma *pdma)
 {
 	int i;
diff --git a/drivers/dma/sf-pdma/sf-pdma.h b/drivers/dma/sf-pdma/sf-pdma.h
index 55816c9e0249..0c20167b097d 100644
--- a/drivers/dma/sf-pdma/sf-pdma.h
+++ b/drivers/dma/sf-pdma/sf-pdma.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-or-later */
-/**
+/*
  * SiFive FU540 Platform DMA driver
  * Copyright (C) 2019 SiFive
  *
@@ -57,6 +57,8 @@
 /* Error Recovery */
 #define MAX_RETRY					1
 
+#define SF_PDMA_REG_BASE(ch)	(pdma->membase + (PDMA_CHAN_OFFSET * (ch)))
+
 struct pdma_regs {
 	/* read-write regs */
 	void __iomem *ctrl;		/* 4 bytes */

base-commit: a7e335deed174a37fc6f84f69caaeff8a08f8ff8
-- 
2.17.1


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

* Re: [PATCH] dmaengine: sf-pdma: fix kernel-doc W=1 warning
  2019-11-15  3:10 [PATCH] dmaengine: sf-pdma: fix kernel-doc W=1 warning Green Wan
@ 2019-11-18  7:58 ` Vinod Koul
  2019-11-18  8:16   ` Green Wan
  0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2019-11-18  7:58 UTC (permalink / raw)
  To: Green Wan; +Cc: Dan Williams, dmaengine, linux-kernel

On 15-11-19, 11:10, Green Wan wrote:
> Fix kernel-doc W=1 warning. There are several comments starting from "/**"
> but not for function comment purpose. Remove them to fix the warning.
> Another definition in front of function causes warning. Move definition
> to header file.

We do not do these kind of titles for a patch, a patch should have
subject which describes the changes and we do not mix multiple changes
into a patch , so..
> 
> kernel-doc warning:
> 
> drivers/dma/sf-pdma/sf-pdma.c:28: warning: Function parameter or member
> 	'addr' not described in 'readq'

'describe redq parameter' can be good subject and a patch

> drivers/dma/sf-pdma/sf-pdma.c:438: warning: Function parameter or member
> 	'ch' not described in 'SF_PDMA_REG_BASE'
> drivers/dma/sf-pdma/sf-pdma.c:438: warning: Excess function parameter
> 	'pdma' description in 'SF_PDMA_REG_BASE'

'remove pdma description' can be second patch and subject

> 
> Changes:
>  - Replace string '/**' with '/*' not for comment purpose
>  - Move definition, "SF_PDMA_REG_BASE", fomr sf-pdma.c to sf-pdma.h
> 
> Signed-off-by: Green Wan <green.wan@sifive.com>
> ---
>  drivers/dma/sf-pdma/sf-pdma.c | 3 +--
>  drivers/dma/sf-pdma/sf-pdma.h | 4 +++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
> index 16fe00553496..465256fe8b1f 100644
> --- a/drivers/dma/sf-pdma/sf-pdma.c
> +++ b/drivers/dma/sf-pdma/sf-pdma.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0-or-later
> -/**
> +/*
>   * SiFive FU540 Platform DMA driver
>   * Copyright (C) 2019 SiFive
>   *
> @@ -435,7 +435,6 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
>   *
>   * Return: none
>   */
> -#define SF_PDMA_REG_BASE(ch)	(pdma->membase + (PDMA_CHAN_OFFSET * (ch)))
>  static void sf_pdma_setup_chans(struct sf_pdma *pdma)
>  {
>  	int i;
> diff --git a/drivers/dma/sf-pdma/sf-pdma.h b/drivers/dma/sf-pdma/sf-pdma.h
> index 55816c9e0249..0c20167b097d 100644
> --- a/drivers/dma/sf-pdma/sf-pdma.h
> +++ b/drivers/dma/sf-pdma/sf-pdma.h
> @@ -1,5 +1,5 @@
>  /* SPDX-License-Identifier: GPL-2.0-or-later */
> -/**
> +/*
>   * SiFive FU540 Platform DMA driver
>   * Copyright (C) 2019 SiFive
>   *
> @@ -57,6 +57,8 @@
>  /* Error Recovery */
>  #define MAX_RETRY					1
>  
> +#define SF_PDMA_REG_BASE(ch)	(pdma->membase + (PDMA_CHAN_OFFSET * (ch)))
> +
>  struct pdma_regs {
>  	/* read-write regs */
>  	void __iomem *ctrl;		/* 4 bytes */
> 
> base-commit: a7e335deed174a37fc6f84f69caaeff8a08f8ff8
> -- 
> 2.17.1

-- 
~Vinod

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

* Re: [PATCH] dmaengine: sf-pdma: fix kernel-doc W=1 warning
  2019-11-18  7:58 ` Vinod Koul
@ 2019-11-18  8:16   ` Green Wan
  0 siblings, 0 replies; 3+ messages in thread
From: Green Wan @ 2019-11-18  8:16 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dan Williams, dmaengine, linux-kernel

will fix the subject and split the patch. Thanks.

--
Green

On Mon, Nov 18, 2019 at 3:58 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> On 15-11-19, 11:10, Green Wan wrote:
> > Fix kernel-doc W=1 warning. There are several comments starting from "/**"
> > but not for function comment purpose. Remove them to fix the warning.
> > Another definition in front of function causes warning. Move definition
> > to header file.
>
> We do not do these kind of titles for a patch, a patch should have
> subject which describes the changes and we do not mix multiple changes
> into a patch , so..
> >
> > kernel-doc warning:
> >
> > drivers/dma/sf-pdma/sf-pdma.c:28: warning: Function parameter or member
> >       'addr' not described in 'readq'
>
> 'describe redq parameter' can be good subject and a patch
>
> > drivers/dma/sf-pdma/sf-pdma.c:438: warning: Function parameter or member
> >       'ch' not described in 'SF_PDMA_REG_BASE'
> > drivers/dma/sf-pdma/sf-pdma.c:438: warning: Excess function parameter
> >       'pdma' description in 'SF_PDMA_REG_BASE'
>
> 'remove pdma description' can be second patch and subject
>
> >
> > Changes:
> >  - Replace string '/**' with '/*' not for comment purpose
> >  - Move definition, "SF_PDMA_REG_BASE", fomr sf-pdma.c to sf-pdma.h
> >
> > Signed-off-by: Green Wan <green.wan@sifive.com>
> > ---
> >  drivers/dma/sf-pdma/sf-pdma.c | 3 +--
> >  drivers/dma/sf-pdma/sf-pdma.h | 4 +++-
> >  2 files changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
> > index 16fe00553496..465256fe8b1f 100644
> > --- a/drivers/dma/sf-pdma/sf-pdma.c
> > +++ b/drivers/dma/sf-pdma/sf-pdma.c
> > @@ -1,5 +1,5 @@
> >  // SPDX-License-Identifier: GPL-2.0-or-later
> > -/**
> > +/*
> >   * SiFive FU540 Platform DMA driver
> >   * Copyright (C) 2019 SiFive
> >   *
> > @@ -435,7 +435,6 @@ static int sf_pdma_irq_init(struct platform_device *pdev, struct sf_pdma *pdma)
> >   *
> >   * Return: none
> >   */
> > -#define SF_PDMA_REG_BASE(ch) (pdma->membase + (PDMA_CHAN_OFFSET * (ch)))
> >  static void sf_pdma_setup_chans(struct sf_pdma *pdma)
> >  {
> >       int i;
> > diff --git a/drivers/dma/sf-pdma/sf-pdma.h b/drivers/dma/sf-pdma/sf-pdma.h
> > index 55816c9e0249..0c20167b097d 100644
> > --- a/drivers/dma/sf-pdma/sf-pdma.h
> > +++ b/drivers/dma/sf-pdma/sf-pdma.h
> > @@ -1,5 +1,5 @@
> >  /* SPDX-License-Identifier: GPL-2.0-or-later */
> > -/**
> > +/*
> >   * SiFive FU540 Platform DMA driver
> >   * Copyright (C) 2019 SiFive
> >   *
> > @@ -57,6 +57,8 @@
> >  /* Error Recovery */
> >  #define MAX_RETRY                                    1
> >
> > +#define SF_PDMA_REG_BASE(ch) (pdma->membase + (PDMA_CHAN_OFFSET * (ch)))
> > +
> >  struct pdma_regs {
> >       /* read-write regs */
> >       void __iomem *ctrl;             /* 4 bytes */
> >
> > base-commit: a7e335deed174a37fc6f84f69caaeff8a08f8ff8
> > --
> > 2.17.1
>
> --
> ~Vinod

^ 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-11-15  3:10 [PATCH] dmaengine: sf-pdma: fix kernel-doc W=1 warning Green Wan
2019-11-18  7:58 ` Vinod Koul
2019-11-18  8:16   ` Green Wan

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
	public-inbox-index dmaengine

Example config snippet for mirrors

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.git