Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp755023lqh; Sun, 5 May 2024 00:04:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCeewTk9ySm3mVO7OHRsA57fstlHNL6GkAnaD+HZcwEVD8UBfGd88+rjgRtpzmqYcmcQS0MdF3H1n/rCJHLsZbeGuhRglnOOmXrWXyBg== X-Google-Smtp-Source: AGHT+IEaiGLzHFh5WRyVrUTThjCP//iwm1CXc+iMhMKGBvnBHtBEZwb4Q92esNFJjWVB4VTw76Yc X-Received: by 2002:a05:6a00:1897:b0:6ec:fdcc:40b9 with SMTP id x23-20020a056a00189700b006ecfdcc40b9mr9126932pfh.9.1714892656073; Sun, 05 May 2024 00:04:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714892656; cv=pass; d=google.com; s=arc-20160816; b=DaJM13r0T7GYI4bIJX9LpnPCBoRMH1mzG/UEk/r/PmjdeLnkThW1pQ+R2L+l1dXi+T fd7f5SUgJ9nnvGu2Gm3b1gshQem7tdYChBgMyENE4/n4SmzPztBdAaJKiMfBI/F5NHTg xa4b5c6sezM6GW95x3032VtGcMI2yPh+9uVLPQIneWS0unXLnVnjYTcAFNdXbcpGxZbq F8gIqDvhF6JZFos1ZDWyrhfosRHs5FASQD9LoKvDZskfTzCk71Nk2vIHYZMSfOlurY86 19e8NgPDQQRLT3y17pY1RUFwBCi7XwLLAFoZ2Qwq8F4a8qAzQFHCOmIwFvdZqQy7xmJ+ t79g== 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=DBQKhsJ4mDyVp3IvupeuQ5SJkA9A1uQpu4XWLEOftUw=; fh=hwo6l1D8TCoKQDo7Dsktn38eTL21agLBBgMpM/5fuJU=; b=IppXFS/s4x/9nmacHoCNwfHuHnU3tcshocE5HBtlJwN51ZoWYnKVLR2kB5TBXGJ5oQ g5rMR+jT+UeQ+U4iwS0NALLmVpYwaX+jMvo/htaJrbPN50KmcOSefiss7IWzyxDiWuTT wn/cojJD2AO3D0TbOm800StdgAocDzfJBPhxtOPwoiSnLOkPw2nIAYkhxLZCW9/2MnGi 2wQpey17iTWmsJquLXrpD/jGXs4zyB4zKacOMLEA1IYqHXLpDDf2Hpp/n6hHpaisgnHZ zAR7fh7hvVecJOHybj8Pg2IFpobM/vjUtxxzQKMcWWITNEnFDV87HIHGpZ9WFXs9gavJ P6jA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=VtxyHnJG; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-168907-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168907-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ld6-20020a056a004f8600b006f478b16b82si84636pfb.47.2024.05.05.00.04.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 00:04:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168907-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=VtxyHnJG; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-168907-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168907-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4EEE6B213C2 for ; Sun, 5 May 2024 07:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 152726FBE; Sun, 5 May 2024 07:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="VtxyHnJG" Received: from msa.smtpout.orange.fr (smtp-73.smtpout.orange.fr [80.12.242.73]) (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 CEDB263A5; Sun, 5 May 2024 07:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714892634; cv=none; b=AN0A3jiCB6I1Ew3LSSOG5cFNDWg/H+4bi79ACAvZfuaAKlztuFaHHxnauAh1PiGlOVySm4BWe8haO6qkk6VYmQM55ikl82ldLg2vgioOdce583PTRQ2iWd6UfDyHx4rPEeBCbsv2mqAYd3j8+rOnEVnvV+5aqbSmkUpH+anNABg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714892634; c=relaxed/simple; bh=f/q3nMrO7XMwlLCGTSws8gHkh4NhAd0ArKeiJmSJAQM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aUaHXVvoISL5wMvNdC+3Z+xFRWkJRDQSS5SU6YGelCVeOUbmHMLpNnCt4isJ1oi2U254oD15CW75v6fVjYssUyfWYlYWU61YpVjUhusPVfBW5T0AJ0wv+K6o4wmwsugELXame0CHGMZYybSSWYO6WqmXfVQc7jnHhOogKAP/D5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=VtxyHnJG; arc=none smtp.client-ip=80.12.242.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from localhost.localdomain ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 3VuNsRaqlrs7M3VuNs9A6s; Sun, 05 May 2024 09:03:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1714892623; bh=DBQKhsJ4mDyVp3IvupeuQ5SJkA9A1uQpu4XWLEOftUw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=VtxyHnJGWGr3j8fB3UR8kqOOrgCuE3V6JuhSjgtXTc14Mz7o+9p4tkmSeJTAnMqkw kD02vNCyo3vtFwja0JsGNQ5GQocOxIFDoK4TwM59FD+o/3UMsRy8kYBfRA5crpxam4 u0u8/2SM/6afGWWcCqpxoaRcdB0iIahCaNOinE0Gtjqga7y+I+i6h439I5RwqfUAO2 qQWcPi1UXuhwmkkHfjdj9t4z9zS+GY7Amnf+ec3D4wRzvmi/JjYzN0LiFQC8z9RO6o NNKpxSp1pGtKcN4uqMoEkeAIhPUolss/Qbf5fsAcPzGFoE+SCLlr85EJtbdLNxbH08 0Gqk7e2SmbgDA== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 05 May 2024 09:03:43 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Pavel Machek , Lee Jones Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-leds@vger.kernel.org Subject: [PATCH] leds: is31fl319x: Constify struct regmap_config Date: Sun, 5 May 2024 09:03:32 +0200 Message-ID: <82a5cb26ff8af1865a790286bdbc3c4a2bd149f1.1714892598.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 'is31fl3190_regmap_config' and 'is31fl3196_regmap_config' are not modified in this diver and are only used as a const struct regmap_config. Constifying these structures moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: text data bss dec hex filename 13827 2002 32 15861 3df5 drivers/leds/leds-is31fl319x.o After: text data bss dec hex filename 14467 1370 32 15869 3dfd drivers/leds/leds-is31fl319x.o Signed-off-by: Christophe JAILLET --- drivers/leds/leds-is31fl319x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/leds/leds-is31fl319x.c b/drivers/leds/leds-is31fl319x.c index 66c65741202e..5e1a4d39a107 100644 --- a/drivers/leds/leds-is31fl319x.c +++ b/drivers/leds/leds-is31fl319x.c @@ -140,7 +140,7 @@ static const struct reg_default is31fl3190_reg_defaults[] = { { IS31FL3190_PWM(2), 0x00 }, }; -static struct regmap_config is31fl3190_regmap_config = { +static const struct regmap_config is31fl3190_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = IS31FL3190_RESET, @@ -178,7 +178,7 @@ static const struct reg_default is31fl3196_reg_defaults[] = { { IS31FL3196_PWM(8), 0x00 }, }; -static struct regmap_config is31fl3196_regmap_config = { +static const struct regmap_config is31fl3196_regmap_config = { .reg_bits = 8, .val_bits = 8, .max_register = IS31FL3196_REG_CNT, -- 2.45.0