Commit 504cb3ce authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Andi Shyti
Browse files

i2c: rzv2m: Constify struct i2c_algorithm



'struct i2c_algorithm' is not modified in this driver.

Constifying this structure moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text	   data	    bss	    dec	    hex	filename
  11027	    646	     16	  11689	   2da9	drivers/i2c/busses/i2c-rzv2m.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  11107	    566	     16	  11689	   2da9	drivers/i2c/busses/i2c-rzv2m.o

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarFabrizio Castro <fabrizio.castro.jz@renesas.com>
Link: https://lore.kernel.org/r/537d93441ced53bffa6553b8ec93d007e64cb9a5.1743258995.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent f4a5f881
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment