From patchwork Fri Nov 15 17:17:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13876649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B98D1D68BCD for ; Fri, 15 Nov 2024 17:17:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A2F110E8B1; Fri, 15 Nov 2024 17:17:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="oBd6nc/Y"; dkim-atps=neutral Received: from smtp.smtpout.orange.fr (smtp-20.smtpout.orange.fr [80.12.242.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 756A010E8AC for ; Fri, 15 Nov 2024 17:17:55 +0000 (UTC) Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id Bzx9tMAAh8AEMBzx9t85Ul; Fri, 15 Nov 2024 18:17:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731691074; bh=ISPrq17danPOpPQ4NpNMvjghXiy3pfLupLJvQtzC6JE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=oBd6nc/YARXreRA3M9Pq2t+jvnNX3qzxwdqosxR/EPoYRzBDDWOAMc/bbXjeB4EuQ ZuUvWnIXFQVccJm+/ga018jdZdcvZ0o/LBC4b3ldYFA96bLHSxncOHAUJYJhab5f4z 8KKQDI6kn02UkBesWS9NBz0zqBxvEc9wemi91qkcuzHXT20PRU34FuJHvuyt9uEbvv dU+0/Dewjp2a4C2P7bmG6pBBlH2nAXoYtjBiQzLOleC9jk4QrUIA4WIFD36cNMRsvp XxvOhp8b8y9ny6Vl4ySHm1aZcJcqpQnlThMSTDlJfbaj5jjhIqjY65dDZAcguqtQ6L h/F6Nf3jNXWtA== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 15 Nov 2024 18:17:54 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: linux@weissschuh.net, broonie@kernel.org, lee@kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm/i2c: tda9950: Constify struct i2c_device_id Date: Fri, 15 Nov 2024 18:17:27 +0100 Message-ID: X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 'struct i2c_device_id' 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: ====== text data bss dec hex filename 12136 822 0 12958 329e drivers/gpu/drm/i2c/tda9950.o After: ===== text data bss dec hex filename 12200 758 0 12958 329e drivers/gpu/drm/i2c/tda9950.o Signed-off-by: Christophe JAILLET Reviewed-by: Thomas Zimmermann --- Compile tested-only. v2: fix missing const :( --- drivers/gpu/drm/i2c/tda9950.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c index 82d618c40dce..5065d6212fe4 100644 --- a/drivers/gpu/drm/i2c/tda9950.c +++ b/drivers/gpu/drm/i2c/tda9950.c @@ -485,7 +485,7 @@ static void tda9950_remove(struct i2c_client *client) cec_unregister_adapter(priv->adap); } -static struct i2c_device_id tda9950_ids[] = { +static const struct i2c_device_id tda9950_ids[] = { { "tda9950", 0 }, { }, };