Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4098065pxf; Tue, 23 Mar 2021 02:36:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7pqBvS6gyzMsbYyy6ccJ6IUqCXPcXetu0qFnDW4ZGbmxC9gkZBlDKYfLXuY5TvqZLxxcC X-Received: by 2002:aa7:dc15:: with SMTP id b21mr3720628edu.350.1616492174405; Tue, 23 Mar 2021 02:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616492174; cv=none; d=google.com; s=arc-20160816; b=00U4kHBGs/pQgXL60ngZK+CIaoJP8mDJn0b9XhNemXKgvgoEeWvv/BXu3ARX30qmhr Vp/CXTVJpMaMuKTHYZHs+Lut6OMPWlsdwiqCoddzxoD6uvdBwO2ZASHOr6AtdLeFmwxv CIjnaRUbmjaZt0y5ne2xfNUj9+8IydKuIs5/k90m5kD0ygnT2jDlRQHZYEd1vd4hpDGO mq2thc93chLr7FtTHRhVd3+50T7yz6hSI2AA7IkrmxoGORGr5ArG/KQ98s9TLox7njDL s1IU7Dgq1yd34npDnB/9Whjex1mHI0AwCJsuaxYKWOlRyZghpbQHr6JZJXqYv0RKFyPy HPzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tTpXq5PUWIqX4hPmnIy2Ebapp61tLCl5gNQ4F1z/chY=; b=iVVXy0pkaQhoJ5uKKtQgFTz9PR5iaYdPd/2nEfHbnbanbQlGGE6wyXNf0rzplbY2Tz NqbCtSgUJhKCZmECFhem9CIz6k8VXtnhLzyHyJpaais1mhq1+y9QeOJnOXifWHvcuFmN ym4jI6Ix/wqRqX2L5ckw/i9PPs124gdgtqCrbyD8wZ9eaQreFtXdX7KFJ7WHgYI08Pxr fHdRbTUuTALwaMwca7PR7Jjzf5kCGiy7xS8bQDsY7lkKARqcesbOA6BzMZVwCI2Hd9Pn yKjUeWT32Yn0OELE2xhFFZE2ZLPXjE/4H/nxvp/SeDxw1zajYBSvs/ZVDVkGkYA267Jb LV7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TNAB+pss; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s20si12995621edu.53.2021.03.23.02.35.52; Tue, 23 Mar 2021 02:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TNAB+pss; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229986AbhCWJea (ORCPT + 99 others); Tue, 23 Mar 2021 05:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229592AbhCWJeJ (ORCPT ); Tue, 23 Mar 2021 05:34:09 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F02A8C061756 for ; Tue, 23 Mar 2021 02:34:08 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id l18so14446787edc.9 for ; Tue, 23 Mar 2021 02:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=tTpXq5PUWIqX4hPmnIy2Ebapp61tLCl5gNQ4F1z/chY=; b=TNAB+pss73oHQ0QY6wXA30Om65d0gL0aeIHBCFOk3CPqvHPRnnK4QRFP7SGztJPHLl moJkX27GJrSknpDeDTFKd/kUZj7xJrS0Y0nF8cNGfHetxCLjleifYCzl8becBmOCgEoZ jVT6XETkXUpmfJANhCN1wnO3v90XU1347aaeICKefMdjFUlN3e23stBSL08GopcesT8M c3mGnxxNSXQu4ElTDtXZLxo9nDvPT5WK8ZAixzcqcmDcf/uSam8+YbffgHjnVh42hIEp KzSYKmG04FyT9UkHXN5+V0Zw6ms12V8a4igrSpVxmYB0UpJD5T29oKcFA8SxylbP5eri ZTSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=tTpXq5PUWIqX4hPmnIy2Ebapp61tLCl5gNQ4F1z/chY=; b=QhBJoQLi228vdZ/TFDAeEf/Fy2lc/sageyT+buLAqALvK73VOJQAoxV/wtFnrB+pOP AjW/hOdd1Xc7oAz+4/2zrdbG0KEOWQJq9GFMjPrZyfof2B6NkuY75JYLGUN5m+stzE6e gHjKTjYBgij/uDVSX045RExFz34X2Mr8lSqkiPp5M00e60G6iQZWZE5UJM0A6Yw19ojE YxpmLj8sIXOAFrqL0aYra6pZl+XUkEqOdoFtEvn1wHfiNk0JvYdmlS4hTDjK+3Dp7fJ1 RaxhZx2KGslhSS1lDaWUq6fPKE2X4fYxh7SsAYRVlBNAS8rwznZWk2xv8PHpz4rdNnRm MaRA== X-Gm-Message-State: AOAM5326Zrb19YrEULBhHaNvUjlY/5NqLoJI1s83yTDG5l2yMj88z+SQ 2woe3WmTn/kdyp+IvmrT9I4H8Q== X-Received: by 2002:a05:6402:b31:: with SMTP id bo17mr3643742edb.113.1616492047679; Tue, 23 Mar 2021 02:34:07 -0700 (PDT) Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id da17sm12803300edb.83.2021.03.23.02.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 02:34:07 -0700 (PDT) Date: Tue, 23 Mar 2021 09:34:05 +0000 From: Daniel Thompson To: Arnd Bergmann Cc: Lee Jones , Jingoo Han , Kristoffer Ericson , Richard Purdie , Arnd Bergmann , Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] backlight: journada720: fix Wmisleading-indentation warning Message-ID: <20210323093405.dp37pgnmxbpqsiif@maple.lan> References: <20210322164134.827091-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210322164134.827091-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 05:41:28PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > With gcc-11, we get a warning about code that looks correct > but badly indented: > > drivers/video/backlight/jornada720_bl.c: In function ‘jornada_bl_update_status’: > drivers/video/backlight/jornada720_bl.c:66:11: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation] > 66 | } else /* turn on backlight */ > | ^~~~ > > Change the formatting according to our normal conventions. > > Fixes: 13a7b5dc0d17 ("backlight: Adds HP Jornada 700 series backlight driver") > Signed-off-by: Arnd Bergmann I'm dubious that the re-indent matches the original authors intent... but it certainly does match what was actually written and tested so on that basis: Reviewed-by: Daniel Thompson Daniel. --- > drivers/video/backlight/jornada720_bl.c | 44 ++++++++++++------------- > 1 file changed, 22 insertions(+), 22 deletions(-) > > diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c > index 996f7ba3b373..066d0dc98f60 100644 > --- a/drivers/video/backlight/jornada720_bl.c > +++ b/drivers/video/backlight/jornada720_bl.c > @@ -66,30 +66,30 @@ static int jornada_bl_update_status(struct backlight_device *bd) > } else /* turn on backlight */ > PPSR |= PPC_LDD1; > > - /* send command to our mcu */ > - if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) { > - dev_info(&bd->dev, "failed to set brightness\n"); > - ret = -ETIMEDOUT; > - goto out; > - } > + /* send command to our mcu */ > + if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) { > + dev_info(&bd->dev, "failed to set brightness\n"); > + ret = -ETIMEDOUT; > + goto out; > + } > > - /* > - * at this point we expect that the mcu has accepted > - * our command and is waiting for our new value > - * please note that maximum brightness is 255, > - * but due to physical layout it is equal to 0, so we simply > - * invert the value (MAX VALUE - NEW VALUE). > - */ > - if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness) > - != TXDUMMY) { > - dev_err(&bd->dev, "set brightness failed\n"); > - ret = -ETIMEDOUT; > - } > + /* > + * at this point we expect that the mcu has accepted > + * our command and is waiting for our new value > + * please note that maximum brightness is 255, > + * but due to physical layout it is equal to 0, so we simply > + * invert the value (MAX VALUE - NEW VALUE). > + */ > + if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness) > + != TXDUMMY) { > + dev_err(&bd->dev, "set brightness failed\n"); > + ret = -ETIMEDOUT; > + } > > - /* > - * If infact we get an TXDUMMY as output we are happy and dont > - * make any further comments about it > - */ > + /* > + * If infact we get an TXDUMMY as output we are happy and dont > + * make any further comments about it > + */ > out: > jornada_ssp_end(); > > -- > 2.29.2 >