From patchwork Fri Nov 15 16:54:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13876635 Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) (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 A691D762E0; Fri, 15 Nov 2024 16:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731689695; cv=none; b=NmZ9kumtrh6S6Gomtaj9OFiBS7RI5GYdo8F9nNu3MBlpBiqna0aQATUro1prbQsOR0t2aHv9iI5QIzaRWOgL20H2sG3XggdNI/WtDCkj2FWxoZGLCu1lBq77fh42jdMwAc8y/Z9NT3JBg4yqqa+sGIdeCZzY5D5ar8mmXT5UIrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731689695; c=relaxed/simple; bh=NdGgJpbrkxwQPIZY7b3OV48z5XqL9DWgYsE/gbcOlQE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mkKJNYovwMO3aw3Zx0BJvWManJazE/WXegK9YIjP+zFXICW84LUkGy9Yaz2gqaRTvkOMIkZ87E3ast6ocNzZmITe83O5iloONYDUCf7uUmvEux6n2Gj92u74s5ZV/aSvIRF3bSS2pMp0lz/52d81Z6nT02vEPEjtCNc15l2OR6o= 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=cs+nXupu; arc=none smtp.client-ip=80.12.242.19 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="cs+nXupu" Received: from localhost.localdomain ([90.11.132.44]) by smtp.orange.fr with ESMTPA id BzamtxBk9W6lUBzantT11p; Fri, 15 Nov 2024 17:54:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1731689686; bh=VjL0T8V3592eoi9zyDm4yaxJadogguU7vBFf2SgAtkM=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=cs+nXupuvX2UUZFgePhpnFr4+FZ3OO/E9X8iNxzxe3Cdoh+N/tfFIcOpAWa0P0Jrr QfAj8YEfeP8z8e8p6tvvK0bfRMD2bYObEFS1putMrdf9NIlPJ5mlcwBlLYuQsdqbNs aaNslRxrs2eVdlTSXI/vjJyjii0IM5uJpU0irp1aXG0cE1osFEgPB/fkYOuGQfz8Dt G8l30Luv5/OmsPXpbSseH+e0razkzCPtUdt89TmnSLNm04hiLc8W+sE8GRQUk16bpP 71azQXcQvowRhQYz1pDmAJZDWBE/AKtQlE3PkwoVGg2XGi9CHVzhwjD7XYaimIcmJH BaxzWvrFpA1JQ== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Fri, 15 Nov 2024 17:54:46 +0100 X-ME-IP: 90.11.132.44 From: Christophe JAILLET To: David Rhodes , Richard Fitzgerald , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-sound@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH] ASoC: cs42l51: Constify struct i2c_device_id Date: Fri, 15 Nov 2024 17:54:25 +0100 Message-ID: X-Mailer: git-send-email 2.47.0 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 '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. While at it, also add some space to be consistent with cs42l51_of_match a few lines below. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 1551 384 16 1951 79f sound/soc/codecs/cs42l51-i2c.o After: ===== text data bss dec hex filename 1631 304 16 1951 79f sound/soc/codecs/cs42l51-i2c.o Signed-off-by: Christophe JAILLET --- Compile tested-only. --- sound/soc/codecs/cs42l51-i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs42l51-i2c.c b/sound/soc/codecs/cs42l51-i2c.c index e7cc50096297..f171bd66fcac 100644 --- a/sound/soc/codecs/cs42l51-i2c.c +++ b/sound/soc/codecs/cs42l51-i2c.c @@ -13,9 +13,9 @@ #include "cs42l51.h" -static struct i2c_device_id cs42l51_i2c_id[] = { - {"cs42l51"}, - {} +static const struct i2c_device_id cs42l51_i2c_id[] = { + { "cs42l51" }, + { } }; MODULE_DEVICE_TABLE(i2c, cs42l51_i2c_id);