Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3913305pxb; Mon, 4 Oct 2021 12:29:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJbG1PcJ2cQI0XSsOMQTQmT4uu/GqHyPlTt1dk/vqK+pM7UT4bibr/J95nTFV5kboE/mT6 X-Received: by 2002:a17:90b:8c:: with SMTP id bb12mr22174538pjb.181.1633375755026; Mon, 04 Oct 2021 12:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633375755; cv=none; d=google.com; s=arc-20160816; b=Akemrd2LyPN9PHXQLT7n1fERYWhoFV4hJXwRRkm8EDZgN0seqlAvUszVPgqdftnvG5 VGyOiaJCshZtvN1LSF0ekAk/4yoIgPLyV1uD2ytz8Zw+Vna3ZDmxpXMD1W3HWkGJeXaF Vot3Suwc/Z3QDYkSekYbB9mr7NtBgdfEirvIFFcSfG6SEC8g8C44JKhlq4IcSqWPYnhw bm0pJWkUR72QjiDWAj6mMtacmE57pooNki7VF0wIuzBeMbj+49GWQuPb46rk3DUCjKdB fIJ0QkcD9s9bE4wIC+jTuCGtnI4gLTgvC5Qyjurn0TEyK1GD41PEfvsSc5cfgMlrWhvr VI3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Masve/pRSnx7KtmDeZRWmJ8fsJbEh8hWqi3Qt2ydQQg=; b=IED/5ByY87l7fZ6KLLzlsass21UANjr2494chCbJMLQm+CL+7Z6zCtwOoKs1Jj1Miu e3VpbR9fdq7h/CjBiiLpUwh8nH++3Xevzv5mOCFj8ADB2244U9UwHfsC/2UiQ1RovvdO LOadghu82963p2c4ghhygusQzFQpkXM4pgn9kSzS/B7H4sFRndAVqo2ZIw0QN3MTVvfq 0kRRxPaY9MUpWBpYoGR/sgS3WJ9Ozsxlv5//vcJjbZ1hvMOjCnkFdoUlg8CqrFPIMKHt xc9L5m2vF3aAQ0UCeu04L89V8WSez8Sqb/WIQMqEgdIH/LDEFPTdaziJs8eCEGNvMwt2 wvhw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t184si18110487pfb.209.2021.10.04.12.29.02; Mon, 04 Oct 2021 12:29:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239089AbhJDT3s (ORCPT + 99 others); Mon, 4 Oct 2021 15:29:48 -0400 Received: from relay03.th.seeweb.it ([5.144.164.164]:53677 "EHLO relay03.th.seeweb.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238957AbhJDT3j (ORCPT ); Mon, 4 Oct 2021 15:29:39 -0400 Received: from Marijn-Arch-PC.localdomain (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 6925B1F69D; Mon, 4 Oct 2021 21:27:48 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Lee Jones , Daniel Thompson , Jingoo Han Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Marijn Suijten , 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: [PATCH 06/10] backlight: qcom-wled: Remove unnecessary 4th default string in wled3 Date: Mon, 4 Oct 2021 21:27:37 +0200 Message-Id: <20211004192741.621870-7-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004192741.621870-1-marijn.suijten@somainline.org> References: <20211004192741.621870-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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