Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp772812lqh; Sun, 5 May 2024 01:04:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWB8H5Wm5AXqaBSLpW4PxUbNe/CDniBmxe1309LwmQro3wH7Waee1pgxVUlevBbGoSZzL8g0bTWS9S2lq1xdRDiPuw8ZA/aJ1YxqV/NGw== X-Google-Smtp-Source: AGHT+IFulYrR3lU1DfL/+8f49h2CN6+9HCPr1bjqpHOhG+zexc73kFGCR3PQBRRnQyrXGyavvJ74 X-Received: by 2002:a92:dc83:0:b0:36c:8187:ab53 with SMTP id c3-20020a92dc83000000b0036c8187ab53mr6143544iln.8.1714896248640; Sun, 05 May 2024 01:04:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714896248; cv=pass; d=google.com; s=arc-20160816; b=hCfAwJC0jVCSVtEGeePdhvqEa9oinchxoYsvJH//SDdzUumN0arPCHKDPoGFRpmyN+ EohmGao3cVeZcKwzSsMDYsf/YvElz249bDrsqu6d7e/dbiBrp66gB8ZzWtu8sbVh8AWG aBhTDYfjy2ePuyNmrhYA3+7PS29wh6ccNt8uIaYOaWitc33rKUsNC9Zb7Lj+VKrJaCKn nnWEUZyryDc459aaveiN1avRvBR4aybBFH7TDE7gDMxxpUyW/F/zrfzbvN5dJxDMNwai 6LNypG11u+Eb3nBPV2X1hs+Gnc5Y0D/1eXyO6Swh8hY8ufQCtNaxQpeq9boEWtaM0YiQ okYA== 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=U6uzIaGNhSkC6hhU9kNa8/HHn2RJQgt+l+pkeP/wD8Q=; fh=FJS5QWwXNq3k72q99Az35gCb1NPKeCU9FiOsjVVE454=; b=e5+ZGTKQeTZK1LSR8DREFdMmK6Buox/mXXjWynDgaqYo2fvMZy4kUQFLOnSnrpDlIF j0fq/4F/PTE7kQYSmqc8j3G9wWvO+6QPPA9j6zkywxS5oDmifkgVW0GMJ7FNl3m3Dxwt RwR7mzaUHNyBvUgD7gtm3OM6qPweamLYWZOQ07bJHWfNKIm1niAunAuyKYCB05Cg6jkt VBrkwepfXXUsuqibXw44kJVw/CiNKfQmXO0tPag/vdcEmFikjjXIQtTlYQj+lsIdgXNX N93EaaOMGzIRLUPMHzkJYNDwY4vW5XDu/kzLWwW1bZMyf1b2FnR22mtbSjkWajoGx4zQ ZfhQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=iNpdVFsw; 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-168912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168912-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k189-20020a633dc6000000b0061db8a278c3si4438568pga.692.2024.05.05.01.04.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 01:04:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=iNpdVFsw; 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-168912-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168912-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 8474628185F for ; Sun, 5 May 2024 08:04:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53D80749C; Sun, 5 May 2024 08:03:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="iNpdVFsw" Received: from smtp.smtpout.orange.fr (smtp-27.smtpout.orange.fr [80.12.242.27]) (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 BB3D6567F; Sun, 5 May 2024 08:03:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.27 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714896235; cv=none; b=bxl1FKos+yCURVsPNuiQVMc3t2vNXXtjB7HnotBhYDN8MBNrDV15kFBDjxhqFDv+Qt8jRxmU3oETz5qL9oa8R7fbYv9wzXWWrlHFeQmUhIEZXJQ3rUeOoB8/AXtD84owqxYSD7rC8b2kqEiTS2zpuryVoNXln9BFzfD6/MiU3fM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714896235; c=relaxed/simple; bh=T6LDVzb/diboB9LRbBP9jNiWoC9/XYn/9Gx1EBNBblM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MHuBIl1Y/hO1sbW6eA9o2alhl31Xu1NpCtXEw0CiNDsNR26kzigKq2SD+SYVoxAw/68URmfNcywfBGi98Kj6k57LD7yZZOOzc7VxAQXf7JRQo2ZZd0MjPl+jNRcus70dwjGyVJV0bzGPyZ0eBUXiZ0LJIg1yPx2ohYye2F23IwM= 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=iNpdVFsw; arc=none smtp.client-ip=80.12.242.27 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 3WIVsb8aHXTYk3WIVs8vUC; Sun, 05 May 2024 09:28:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1714894116; bh=U6uzIaGNhSkC6hhU9kNa8/HHn2RJQgt+l+pkeP/wD8Q=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=iNpdVFswVqlDulu+RQMWOIbr+HeROeAOT/RP2IxlzEiw1lVtaTudFeU8iGGDnmXj4 AD4UnyEmfj1oYthh5vkeeEfCclcP4waTm2MgKEFaj9wY2zi8oYEXMqbNPpSiiSH245 3cLzWq9TuB5HHfD0aUb23YhLsQhYtC3HfWrguImKpBUpNZPpvxMNs7np9Vbl4ptS+/ 10K+RceG6d5XMGEyP8DnQf20B9iD3/7XN7WmTh2NAO2NC+FqcryE884QAYtF/liIbQ J+FDbEb/mtDe+S7w1DovW0jJsFhwpFYfb2+Dp4kAZ0YA7zJ9TD7pBparMe75YGzE1w M2D1b6ugesVdA== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 05 May 2024 09:28:36 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Michael Tretter , Pengutronix Kernel Team , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-media@vger.kernel.org Subject: [PATCH] media: platform: allegro-dvt: Constify struct regmap_config Date: Sun, 5 May 2024 09:28:25 +0200 Message-ID: <01b9b16b2f86f4d16d9871a29dcda9245512a1f7.1714894086.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 'allegro_regmap_config' and 'allegro_sram_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 79587 3706 116 83409 145d1 drivers/media/platform/allegro-dvt/allegro-core.o After: text data bss dec hex filename 80219 3066 116 83401 145c9 drivers/media/platform/allegro-dvt/allegro-core.o Signed-off-by: Christophe JAILLET --- drivers/media/platform/allegro-dvt/allegro-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/allegro-dvt/allegro-core.c b/drivers/media/platform/allegro-dvt/allegro-core.c index da61f9beb6b4..1a19fef62e81 100644 --- a/drivers/media/platform/allegro-dvt/allegro-core.c +++ b/drivers/media/platform/allegro-dvt/allegro-core.c @@ -179,7 +179,7 @@ struct allegro_dev { struct list_head channels; }; -static struct regmap_config allegro_regmap_config = { +static const struct regmap_config allegro_regmap_config = { .name = "regmap", .reg_bits = 32, .val_bits = 32, @@ -188,7 +188,7 @@ static struct regmap_config allegro_regmap_config = { .cache_type = REGCACHE_NONE, }; -static struct regmap_config allegro_sram_config = { +static const struct regmap_config allegro_sram_config = { .name = "sram", .reg_bits = 32, .val_bits = 32, -- 2.45.0