Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp624314lqh; Sat, 4 May 2024 15:44:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUViwYFMBqkU2tbss3D/axanEcSaVE696qWfemn4SjbiuEtqI1F4C8fq3J7HUiufRMTVZEVCd/btsvzbRBf79RpbFdhdT88p8wnAHQieQ== X-Google-Smtp-Source: AGHT+IGJiacBckR5H1/4hpy73+6MHHc7kXzcm90J1w3l0jWK4F81r/ykVkSP7aoKOZdmOSc2zhvu X-Received: by 2002:a05:6a00:18a0:b0:6f4:1799:c714 with SMTP id x32-20020a056a0018a000b006f41799c714mr8907217pfh.12.1714862683167; Sat, 04 May 2024 15:44:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714862683; cv=pass; d=google.com; s=arc-20160816; b=lTjr9wHq8pQt76aCNRtqH+jUbBTOIbo/2+zyH8DagoorsuTGzomTu6E7sjNQABGA0h mcZ+dqxUdJEzoCwf9OulBHJuG5LFEB4qbplPzU2kywhHU7GUCJuphTHeSHiFioZwzsxU SBErUheTLUxpJQ/0LOUIXRxVWE/o+ikpGPQsCn92amfjIghSXCoG6hevUpO2EHbGAXWf vBJJXxBM1RZfNXZqXfd2rkjpZdGzFviyqcpGm0uHqemucSLzXBV7dh/WwX2/LfAGpteY IOP28HOJDU5Eu3AK654mdLS8j8Lum04SMQJKkiJqQH8u6KI/TdeGj6q4mJLhrZr93Uk0 vb7Q== 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=wWdMEMOIhPw6ppUn56CQKuUZeJb+o7tGdksRBeMqDTA=; fh=Jm0z1/0r1wjpOAwkxt3q4sI1Ou7MCilEmlRqu4QIwHE=; b=WWaqXNlrrYeQEYxEdrDPXFKr7RfK6rXv/AzAUAHJylzPCHziXTUsw/oB3EeeHYQzC8 H8njE82CbDAxUxeda6jVXtGOuizdCcXamwrhfrw54UK5jvgZT/JHLsPaX76UrKKRGe5/ BztS5BmdoAFG5nTKQ1gUM8r/oZ5746UzNbjBtLgvUBcSdfjVmjw5XXNjI2hmPRbsFtpc jGkYcTpJ9rlaZ2kW7T7yc3V7hc3/dL5FxF1ZtRAyXaPLnHcie2ng8YqpzVf0FLsVLl1d T3PlQPNlWSZOyfqxAWoJQ2pHgxqcGvR1p6M2BiTc2crVFKThl29lVpm7i5kexd6c8Jzm KmPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=VSZyDH0T; 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-168845-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bx7-20020a056a02050700b005e4901151ddsi6131995pgb.92.2024.05.04.15.44.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 15:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168845-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=VSZyDH0T; 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-168845-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168845-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C3981282036 for ; Sat, 4 May 2024 22:44:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70D6184FBA; Sat, 4 May 2024 22:44:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="VSZyDH0T" Received: from smtp.smtpout.orange.fr (smtp-15.smtpout.orange.fr [80.12.242.15]) (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 E3D162BAE8; Sat, 4 May 2024 22:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714862673; cv=none; b=XxT42EKvQKFrGLLtJg1Um9FUEuHOItIS+2EIb57+6gf8FiyXC78dwpXIsMgLyFarAqqIXEIzxIQfvsT2S483ysaTWsLe9jGpLjKMG0bziEnpX1YrzIoIZD1QKItquIlv8Jf5kAzXlDEoXnyVLVYHoYwTc15kBCpikFeleSahlME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714862673; c=relaxed/simple; bh=ChFP9soZFQfzF6V++qD6V6h/Ebfb4+XVe7SS9h8/Gpg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nyWy5GsU6hqkPltW9F7Agqh+RAs/zScR1Vdr0bokTeXhr/BvyD2P5xoV3XDMmwd5WAMd6UAuFkbFXf4FGilU8Su+5+GVbEYVWcpPv3K1jjXgPh81aDopeTK7BIZpH+7Xc/qXk5U1sQqtcExnmmv01ZF1yOH9UNflO19Wc+7+45c= 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=VSZyDH0T; arc=none smtp.client-ip=80.12.242.15 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 3O6BshQVn10G63O6Cs9BN7; Sun, 05 May 2024 00:43:20 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1714862600; bh=wWdMEMOIhPw6ppUn56CQKuUZeJb+o7tGdksRBeMqDTA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=VSZyDH0T9T59uX3IKpq+l1xEvpEF0bAD/lH5CJFjzVFLNhxgYS/ys5kwHvkdsJ4DH b3DbVvZPyPAzu4wMVtRkS6coaACZrxKzwMa/yJOVPWIilfP391FCWgXybxbh585x+d I5R3mpKnoMPc/9vd+HXRtp9Qw72FAcMnt1xYvr7xFHvC1jXEYLCit83P5x9iuICSgV 85ZxmwInjkdu0S5mlabpPDaqDDZRlY9uYnfoNlSU1DzVQSVppwZBr6HJZuTsnTZwWI yaNaCUPzZz8A6wZhiFQPf9IeSHvlEcJ+QYtuVO4B4/qpMu4JkFJIVGyI9DeSPQC+9M VIAYhZk85KEhQ== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 05 May 2024 00:43:20 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Alexandre Belloni Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-rtc@vger.kernel.org Subject: [PATCH] rtc: rx6110: Constify struct regmap_config Date: Sun, 5 May 2024 00:43:07 +0200 Message-ID: <833a7f612c0de9dcb1179a0b75b189c237a335ac.1714862560.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 'regmap_spi_config' and 'regmap_i2c_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 8896 1554 32 10482 28f2 drivers/rtc/rtc-rx6110.o After: text data bss dec hex filename 9536 914 32 10482 28f2 drivers/rtc/rtc-rx6110.o Signed-off-by: Christophe JAILLET --- drivers/rtc/rtc-rx6110.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-rx6110.c b/drivers/rtc/rtc-rx6110.c index 834274db8c3f..af6dd6ccbe3b 100644 --- a/drivers/rtc/rtc-rx6110.c +++ b/drivers/rtc/rtc-rx6110.c @@ -330,7 +330,7 @@ static int rx6110_probe(struct rx6110_data *rx6110, struct device *dev) } #if IS_ENABLED(CONFIG_SPI_MASTER) -static struct regmap_config regmap_spi_config = { +static const struct regmap_config regmap_spi_config = { .reg_bits = 8, .val_bits = 8, .max_register = RX6110_REG_IRQ, @@ -410,7 +410,7 @@ static void rx6110_spi_unregister(void) #endif /* CONFIG_SPI_MASTER */ #if IS_ENABLED(CONFIG_I2C) -static struct regmap_config regmap_i2c_config = { +static const struct regmap_config regmap_i2c_config = { .reg_bits = 8, .val_bits = 8, .max_register = RX6110_REG_IRQ, -- 2.45.0