All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod <vkoul@kernel.org>
To: Kiran Gunda <kgunda@codeaurora.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	b.zolnierkie@samsung.com, jingoohan1@gmail.com,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	bjorn.andersson@linaro.org, linux-leds@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, lee.jones@linaro.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling
Date: Wed, 20 Jun 2018 11:17:22 +0530	[thread overview]
Message-ID: <20180620054722.GH13316@vkoul-mobl> (raw)
In-Reply-To: <1529406822-15379-7-git-send-email-kgunda@codeaurora.org>

On 19-06-18, 16:43, Kiran Gunda wrote:

>  struct wled {
>  	const char *name;
>  	struct device *dev;
>  	struct regmap *regmap;
> +	struct mutex lock;	/* Lock to avoid race from ISR */

the comment is wrong as you avoid race with thread handler and not the
main ISR. The ISR runs in atomic context so you cant use a mutex but you
may do so with a thread handler

> +#define WLED_SHORT_DLY_MS			20
> +#define WLED_SHORT_CNT_MAX			5
> +#define WLED_SHORT_RESET_CNT_DLY_US		USEC_PER_SEC

an empty line after defines would be better

> +static int wled_configure_short_irq(struct wled *wled,
> +				    struct platform_device *pdev)
> +{
> +	int rc = 0, short_irq;

superfluous initialization of rc

-- 
~Vinod
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Vinod <vkoul@kernel.org>
To: Kiran Gunda <kgunda@codeaurora.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	b.zolnierkie@samsung.com, jingoohan1@gmail.com,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	bjorn.andersson@linaro.org, linux-leds@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, lee.jones@linaro.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling
Date: Wed, 20 Jun 2018 05:59:22 +0000	[thread overview]
Message-ID: <20180620054722.GH13316@vkoul-mobl> (raw)
In-Reply-To: <1529406822-15379-7-git-send-email-kgunda@codeaurora.org>

On 19-06-18, 16:43, Kiran Gunda wrote:

>  struct wled {
>  	const char *name;
>  	struct device *dev;
>  	struct regmap *regmap;
> +	struct mutex lock;	/* Lock to avoid race from ISR */

the comment is wrong as you avoid race with thread handler and not the
main ISR. The ISR runs in atomic context so you cant use a mutex but you
may do so with a thread handler

> +#define WLED_SHORT_DLY_MS			20
> +#define WLED_SHORT_CNT_MAX			5
> +#define WLED_SHORT_RESET_CNT_DLY_US		USEC_PER_SEC

an empty line after defines would be better

> +static int wled_configure_short_irq(struct wled *wled,
> +				    struct platform_device *pdev)
> +{
> +	int rc = 0, short_irq;

superfluous initialization of rc

-- 
~Vinod

WARNING: multiple messages have this Message-ID (diff)
From: Vinod <vkoul@kernel.org>
To: Kiran Gunda <kgunda@codeaurora.org>
Cc: bjorn.andersson@linaro.org, jingoohan1@gmail.com,
	lee.jones@linaro.org, b.zolnierkie@samsung.com,
	dri-devel@lists.freedesktop.org,
	Daniel Thompson <daniel.thompson@linaro.org>,
	linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling
Date: Wed, 20 Jun 2018 11:17:22 +0530	[thread overview]
Message-ID: <20180620054722.GH13316@vkoul-mobl> (raw)
In-Reply-To: <1529406822-15379-7-git-send-email-kgunda@codeaurora.org>

On 19-06-18, 16:43, Kiran Gunda wrote:

>  struct wled {
>  	const char *name;
>  	struct device *dev;
>  	struct regmap *regmap;
> +	struct mutex lock;	/* Lock to avoid race from ISR */

the comment is wrong as you avoid race with thread handler and not the
main ISR. The ISR runs in atomic context so you cant use a mutex but you
may do so with a thread handler

> +#define WLED_SHORT_DLY_MS			20
> +#define WLED_SHORT_CNT_MAX			5
> +#define WLED_SHORT_RESET_CNT_DLY_US		USEC_PER_SEC

an empty line after defines would be better

> +static int wled_configure_short_irq(struct wled *wled,
> +				    struct platform_device *pdev)
> +{
> +	int rc = 0, short_irq;

superfluous initialization of rc

-- 
~Vinod

  parent reply	other threads:[~2018-06-20  5:47 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 11:13 [PATCH V3 0/7] backlight: qcom-wled: Support for QCOM wled driver Kiran Gunda
2018-06-19 11:13 ` [PATCH V3 1/7] backlight: qcom-wled: Rename pm8941-wled.c to qcom-wled.c Kiran Gunda
2018-06-19 11:25   ` Kiran Gunda
2018-06-19 22:54   ` Bjorn Andersson
2018-06-19 22:54     ` Bjorn Andersson
2018-06-20  5:23     ` kgunda
2018-06-20  5:35       ` kgunda
2018-06-20 18:27   ` Rob Herring
2018-06-20 18:27     ` Rob Herring
2018-06-20 18:27     ` Rob Herring
2018-06-21 13:05   ` Daniel Thompson
2018-06-21 13:05     ` Daniel Thompson
2018-06-21 13:05     ` Daniel Thompson
2018-06-21 13:12     ` Daniel Thompson
2018-06-21 13:12       ` Daniel Thompson
2018-06-21 13:12       ` Daniel Thompson
2018-06-19 11:13 ` [PATCH V3 2/7] backlight: qcom-wled: restructure the qcom-wled bindings Kiran Gunda
2018-06-19 22:56   ` Bjorn Andersson
2018-06-20 18:29   ` Rob Herring
2018-06-20 18:29     ` Rob Herring
2018-06-21 13:12   ` Daniel Thompson
2018-06-21 13:12     ` Daniel Thompson
2018-06-19 11:13 ` [PATCH V3 3/7] backlight: qcom-wled: Add new properties for PMI8998 Kiran Gunda
2018-06-19 23:03   ` Bjorn Andersson
2018-06-20  5:25     ` kgunda
2018-06-20 19:05   ` Rob Herring
2018-06-20 19:05     ` Rob Herring
2018-06-21  5:14     ` kgunda
2018-06-19 11:13 ` [PATCH V3 4/7] backlight: qcom-wled: Rename PM8941* to WLED3 Kiran Gunda
2018-06-19 11:25   ` Kiran Gunda
2018-06-19 23:11   ` Bjorn Andersson
2018-06-19 23:11     ` Bjorn Andersson
2018-06-20  6:26     ` kgunda
2018-06-20  6:38       ` kgunda
2018-06-19 11:13 ` [PATCH V3 5/7] backlight: qcom-wled: Add support for WLED4 peripheral Kiran Gunda
2018-06-19 11:25   ` Kiran Gunda
2018-06-20  5:14   ` Bjorn Andersson
2018-06-20  5:14     ` Bjorn Andersson
2018-06-20 11:00     ` kgunda
2018-06-20 11:12       ` kgunda
2018-06-22 23:09       ` Bjorn Andersson
2018-06-22 23:09         ` Bjorn Andersson
2018-06-25  5:54         ` kgunda
2018-06-25  6:06           ` kgunda
2018-06-19 11:13 ` [PATCH V3 6/7] backlight: qcom-wled: add support for short circuit handling Kiran Gunda
2018-06-19 11:25   ` Kiran Gunda
2018-06-20  5:33   ` Bjorn Andersson
2018-06-20  5:33     ` Bjorn Andersson
2018-06-20  5:47   ` Vinod [this message]
2018-06-20  5:59     ` Vinod
2018-06-20  5:47     ` Vinod
2018-06-20 11:03     ` kgunda
2018-06-20 11:15       ` kgunda
2018-06-19 11:13 ` [PATCH V3 7/7] backlight: qcom-wled: Add auto string detection logic Kiran Gunda
2018-06-19 11:25   ` Kiran Gunda
2018-06-20  6:22   ` Bjorn Andersson
2018-06-20  6:22     ` Bjorn Andersson
2018-06-20 12:37     ` kgunda
2018-06-20 12:49       ` kgunda

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=20180620054722.GH13316@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.thompson@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=kgunda@codeaurora.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.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.