lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 07 May 2018 14:38:20 +0530
From:   kgunda@...eaurora.org
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     kbuild@...org, kbuild-all@...org, bjorn.andersson@...aro.org,
        Lee Jones <lee.jones@...aro.org>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Jingoo Han <jingoohan1@...il.com>,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-leds@...r.kernel.org, linux-arm-msm-owner@...r.kernel.org
Subject: Re: [PATCH V1 3/5] backlight: qcom-wled: Add support for short
 circuit handling

On 2018-05-07 13:36, Dan Carpenter wrote:
> 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
> 
Will fix it in the next series.
> #
> 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
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-arm-msm" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ