Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4405062pxb; Tue, 5 Oct 2021 02:23:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJgSpF2yz9kzL7aWYtSJoOPSlAbfndy6sNen2ZgOoEwuvgiup1RQZaHAxhQN4P2elv0vyE X-Received: by 2002:a62:e507:0:b0:44c:6222:3554 with SMTP id n7-20020a62e507000000b0044c62223554mr9535748pff.13.1633425793673; Tue, 05 Oct 2021 02:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633425793; cv=none; d=google.com; s=arc-20160816; b=oh5JmCMu2ILY3VwTj38qbCKKEGjDtGvbXgTXJxaaBhJ2pLPCKnHaQyx4IbY1NHrAHn lI0Sz2lRmVw0lqQblbQ207KB5GNJBE/thNgMgfl2fUVvkr9mGpHVypcOFnjOjCHVTTi2 w5oOTPSyQOuRHN6LjuL9mF58uMb+Gi4zyi1jDn/xf/8zW0CeHj5b2kXaOTl5x9f3Y1Sq EGoCi+4r63KhtunjoxjHR9aIoTbQ/3qgfDmcIK67D9tGlI+XXL3J4QXB4gkipe1XdiQq r0/+QvVLn8Bron2BpeYleVtTWTW3H5B2c72kbzn/8Twd5TJaCwZ3U+qSKQ2Wyv2p0svA lhLA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7gKDpwbZLaAcnMd5IdgFrDWDVBJ3bkgLfDyEEukPWNE=; b=z06l529S2MqzZgEMb2INLvN6ftUjsSd2Kq4VgFLTLKg3EnO6K4qMycYHpKM3AoYCO9 AORC957S9RqqtiI1sIdn/mFcNjluWrztqbw9BpBsLXULOdBTUquZdvYoL8/sL0DwoSum 5UbvFXJumvhqGbpS1NDxe8omtc6Hy+SPuQXDtbY0bkWs6IUz+Q7BDwObTI+G6RSbwj9x bBSI+9x19fLaZgxTFjerr2MmWI5pyKSSvg7YipzU9YgxAa10mMpH0exwH+JXhbl9K5WA IYoX0R0Q37oWBwJ1P6jwZWnkwxmxK+ZMmM6XMV+kCmVLKRKhCEB9zA+M4nHCUtqnTqQ2 dF4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EyEMINoz; 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 q1si8690315pgl.102.2021.10.05.02.23.01; Tue, 05 Oct 2021 02:23:13 -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=EyEMINoz; 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 S233693AbhJEJWf (ORCPT + 99 others); Tue, 5 Oct 2021 05:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233645AbhJEJWb (ORCPT ); Tue, 5 Oct 2021 05:22:31 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53C36C061755 for ; Tue, 5 Oct 2021 02:20:41 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id p21so6058776wmq.1 for ; Tue, 05 Oct 2021 02:20:41 -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:in-reply-to; bh=7gKDpwbZLaAcnMd5IdgFrDWDVBJ3bkgLfDyEEukPWNE=; b=EyEMINozBywEEeiMAn8tEaNJqnso4K/VdIluVrInmf4Z4p+RxZlX6ZeIjbefpWwAr7 ri2MFbWfElAGCwEs03Vpbi8qMwAYOwL/DiaPID6X3fS0okD9X19kly4G7CUdpL1m3UmR iM9ZdkliFcBpWB4v6zDFSlg7MnGvIJGjUe3MBZCFeNPmXtZN6qnyhq+DVCTEuZlDzhhH 5qiFZFFj6xNwdxFb++jgfGEc3Ro51h6QPZ8ynuEk8nZ15sjlyW7vwh86EZ1OS+Poc3Iw XjExL+D1Hn6QHeiCzPfqkoRaXG0hVFxf6U7BiVS97QBdIOjgK9cKu9jsJxClDf/b+Kh7 elpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7gKDpwbZLaAcnMd5IdgFrDWDVBJ3bkgLfDyEEukPWNE=; b=gq8T0KFsapx1SqRDMr+rIhC1OTVM2bXZICZhd75WQQXa9FxcfnXdqgt3mSwdnI4xN6 g1BDxYS2kPoOpzpgyzPMe/XkKF5n3lgFAFNovV8YX2OgdZ1Ex9kpodHG8XI913APd0Pa CtjmxJfh3HGeA+4fTyV/oCn+D/hVjy4zkpV0s9BYnhNzB3u6oiCkFiyjghu2IptMQ06w RmpbKmNrH0nRnjX4Gj9Q2rVmkJIgLMKWFgLFr/70fo0rFeoZ59RsyM94uzJ8LA7O6kZ3 gDU0IrytzCUknSIdjx9Y9toMVG6KVXWN0LqZpT9RxGVEw3Mq421tVYFg45Udqh5zH6rS GkzQ== X-Gm-Message-State: AOAM5323NMEk9JUhcQsb2p589EcioDBpU3ulIFJ9VeCTFE8twmYMxBSA IIgsj+v8Iz+guHPvk2hl6Z3HlA== X-Received: by 2002:a7b:cc14:: with SMTP id f20mr2142080wmh.137.1633425639863; Tue, 05 Oct 2021 02:20:39 -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 d8sm18118248wrv.80.2021.10.05.02.20.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 02:20:39 -0700 (PDT) Date: Tue, 5 Oct 2021 10:20:36 +0100 From: Daniel Thompson To: Marijn Suijten Cc: phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Lee Jones , Jingoo Han , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Kiran Gunda , Courtney Cavin , Bryan Wu , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/10] backlight: qcom-wled: Remove unnecessary 4th default string in wled3 Message-ID: <20211005092036.yuttwrjhvnkkhyhr@maple.lan> References: <20211004192741.621870-1-marijn.suijten@somainline.org> <20211004192741.621870-7-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211004192741.621870-7-marijn.suijten@somainline.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 04, 2021 at 09:27:37PM +0200, Marijn Suijten wrote: > The previous commit improves num_strings parsing to not go over the > maximum of 3 strings for wled3 anymore. Likewise this default index for > a hypothetical 4th string is invalid and could access registers that are > not mapped to the desired purpose. > Removing this value gets rid of undesired confusion and avoids the > possibility of accessing registers at this offset even if the 4th array > element is used by accident. > > Signed-off-by: Marijn Suijten > Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Daniel Thompson > --- > drivers/video/backlight/qcom-wled.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c > index 66ce77ee3099..9ec1bdd374d2 100644 > --- a/drivers/video/backlight/qcom-wled.c > +++ b/drivers/video/backlight/qcom-wled.c > @@ -946,7 +946,7 @@ static const struct wled_config wled3_config_defaults = { > .cs_out_en = false, > .ext_gen = false, > .cabc = false, > - .enabled_strings = {0, 1, 2, 3}, > + .enabled_strings = {0, 1, 2}, > }; > > static int wled4_setup(struct wled *wled) > -- > 2.33.0 >