LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Kiran Gunda <kgunda@codeaurora.org>
Cc: kbuild-all@01.org, bjorn.andersson@linaro.org,
	Lee Jones <lee.jones@linaro.org>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-leds@vger.kernel.org, Kiran Gunda <kgunda@codeaurora.org>
Subject: Re: [PATCH V1 3/5] backlight: qcom-wled: Add support for short circuit handling
Date: Mon, 7 May 2018 11:06:38 +0300	[thread overview]
Message-ID: <20180507080638.enmel5keygu5ag3h@mwanda> (raw)
In-Reply-To: <1525341432-15818-4-git-send-email-kgunda@codeaurora.org>

Hi Kiran,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on backlight/for-backlight-next]
[also build test WARNING on v4.17-rc3 next-20180504]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Kiran-Gunda/backlight-qcom-wled-Support-for-QCOM-wled-driver/20180504-011042
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git for-backlight-next

smatch warnings:
drivers/video/backlight/qcom-wled.c:304 wled_update_status() warn: inconsistent returns 'mutex:&wled->lock'.
  Locked on:   line 287
  Unlocked on: line 304

# https://github.com/0day-ci/linux/commit/3856199804123df89ef9a712f0740978ec71ddf6
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 3856199804123df89ef9a712f0740978ec71ddf6
vim +304 drivers/video/backlight/qcom-wled.c

18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  263  
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  264  static int wled_update_status(struct backlight_device *bl)
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  265  {
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  266  	struct wled *wled = bl_get_data(bl);
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  267  	u16 brightness = bl->props.brightness;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  268  	int rc = 0;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  269  
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  270  	if (bl->props.power != FB_BLANK_UNBLANK ||
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  271  	    bl->props.fb_blank != FB_BLANK_UNBLANK ||
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  272  	    bl->props.state & BL_CORE_FBBLANK)
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  273  		brightness = 0;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  274  
38561998 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  275  	mutex_lock(&wled->lock);
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  276  	if (brightness) {
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  277  		rc = wled->wled_set_brightness(wled, brightness);
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  278  		if (rc < 0) {
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  279  			dev_err(wled->dev, "wled failed to set brightness rc:%d\n",
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  280  				rc);
38561998 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  281  			goto unlock_mutex;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  282  		}
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  283  
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  284  		rc = wled->wled_sync_toggle(wled);
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  285  		if (rc < 0) {
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  286  			dev_err(wled->dev, "wled sync failed rc:%d\n", rc);
93c64f1e drivers/leds/leds-pm8941-wled.c     Courtney Cavin 2015-03-12  287  			return rc;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  288  		}
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  289  	}
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  290  
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  291  	if (!!brightness != !!wled->brightness) {
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  292  		rc = wled_module_enable(wled, !!brightness);
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  293  		if (rc < 0) {
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  294  			dev_err(wled->dev, "wled enable failed rc:%d\n", rc);
38561998 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  295  			goto unlock_mutex;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  296  		}
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  297  	}
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  298  
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  299  	wled->brightness = brightness;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  300  
38561998 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  301  unlock_mutex:
38561998 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  302  	mutex_unlock(&wled->lock);
38561998 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  303  
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03 @304  	return rc;
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  305  }
18e7abb8 drivers/video/backlight/qcom-wled.c Kiran Gunda    2018-05-03  306  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

  reply	other threads:[~2018-05-07  8:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03  9:57 [PATCH V1 0/5] backlight: qcom-wled: Support for QCOM wled driver Kiran Gunda
2018-05-03  9:57 ` [PATCH V1 1/5] qcom: wled: Rename pm8941-wled.c to qcom-wled.c Kiran Gunda
2018-05-07 15:41   ` Bjorn Andersson
2018-05-10 11:10   ` Pavel Machek
2018-05-03  9:57 ` [PATCH V1 2/5] backlight: qcom-wled: Add support for WLED4 peripheral Kiran Gunda
2018-05-07 16:20   ` Bjorn Andersson
2018-05-08 10:25     ` kgunda
2018-05-08 17:17       ` Bjorn Andersson
2018-05-09  5:15         ` kgunda
2018-05-17  9:47       ` kgunda
2018-05-17 12:31         ` Rob Herring
2018-05-17 15:10           ` kgunda
2018-05-18 12:20             ` Rob Herring
2018-05-14 16:57   ` Pavel Machek
2018-05-15  4:55     ` kgunda
2018-05-03  9:57 ` [PATCH V1 3/5] backlight: qcom-wled: Add support for short circuit handling Kiran Gunda
2018-05-07  8:06   ` Dan Carpenter [this message]
2018-05-07  9:08     ` kgunda
2018-05-07 17:06   ` Bjorn Andersson
2018-05-08 10:35     ` kgunda
2018-05-03  9:57 ` [PATCH V1 4/5] backlight: qcom-wled: Add support for OVP interrupt handling Kiran Gunda
2018-05-07 17:21   ` Bjorn Andersson
2018-05-08 12:26     ` kgunda
2018-05-08 17:19       ` Bjorn Andersson
2018-05-09  5:06         ` kgunda
2018-05-09  6:16           ` kgunda
2018-05-03  9:57 ` [PATCH V1 5/5] backlight: qcom-wled: Add auto string detection logic Kiran Gunda
2018-05-07 18:10   ` Bjorn Andersson
2018-05-09  7:14     ` kgunda
2018-05-14 17:02       ` Bjorn Andersson
2018-05-15  4:50         ` 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=20180507080638.enmel5keygu5ag3h@mwanda \
    --to=dan.carpenter@oracle.com \
    --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=kbuild-all@01.org \
    --cc=kbuild@01.org \
    --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 \
    --subject='Re: [PATCH V1 3/5] backlight: qcom-wled: Add support for short circuit handling' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).