All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Petr Machata <petrm@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next] mlxsw: core_thermal: Constify struct thermal_zone_device_ops
Date: Sun, 25 May 2025 20:25:56 +0300	[thread overview]
Message-ID: <aDNSpM3WGN7W6Xuh@shredder> (raw)
In-Reply-To: <4516676973f5adc1cdb76db1691c0f98b6fa6614.1748164348.git.christophe.jaillet@wanadoo.fr>

On Sun, May 25, 2025 at 11:13:17AM +0200, Christophe JAILLET wrote:
> 'struct thermal_zone_device_ops' are not modified in this driver.
> 
> Constifying these structures moves some data to a read-only section, so
> increases overall security, especially when the structure holds some
> function pointers.
> 
> While at it, also constify a struct thermal_zone_params.
> 
> On a x86_64, with allmodconfig:
> Before:
> ======
>    text	   data	    bss	    dec	    hex	filename
>   24899	   8036	      0	  32935	   80a7	drivers/net/ethernet/mellanox/mlxsw/core_thermal.o
> 
> After:
> =====
>    text	   data	    bss	    dec	    hex	filename
>   25379	   7556	      0	  32935	   80a7	drivers/net/ethernet/mellanox/mlxsw/core_thermal.o
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

  reply	other threads:[~2025-05-25 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25  9:13 [PATCH net-next] mlxsw: core_thermal: Constify struct thermal_zone_device_ops Christophe JAILLET
2025-05-25 17:25 ` Ido Schimmel [this message]
2025-05-28  1:20 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aDNSpM3WGN7W6Xuh@shredder \
    --to=idosch@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.