Skip to content

Commit d04916a

Browse files
JuliaLawalldavem330
authored andcommitted
l2tp: constify inet6_protocol structures
The inet6_protocol structure is only passed as the first argument to inet6_add_protocol or inet6_del_protocol, both of which are declared as const. Thus the inet6_protocol structure itself can be const. Also drop __read_mostly on the newly const structure. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3a3a4e3 commit d04916a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/l2tp/l2tp_ip6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ static struct inet_protosw l2tp_ip6_protosw = {
788788
.ops = &l2tp_ip6_ops,
789789
};
790790

791-
static struct inet6_protocol l2tp_ip6_protocol __read_mostly = {
791+
static const struct inet6_protocol l2tp_ip6_protocol = {
792792
.handler = l2tp_ip6_recv,
793793
};
794794

0 commit comments

Comments
 (0)