Received: by 10.192.165.148 with SMTP id m20csp2802053imm; Mon, 7 May 2018 01:08:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoaa9J06j7HIk27PvnkTuYx1s16XSXUVp9y7wBAxdX3xwV2Tgj3eW1Rfu27iM9QV8dMn5WK X-Received: by 2002:a17:902:3343:: with SMTP id a61-v6mr26812201plc.241.1525680521647; Mon, 07 May 2018 01:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525680521; cv=none; d=google.com; s=arc-20160816; b=gItp8w0yXn9vfjzhHbbJEbOOZDrYoHLNfxShuP+kCtg7ssxiicTAHDrq27p1zJGeUo 9aNenFxRXhb5d2AA07PopfrKz3iVVkazTv4Sj5OWGCtRfbwTY0yK2puyyBaxQVMw9xXY PGR10VGtRo/+QuJM84gIlynKrNTBC7b0lkOuauxGDxLOjYGDuKbah0MMKGyA/CfpOyrN 4Iqmam5tktT6z22xIVYhR55sEjtySdhtZIHltxmemlE2mpXC1ywG6J92pJIiN4GKeBeM 5Q7THkGYBRQYnGIi6PIfKVCnmhvFazEmozkkwo6xUM3stOCCGksUpv0eHGumK+P0ymi9 xkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=+RKhvPH47XXrGqlY7Rv+XBGrtYY7osIlolIq8qszdp0=; b=NUlBxtj857bbgyWI5coj31yjJEmXXAuMarJZGC6i0dTtUKai8tZsKF5ZRS/DPrhR0f UlsnDUOkvJHmBRH+GOZ/iWnt3bt1QC/Ftxk1JvlBZCw3yD+eCJnvmkAsq/+xz2juD2bq S1AtHydXm9tKTqQDjQnewi+wPrcMep8Q3aMrN0A4FgrW2lh9XhuLfP0Qmu8/LXs3jLzA cniKYKrHiQ7IXc36DhmFy02NLkmtapONh+d1SsTRsu7vnHbEeLrLALHJBOcWakxBtqir Yz1bAekhwf/sf+FEqzqmD5B4FPa0KiBkdGA41Glj7YbJrCwm/7m7YzUNhaKOgFbRKIMN GGDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=wGymstiu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22-v6si5526821pgv.333.2018.05.07.01.08.26; Mon, 07 May 2018 01:08:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=wGymstiu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbeEGIHg (ORCPT + 99 others); Mon, 7 May 2018 04:07:36 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:40050 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751941AbeEGIHB (ORCPT ); Mon, 7 May 2018 04:07:01 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w4781UBL114131; Mon, 7 May 2018 08:06:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=+RKhvPH47XXrGqlY7Rv+XBGrtYY7osIlolIq8qszdp0=; b=wGymstiuoSSzFPJt/Xcj79TxxXGrBnw6U1M9uAsbEoj8iPW18HZK6dwFebIukCrggaTD o7mDwa2s0hUJ/Fh4aMe80q5bmrC3i1tjkZjZPHzasdpZ8R/dvPMHkfGLKx0VvRK16AJl Bi3wJn1+Ip549cJKAiYwRzd51ww611PYkTl862j7CXDNBxaC9Ff/o9cFieQ54G8HhWsc h6205wbRv6U0Xzt51kkTLDX51BV7rj3FzBrH0PYA87MO1XZzM9xnalJl2+IKs3nQxdf8 TgvJT/AIHQRTDNgLC1Nqr3jtnKLxjLmMLbdAsUeMbmE1/eGXJPo45A9j2DZoBRxAsQ8N dw== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2hs4k233gw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 07 May 2018 08:06:50 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w4786nhp030406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 7 May 2018 08:06:49 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w4786m3T016526; Mon, 7 May 2018 08:06:48 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 07 May 2018 01:06:47 -0700 Date: Mon, 7 May 2018 11:06:38 +0300 From: Dan Carpenter To: kbuild@01.org, Kiran Gunda Cc: kbuild-all@01.org, bjorn.andersson@linaro.org, Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , 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 Subject: Re: [PATCH V1 3/5] backlight: qcom-wled: Add support for short circuit handling Message-ID: <20180507080638.enmel5keygu5ag3h@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525341432-15818-4-git-send-email-kgunda@codeaurora.org> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8885 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1805070084 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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