2016-03-10 07:12:50

by Neha Rani

[permalink] [raw]
Subject: [PATCH 2/2] Staging: nvec: fix multiline comment style.

This is a patch in nvec.c file that fixes a multiline comment found by checkpatch.pl tool

Signed-off-by: Neha Rani <[email protected]>
---
drivers/staging/nvec/nvec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 4ae44a5..57ad27a 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -508,8 +508,10 @@ static void nvec_rx_completed(struct nvec_chip *nvec)

spin_lock(&nvec->rx_lock);

- /* add the received data to the work list
- and move the ring buffer pointer to the next entry */
+ /**
+ * add the received data to the work list
+ * and move the ring buffer pointer to the next entry
+ */
list_add_tail(&nvec->rx->node, &nvec->rx_data);

spin_unlock(&nvec->rx_lock);
--
2.5.0


2016-03-11 21:21:33

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 2/2] Staging: nvec: fix multiline comment style.

On Thu, Mar 10, 2016 at 12:42:29PM +0530, Neha Rani wrote:
> This is a patch in nvec.c file that fixes a multiline comment found by checkpatch.pl tool
>
> Signed-off-by: Neha Rani <[email protected]>
> ---
> drivers/staging/nvec/nvec.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
> index 4ae44a5..57ad27a 100644
> --- a/drivers/staging/nvec/nvec.c
> +++ b/drivers/staging/nvec/nvec.c
> @@ -508,8 +508,10 @@ static void nvec_rx_completed(struct nvec_chip *nvec)
>
> spin_lock(&nvec->rx_lock);
>
> - /* add the received data to the work list
> - and move the ring buffer pointer to the next entry */
> + /**

One too many '*' characters here, sorry.

2016-03-12 05:50:23

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 2/2] Staging: nvec: fix multiline comment style.

On Sat, Mar 12, 2016 at 10:32:49AM +0530, Neha Rani wrote:
> But it was warned by checkpatch.pl and after modifying, no warning. How can it
> be wrong?

I'll turn it around and ask you how do you know it is correct? :)

hint, it isn't, read Documentation/CodingStyle please.

thanks,

greg k-h