summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-08-15 11:22:55 +0530
committerMarcel Holtmann <marcel@holtmann.org>2019-09-05 17:27:21 +0200
commit569428dabc3e2523ca2b357e7d86412df1dd1e6a (patch)
tree1b4059f381787495eb7c38a29f72c8c49582676d /net
parent9e45524a011107a73bc2cdde8370c61e82e93a4d (diff)
downloadlinux-569428dabc3e2523ca2b357e7d86412df1dd1e6a.tar.bz2
Bluetooth: 6lowpan: Make variable header_ops constant
Static variable header_ops, of type header_ops, is used only once, when it is assigned to field header_ops of a variable having type net_device. This corresponding field is declared as const in the definition of net_device. Hence make header_ops constant as well to protect it from unnecessary modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/6lowpan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 9d41de1ec90f..bb55d92691b0 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -583,7 +583,7 @@ static const struct net_device_ops netdev_ops = {
.ndo_start_xmit = bt_xmit,
};
-static struct header_ops header_ops = {
+static const struct header_ops header_ops = {
.create = header_create,
};