All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Srinivas Neeli <srinivas.neeli@xilinx.com>
Cc: michal.simek@xilinx.com, shubhrajyoti.datta@xilinx.com,
	sgoud@xilinx.com, wim@linux-watchdog.org,
	linux-watchdog@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, git@xilinx.com
Subject: Re: [PATCH 1/9] watchdog: of_xilinx_wdt: Add comment to spinlock
Date: Thu, 16 Jan 2020 07:48:15 -0800	[thread overview]
Message-ID: <20200116154815.GA23637@roeck-us.net> (raw)
In-Reply-To: <1579181217-31127-2-git-send-email-srinivas.neeli@xilinx.com>

On Thu, Jan 16, 2020 at 06:56:49PM +0530, Srinivas Neeli wrote:
> From: Srinivas Goud <srinivas.goud@xilinx.com>
> 
> Based on checkpatch every spinlock should be documented.
> The patch is fixing this issue:
> ./scripts/checkpatch.pl --strict -f drivers/watchdog/of_xilinx_wdt.c
> CHECK: spinlock_t definition without comment
> +	spinlock_t spinlock;

One of the most useless feedback messages from checkpatch.

> 
> Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>  drivers/watchdog/of_xilinx_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
> index 7fe4f7c3f7ce..00549164b3d7 100644
> --- a/drivers/watchdog/of_xilinx_wdt.c
> +++ b/drivers/watchdog/of_xilinx_wdt.c
> @@ -40,7 +40,7 @@
>  struct xwdt_device {
>  	void __iomem *base;
>  	u32 wdt_interval;
> -	spinlock_t spinlock;
> +	spinlock_t spinlock; /* spinlock for register handling */

I don't see the added value here. Besides, what does the lock actually do ?
Watchdog drivers are single-open, so it seems quite difficult for any
of the protected functions to be called multiple times. The spinlock doesn't
disable interrupts, so register accesses by other drivers are still possible.
What am I missing ?

Guenter

>  	struct watchdog_device xilinx_wdt_wdd;
>  	struct clk		*clk;
>  };
> -- 
> 2.7.4
> 

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: Srinivas Neeli <srinivas.neeli@xilinx.com>
Cc: linux-watchdog@vger.kernel.org, sgoud@xilinx.com,
	shubhrajyoti.datta@xilinx.com, michal.simek@xilinx.com,
	linux-kernel@vger.kernel.org, git@xilinx.com,
	wim@linux-watchdog.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/9] watchdog: of_xilinx_wdt: Add comment to spinlock
Date: Thu, 16 Jan 2020 07:48:15 -0800	[thread overview]
Message-ID: <20200116154815.GA23637@roeck-us.net> (raw)
In-Reply-To: <1579181217-31127-2-git-send-email-srinivas.neeli@xilinx.com>

On Thu, Jan 16, 2020 at 06:56:49PM +0530, Srinivas Neeli wrote:
> From: Srinivas Goud <srinivas.goud@xilinx.com>
> 
> Based on checkpatch every spinlock should be documented.
> The patch is fixing this issue:
> ./scripts/checkpatch.pl --strict -f drivers/watchdog/of_xilinx_wdt.c
> CHECK: spinlock_t definition without comment
> +	spinlock_t spinlock;

One of the most useless feedback messages from checkpatch.

> 
> Signed-off-by: Srinivas Goud <srinivas.goud@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>  drivers/watchdog/of_xilinx_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c
> index 7fe4f7c3f7ce..00549164b3d7 100644
> --- a/drivers/watchdog/of_xilinx_wdt.c
> +++ b/drivers/watchdog/of_xilinx_wdt.c
> @@ -40,7 +40,7 @@
>  struct xwdt_device {
>  	void __iomem *base;
>  	u32 wdt_interval;
> -	spinlock_t spinlock;
> +	spinlock_t spinlock; /* spinlock for register handling */

I don't see the added value here. Besides, what does the lock actually do ?
Watchdog drivers are single-open, so it seems quite difficult for any
of the protected functions to be called multiple times. The spinlock doesn't
disable interrupts, so register accesses by other drivers are still possible.
What am I missing ?

Guenter

>  	struct watchdog_device xilinx_wdt_wdd;
>  	struct clk		*clk;
>  };
> -- 
> 2.7.4
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-16 15:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16 13:26 [PATCH 0/9] watchdog: of_xilinx_wdt: Update on watchdog driver Srinivas Neeli
2020-01-16 13:26 ` Srinivas Neeli
2020-01-16 13:26 ` [PATCH 1/9] watchdog: of_xilinx_wdt: Add comment to spinlock Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 15:48   ` Guenter Roeck [this message]
2020-01-16 15:48     ` Guenter Roeck
2020-01-16 13:26 ` [PATCH 2/9] watchdog: of_xilinx_wdt: Used BIT macro Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 15:04   ` Guenter Roeck
2020-01-16 15:04     ` Guenter Roeck
2020-01-16 13:26 ` [PATCH 3/9] watchdog: of_xilinx_wdt: Used dev_dbg() Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 13:26 ` [PATCH 4/9] watchdog: of_xilinx_wdt: Initialize watchdog via data structure Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 13:26 ` [PATCH 5/9] watchdog: of_xilinx_wdt: Introduce wdttype enum for identification Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 13:26 ` [PATCH 6/9] dt-bindings: watchdog: xilinx: Add binding for Versal watchdog Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 13:26 ` [PATCH 7/9] watchdog: of_xilinx_wdt: Add Versal support Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 15:07   ` Guenter Roeck
2020-01-16 15:07     ` Guenter Roeck
2020-01-16 13:26 ` [PATCH 8/9] watchdog: of_xilinx_wdt: Wire setting up timeout via module parameter/DT Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2020-01-16 13:26 ` [PATCH 9/9] watchdog: of_xilinx_wdt: Skip printing pointer value Srinivas Neeli
2020-01-16 13:26   ` Srinivas Neeli
2021-03-15 10:46 [PATCH 0/9] watchdog: of_xilinx_wdt: Update on xilinx watchdog driver Srinivas Neeli
2021-03-15 10:46 ` [PATCH 1/9] watchdog: of_xilinx_wdt: Add comment to spinlock Srinivas Neeli
2021-03-15 10:46   ` Srinivas Neeli
2021-03-16  2:21   ` Guenter Roeck
2021-03-16  2:21     ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200116154815.GA23637@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=git@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=sgoud@xilinx.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    --cc=srinivas.neeli@xilinx.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.