Commit ca16cb2b authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Nishanth Menon

soc: ti: knav_qmss: Constify struct knav_range_ops

'struct knav_range_ops' is not modified in these drivers.

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
   7498	   1193	      0	   8691	   21f3	drivers/soc/ti/knav_qmss_acc.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
   7566	   1145	      0	   8711	   2207	drivers/soc/ti/knav_qmss_acc.o
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/a8b4b428f97fc584f38bf45100aa9da241aeb935.1719159074.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarNishanth Menon <nm@ti.com>
parent f1de10ae
......@@ -333,7 +333,7 @@ struct knav_range_info {
void *queue_base_inst;
unsigned flags;
struct list_head list;
struct knav_range_ops *ops;
const struct knav_range_ops *ops;
struct knav_acc_info acc_info;
struct knav_acc_channel *acc;
unsigned num_irqs;
......
......@@ -450,7 +450,7 @@ static int knav_acc_free_range(struct knav_range_info *range)
return 0;
}
static struct knav_range_ops knav_acc_range_ops = {
static const struct knav_range_ops knav_acc_range_ops = {
.set_notify = knav_acc_set_notify,
.init_queue = knav_acc_init_queue,
.open_queue = knav_acc_open_queue,
......
......@@ -411,7 +411,7 @@ static int knav_gp_close_queue(struct knav_range_info *range,
return 0;
}
static struct knav_range_ops knav_gp_range_ops = {
static const struct knav_range_ops knav_gp_range_ops = {
.set_notify = knav_gp_set_notify,
.open_queue = knav_gp_open_queue,
.close_queue = knav_gp_close_queue,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment