Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1309040rdb; Fri, 19 Jan 2024 15:26:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSAECN7GFSwCitZJKJGozzubeu9GP7Zow/Gag6x1+ItVwLNCjHSw3OzV3yuoRLPyi4RkwY X-Received: by 2002:a17:906:5ac9:b0:a2d:89a3:3c17 with SMTP id x9-20020a1709065ac900b00a2d89a33c17mr260734ejs.110.1705706806910; Fri, 19 Jan 2024 15:26:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705706806; cv=pass; d=google.com; s=arc-20160816; b=UZADo0K4wnBW3Y/AoEJRt/hZiDa+SDQwMY9DKk8rafdziFOK1nR0UpyBhqGDtewTLX a2vGmCH0SGvySW7x2ccikfQVyyCU6uMqAgc/+bcG3o+YFMc9SCj8rafMrBjFrbuRcTiM YmG9dF9Terhf1QhRvTB8dsIf6WxbsJyqE8Um7nGizmVjDXMCDrmUXgPKQTAPqO0FCYEY oN6EyAtn1DRNgZM5TqzV7CgZFRh9BtyX5w/ft5527UIY+f0Ydpp3OiPkY12dTnyuXOTD UxpS3HZ2gsbFMqeK6MDLxWTcLEUIQc7KNFOCp5u8sN3V7EDgND6osXqR+tfq/XG6tnvB xgTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=1wZK+516K0XpuaX6YHVhJjzhdI9/8JfrLsvg1F0YHkg=; fh=qpUYsPYE5MJ5Bn6uU2g9WJtjmebE68qQbRjE8sh3LqY=; b=0WVZizJGIJSOtMsEqZX9weap88no78dNLTFrhFpWRtKkaHTJIkXG/ZvBWmT+FRQdEi wX0AKbznHe2thaYXP7OhmUrUUvnCB70PKnokeIZ6tVcYd1u0aVB9JhBREXTnTEpHyure ID02jyEQmgcNCYVwkcQJ+CQ3iFEKQtJ3PQn022Co160YIcHuVeYkLpv2l24CJb+uD22J 7YXUI+FwczfmzRVEGUfLomhcJfwOgo1M8Du7HX1M3SwYF0WG0fk65ZCK3imwOkijAW8L bjodIyPqOw8EDdWbwSTogOaPkdUnXhcnUUoxAqS8QrqYhUF8w5kqH7lTNaBq3AMRHryc yImw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m9Mey18p; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-31628-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l13-20020a17090612cd00b00a26ac591e55si8231079ejb.129.2024.01.19.15.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 15:26:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31628-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=m9Mey18p; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-31628-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31628-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 71C0B1F22BDC for ; Fri, 19 Jan 2024 23:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A92959148; Fri, 19 Jan 2024 23:26:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m9Mey18p" Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB10B1E484; Fri, 19 Jan 2024 23:26:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705706795; cv=none; b=rzlDXcJdjtajPgI3TN428+muxp1jC0tRsvG7CLkBB5pN7FAaTBdASY02YWuIuxVagoiIwTsJCtF8fp39Du1d0JvV6So9bOHaEpYSa3UkvSsgIBJ5DUARbye9edjfQwbdFBjIE1oVwGJoceljBga4ox6uFJy8+KMgH6f4qXXYxuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705706795; c=relaxed/simple; bh=/b7XbxIYbAPBG+nwiZX8T1zbq6IDXVnJIcZiWY7bUEk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=Ajb7lK8IZsIHkAKzKbRCBaiSywvMuoXF9aiSCwlhfqm0/YkLiBlYfBnqLSc2ifkYKSR9efEUBA8MPeCwyYOd0Se9ZC54bjKmczPGXyaikw+1J2yQwZhJFDb/qQtg7n3rcqBQL26eAVSAeR7fZ7Ys/eb64z8/nMJdK7YHgNE4YGA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=m9Mey18p; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40e7e2e04f0so13535235e9.1; Fri, 19 Jan 2024 15:26:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705706792; x=1706311592; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1wZK+516K0XpuaX6YHVhJjzhdI9/8JfrLsvg1F0YHkg=; b=m9Mey18pW+OJnEWftyltag+ZBF5dZaKjvcQlMwJeIrtb8rrs1ExJB62TxsHfRZaYkk 8Bhrx3DYhy91CLZ/EGyAhaoXd6mclUvhdsSWgE3oErLVEMDkdu2QzvNPpo36l9B1x+d9 O78feCZxUzS8g3BkHmBtBl4BcN0l78sYAOY1RMi+jVJykCcuAwlutxven7yYl69BsQyN A76DYMNGZwcUxzYqH1oCunYsOGJqKJKiM/EhDIZJco5DuFaTxDC2bvJv4rsMk/3h0Uzn TjUfwbVrG6xKcIGgSnmVeh/oCX0o7ORRmT9teLZugy7NbOez2vR5yKS+Ef7oiO/Rv8vp zQhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705706792; x=1706311592; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1wZK+516K0XpuaX6YHVhJjzhdI9/8JfrLsvg1F0YHkg=; b=ldK43NepEJPnwoIx253I63JIpLUBg4unkKc2uOEq1so2S+GMKxSaZ9JOIzhEcndHOC lUNlZSH2MZl94yAdxCryeiaBzuOq8OGBlMTeCm8g78w1oxY7uZS9R8cBdWELJr1O6TFl 6Yp8iqvQxko8oo+U/hmrp3z6/0tkOut9BBsdWpm2ZJZOV+g8eNSSTzzPCZ/mYx0jpjAh iBkmzSqJMrtAQpiKar/TV6WT/8yEK6UrwdapUfgTLkhNRdGY7+J3gpv0Z0Qv+yk+Dmja zvQ0NsiMQHeLBGKa4+Y4FApMbe4anD634XmBA8S+6IxoyDstHL6g4ol7AFmqE/BZAJd9 pHNg== X-Gm-Message-State: AOJu0Yyfl5dv+IX1mvNyN/+/yRhrXASkaS/k341DXSRRfvX3sJhMzRSu l5+v2ER6t5w/3THH0t1o8sENwPRYxY77bleDrfBsdWSKUpmbinLL X-Received: by 2002:a05:600c:4fd3:b0:40e:5581:511a with SMTP id o19-20020a05600c4fd300b0040e5581511amr304286wmq.2.1705706791884; Fri, 19 Jan 2024 15:26:31 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id n4-20020adffe04000000b00339272c885csm360875wrr.87.2024.01.19.15.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 15:26:31 -0800 (PST) From: Colin Ian King To: Pavel Machek , Lee Jones , linux-leds@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] leds: aw200xx: make read-only array coeff_table static const Date: Fri, 19 Jan 2024 23:26:30 +0000 Message-Id: <20240119232630.2752239-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Don't populate the read-only array coeff_table on the stack at run time, instead make it static const. Signed-off-by: Colin Ian King --- drivers/leds/leds-aw200xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c index f584a7f98fc5..6c8c9f2c19e3 100644 --- a/drivers/leds/leds-aw200xx.c +++ b/drivers/leds/leds-aw200xx.c @@ -282,7 +282,7 @@ static int aw200xx_set_imax(const struct aw200xx *const chip, u32 led_imax_uA) { u32 g_imax_uA = aw200xx_imax_to_global(chip, led_imax_uA); - u32 coeff_table[] = {1, 2, 3, 4, 6, 8, 12, 16}; + static const u32 coeff_table[] = {1, 2, 3, 4, 6, 8, 12, 16}; u32 gccr_imax = UINT_MAX; u32 cur_imax = 0; int i; -- 2.39.2