Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atm: atmtcp: Constify atmtcp_v_dev_ops

The only usage of atmtcp_v_dev_ops is to pass its address to
atm_dev_register() which takes a pointer to const, and comparing its
address to another address, which does not modify it. Make it const to
allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Rikard Falkeborn and committed by
David S. Miller
70289779 e5f7e211

+1 -1
+1 -1
drivers/atm/atmtcp.c
··· 327 327 */ 328 328 329 329 330 - static struct atmdev_ops atmtcp_v_dev_ops = { 330 + static const struct atmdev_ops atmtcp_v_dev_ops = { 331 331 .dev_close = atmtcp_v_dev_close, 332 332 .open = atmtcp_v_open, 333 333 .close = atmtcp_v_close,