From: Nishka Dasgupta Date: Thu, 15 Aug 2019 05:52:55 +0000 (+0530) Subject: Bluetooth: 6lowpan: Make variable header_ops constant X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=569428dabc3e2523ca2b357e7d86412df1dd1e6a;p=linux.git 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 Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index 9d41de1ec90f6..bb55d92691b06 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, };