From nobody Fri Sep 20 01:39:36 2024 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 DA045AD24 for ; Sun, 7 Jul 2024 06:23:49 +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=1720333432; cv=none; b=kvsi6mu2SVXE7K0lPvDZuctBdUQzqw5QL1I4X/yH4c5Sjz0A6b9kUQdsY5R0HL3CfoEjnjLUWUqIsskLBc3CAFa3HB08kASfyZkIYYihjbF2OPDdrcOLUTP+cMudvsQsM6nGIo7440Ht4qiDxC1CkgUZe4NFj/vJaNicXfieQ4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720333432; c=relaxed/simple; bh=Kr8q7jgtvxXVl4D8u942YnL8udJewM780MCOxyFlPCI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FQsUWAOZxhL5bU0deLNsktXMHbx0WxRoV1d4llinQ3zPu24DaO/L8GSlgD19hLzVAOn5Ov+qwgQp/CFE+Ca+40gt8iYvpmfDwM7OTKfQNnfB93Yariasr5JLb+OrqE+9iylt7ifEpU9hVVjYord8mT8r86K4kt5WTIByhwN2rqc= 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=UG1BaYS5; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="UG1BaYS5" Received: from fedora.home ([86.243.222.230]) by smtp.orange.fr with ESMTPA id QKkEsyOxChEtDQKkWs8JLE; Sun, 07 Jul 2024 07:47:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1720331269; bh=Ghi6/9KK5dnA4d7xrwkCyOhDZvJBSxCQgYi3tZ7zCuA=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=UG1BaYS5p50YBPSwi/Swqw/Ei+LajcK5WrI3tsOSriwLjEBS4TtTB64qkeuRQBvZq pqg4k0guhhYIzkmJIY7VzCHzOIEePsz5qPbDzkI0b16m97fmLj1bl7aJNlAXQGmvil BMwQ63yIMqJ9ogHWOuan2tiWMhtDNBLu/hycRjVlz7vrhDsF3cYA34ROnc4ycw6YcK TfgO3c9uVxNoXtvCOZnv8DuTsTjbdTivBTLQMNItDjjeBNB5Csa4IIMt2CclcgX6nt aIgrdKvDO690XhgaYAN0pZgFZzVcaR+8kYKzyHVHuVfVZGEN/UF/muwhDHkh+tyzK2 IERxLON+14o9A== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 07 Jul 2024 07:47:49 +0200 X-ME-IP: 86.243.222.230 From: Christophe JAILLET To: matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, fchiby@baylibre.com, fparent@baylibre.com, s.hauer@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH v2 1/3] soc: mediatek: pwrap: Constify struct pmic_wrapper_type Date: Sun, 7 Jul 2024 07:47:20 +0200 Message-ID: <5b4b60c5dfd6d8fe893b05cfc96c0e2d67705463.1720331018.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 'struct pmic_wrapper_type' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig: Before: =3D=3D=3D=3D=3D=3D text data bss dec hex filename 45336 8724 16 54076 d33c drivers/soc/mediatek/mtk-pmic-wrap.o After: =3D=3D=3D=3D=3D text data bss dec hex filename 45528 8532 16 54076 d33c drivers/soc/mediatek/mtk-pmic-wrap.o Signed-off-by: Christophe JAILLET Reviewed-by: AngeloGioacchino Del Regno --- Compile tested-only Changes in v2: - Add R-b v1: https://lore.kernel.org/all/ee3160978ac6564663d044815f24cf79e2e0744e.17= 19652155.git.christophe.jaillet@wanadoo.fr/ --- drivers/soc/mediatek/mtk-pmic-wrap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mt= k-pmic-wrap.c index efd9cae212dc..0da0cdec5050 100644 --- a/drivers/soc/mediatek/mtk-pmic-wrap.c +++ b/drivers/soc/mediatek/mtk-pmic-wrap.c @@ -2397,7 +2397,7 @@ static const struct pmic_wrapper_type pwrap_mt8183 = =3D { .init_soc_specific =3D pwrap_mt8183_init_soc_specific, }; =20 -static struct pmic_wrapper_type pwrap_mt8195 =3D { +static const struct pmic_wrapper_type pwrap_mt8195 =3D { .regs =3D mt8195_regs, .type =3D PWRAP_MT8195, .arb_en_all =3D 0x777f, /* NEED CONFIRM */ @@ -2423,7 +2423,7 @@ static const struct pmic_wrapper_type pwrap_mt8365 = =3D { .init_soc_specific =3D NULL, }; =20 -static struct pmic_wrapper_type pwrap_mt8516 =3D { +static const struct pmic_wrapper_type pwrap_mt8516 =3D { .regs =3D mt8516_regs, .type =3D PWRAP_MT8516, .arb_en_all =3D 0xff, @@ -2435,7 +2435,7 @@ static struct pmic_wrapper_type pwrap_mt8516 =3D { .init_soc_specific =3D NULL, }; =20 -static struct pmic_wrapper_type pwrap_mt8186 =3D { +static const struct pmic_wrapper_type pwrap_mt8186 =3D { .regs =3D mt8186_regs, .type =3D PWRAP_MT8186, .arb_en_all =3D 0xfb27f, --=20 2.45.2