* [PATCH] Bluetooth: make device_type const
@ 2017-08-19 9:24 Bhumika Goyal
2017-08-19 9:56 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-19 9:24 UTC (permalink / raw)
To: julia.lawall, marcel, gustavo, johan.hedberg, davem,
linux-bluetooth, netdev, linux-kernel
Cc: Bhumika Goyal
Make these const as they are only stored in the type field of a device
structure, which is const.
Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
net/bluetooth/hci_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index ca7a35e..aa300f3 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -13,7 +13,7 @@ static void bt_link_release(struct device *dev)
kfree(conn);
}
-static struct device_type bt_link = {
+static const struct device_type bt_link = {
.name = "link",
.release = bt_link_release,
};
@@ -86,7 +86,7 @@ static void bt_host_release(struct device *dev)
module_put(THIS_MODULE);
}
-static struct device_type bt_host = {
+static const struct device_type bt_host = {
.name = "host",
.release = bt_host_release,
};
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] Bluetooth: make device_type const
2017-08-19 9:24 [PATCH] Bluetooth: make device_type const Bhumika Goyal
@ 2017-08-19 9:56 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2017-08-19 9:56 UTC (permalink / raw)
To: Bhumika Goyal
Cc: julia.lawall, Gustavo F. Padovan, Johan Hedberg, David S. Miller,
open list:BLUETOOTH DRIVERS, Netdev list, linux-kernel
Hi Bhumika,
> Make these const as they are only stored in the type field of a device
> structure, which is const.
> Done using Coccinelle.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> net/bluetooth/hci_sysfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-19 9:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 9:24 [PATCH] Bluetooth: make device_type const Bhumika Goyal
2017-08-19 9:56 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox