From: Marcel Holtmann <marcel@holtmann.org>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] Bluetooth: hci_ll: Use skb_put_u8 instead of struct hcill_cmd
Date: Tue, 20 Mar 2018 09:31:04 +0100 [thread overview]
Message-ID: <20180320083104.9243-1-marcel@holtmann.org> (raw)
The struct hcill_cmd to create an skb with a single u8 is pointless. So
just use skb_put_u8 instead.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
drivers/bluetooth/hci_ll.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/bluetooth/hci_ll.c b/drivers/bluetooth/hci_ll.c
index 2f30dcad96bd..7c55a9f77808 100644
--- a/drivers/bluetooth/hci_ll.c
+++ b/drivers/bluetooth/hci_ll.c
@@ -82,10 +82,6 @@ enum hcill_states_e {
HCILL_AWAKE_TO_ASLEEP
};
-struct hcill_cmd {
- u8 cmd;
-} __packed;
-
struct ll_device {
struct hci_uart hu;
struct serdev_device *serdev;
@@ -113,7 +109,6 @@ static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
int err = 0;
struct sk_buff *skb = NULL;
struct ll_struct *ll = hu->priv;
- struct hcill_cmd *hcill_packet;
BT_DBG("hu %p cmd 0x%x", hu, cmd);
@@ -126,8 +121,7 @@ static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)
}
/* prepare packet */
- hcill_packet = skb_put(skb, 1);
- hcill_packet->cmd = cmd;
+ skb_put_u8(skb, cmd);
/* send packet */
skb_queue_tail(&ll->txq, skb);
--
2.14.3
next reply other threads:[~2018-03-20 8:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 8:31 Marcel Holtmann [this message]
2018-03-20 9:21 ` [PATCH] Bluetooth: hci_ll: Use skb_put_u8 instead of struct hcill_cmd Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180320083104.9243-1-marcel@holtmann.org \
--to=marcel@holtmann.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.