All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: serdev: Constify serdev_device_ops
@ 2020-05-09 13:17 Rikard Falkeborn
  2020-05-13  7:28 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Rikard Falkeborn @ 2020-05-09 13:17 UTC (permalink / raw)
  To: marcel, johan.hedberg; +Cc: linux-bluetooth, linux-kernel, Rikard Falkeborn

serdev_device_ops is not modified and can be const. Also, remove the
unneeded declaration of it.

Output from the file command before and after:

Before:
   text    data     bss     dec     hex filename
   7192    2408     192    9792    2640 drivers/bluetooth/hci_serdev.o

After:
   text    data     bss     dec     hex filename
   7256    2344     192    9792    2640 drivers/bluetooth/hci_serdev.o

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/bluetooth/hci_serdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_serdev.c b/drivers/bluetooth/hci_serdev.c
index 4652896d4990..599855e4c57c 100644
--- a/drivers/bluetooth/hci_serdev.c
+++ b/drivers/bluetooth/hci_serdev.c
@@ -21,8 +21,6 @@
 
 #include "hci_uart.h"
 
-static struct serdev_device_ops hci_serdev_client_ops;
-
 static inline void hci_uart_tx_complete(struct hci_uart *hu, int pkt_type)
 {
 	struct hci_dev *hdev = hu->hdev;
@@ -260,7 +258,7 @@ static int hci_uart_receive_buf(struct serdev_device *serdev, const u8 *data,
 	return count;
 }
 
-static struct serdev_device_ops hci_serdev_client_ops = {
+static const struct serdev_device_ops hci_serdev_client_ops = {
 	.receive_buf = hci_uart_receive_buf,
 	.write_wakeup = hci_uart_write_wakeup,
 };
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: serdev: Constify serdev_device_ops
  2020-05-09 13:17 [PATCH] Bluetooth: serdev: Constify serdev_device_ops Rikard Falkeborn
@ 2020-05-13  7:28 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2020-05-13  7:28 UTC (permalink / raw)
  To: Rikard Falkeborn; +Cc: Johan Hedberg, linux-bluetooth, linux-kernel

Hi Rikard,

> serdev_device_ops is not modified and can be const. Also, remove the
> unneeded declaration of it.
> 
> Output from the file command before and after:
> 
> Before:
>   text    data     bss     dec     hex filename
>   7192    2408     192    9792    2640 drivers/bluetooth/hci_serdev.o
> 
> After:
>   text    data     bss     dec     hex filename
>   7256    2344     192    9792    2640 drivers/bluetooth/hci_serdev.o
> 
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> drivers/bluetooth/hci_serdev.c | 4 +---
> 1 file changed, 1 insertion(+), 3 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:[~2020-05-13  7:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09 13:17 [PATCH] Bluetooth: serdev: Constify serdev_device_ops Rikard Falkeborn
2020-05-13  7:28 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.