From patchwork Mon Jun 24 04:40:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13708923 Received: from msa.smtpout.orange.fr (smtp-82.smtpout.orange.fr [80.12.242.82]) (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 08B582C184; Mon, 24 Jun 2024 04:49:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.82 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719204603; cv=none; b=u0P5EdJmo9lzIxDNrhSPsR21RiJQfpfueRKYh03n0CbsVOGTr9yI4LMuVnyaK2f/ovy4/DW49FJE6+lmzHrCpAi52kElhBBq2ziCqqrfSM25wUc5jLE1vqyiFlQyxpV0FSRcPdTsB2TliQOzLlLPs5hr5xjXqqBEU+fubzTlCm4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719204603; c=relaxed/simple; bh=uql83TR+LhFEbAqX/gSmzSwtbblR2rDJyV/rXbSUJjw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=J+07Fi4W1VT9RL02VOpauWBVljhBwxFo1nRObk/c1ODT+iWr0D4OOCDZ9ahOwTGnSWrw480vkP20bBbKRUQ3OArAflmy14PtDaSvUu9a4YGkLweo9iwyPKBFME+y0e+5zBVet5GuwZpnCSpoyjusKPASx2nq4w3BaWKpRGaFDt8= 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=stakPYYw; arc=none smtp.client-ip=80.12.242.82 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="stakPYYw" Received: from fedora.home ([86.243.222.230]) by smtp.orange.fr with ESMTPA id LbVTsQqVmgtIjLbVTscF1s; Mon, 24 Jun 2024 06:40:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1719204045; bh=qPoWHq3Ne6R96KbVu+6syweqYC10tItN+9c5RNppYnY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=stakPYYwd6jdG4ImX8Az5WVzf4+Edhb5JXs/PH6FM/FYxoU3IYGpeB7zqCn3jBXXT Fy7J5R3ilAk1TBV75rBO3Rb/It0rd5Ru/w5dqd7z/I5TSd8P7BjYeLdgmTlvCTzPZM cBBMS0XcRsvY/ueCy1polacmVRmPUn5QDm+Y/t1xdE6yHkmmjvgErnuC6ilV71zsmr EPtCCspGh53Qg2CBPQlWJYYd04HMOSKgSDbrFfDkr2N5mvXVzEROG18ZZiXn//dNTs 0Uubl9zedTH5ded+ThIWuIXYpD0dHtc6yq5IoIdSyhq+uetHtTvmxAee+Qe5ib+8cB 0uYCO7/V0KHiw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 24 Jun 2024 06:40:45 +0200 X-ME-IP: 86.243.222.230 From: Christophe JAILLET To: Benoit Parrot , Mauro Carvalho Chehab Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-media@vger.kernel.org Subject: [PATCH] media: ti: cal: Constify struct media_entity_operations Date: Mon, 24 Jun 2024 06:40:38 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 'struct media_entity_operations' 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, as an example: Before: ====== text data bss dec hex filename 20694 1394 32 22120 5668 drivers/media/platform/ti/cal/cal-camerarx.o After: ===== text data bss dec hex filename 20726 1362 32 22120 5668 drivers/media/platform/ti/cal/cal-camerarx.o Signed-off-by: Christophe JAILLET --- Compile tested-only --- drivers/media/platform/ti/cal/cal-camerarx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/ti/cal/cal-camerarx.c b/drivers/media/platform/ti/cal/cal-camerarx.c index 4afc2ad00330..42dfe08b765f 100644 --- a/drivers/media/platform/ti/cal/cal-camerarx.c +++ b/drivers/media/platform/ti/cal/cal-camerarx.c @@ -798,7 +798,7 @@ static const struct v4l2_subdev_internal_ops cal_camerarx_internal_ops = { .init_state = cal_camerarx_sd_init_state, }; -static struct media_entity_operations cal_camerarx_media_ops = { +static const struct media_entity_operations cal_camerarx_media_ops = { .link_validate = v4l2_subdev_link_validate, };