* [PATCH] Bluetooth: btqca: Use correct byte format for opcode of injected command
@ 2019-07-08 21:57 Matthias Kaehlcke
2019-07-11 7:09 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2019-07-08 21:57 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg
Cc: linux-bluetooth, linux-kernel, Balakrishna Godavarthi,
Matthias Kaehlcke, kbuild test robot
The opcode of the command injected by commit 32646db8cc28 ("Bluetooth:
btqca: inject command complete event during fw download") uses the CPU
byte format, however it should always be little endian. In practice it
shouldn't really matter, since all we need is an opcode != 0, but still
let's do things correctly and keep sparse happy.
Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
drivers/bluetooth/btqca.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 8b33128dccee..243a95c27dcd 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -268,7 +268,7 @@ static int qca_inject_cmd_complete_event(struct hci_dev *hdev)
evt = skb_put(skb, sizeof(*evt));
evt->ncmd = 1;
- evt->opcode = QCA_HCI_CC_OPCODE;
+ evt->opcode = cpu_to_le16(QCA_HCI_CC_OPCODE);
skb_put_u8(skb, QCA_HCI_CC_SUCCESS);
--
2.22.0.410.gd8fdbe21b5-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: btqca: Use correct byte format for opcode of injected command
2019-07-08 21:57 [PATCH] Bluetooth: btqca: Use correct byte format for opcode of injected command Matthias Kaehlcke
@ 2019-07-11 7:09 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2019-07-11 7:09 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: Johan Hedberg, Linux Bluetooth mailing list, linux-kernel,
Balakrishna Godavarthi, kbuild test robot
Hi Matthias,
> The opcode of the command injected by commit 32646db8cc28 ("Bluetooth:
> btqca: inject command complete event during fw download") uses the CPU
> byte format, however it should always be little endian. In practice it
> shouldn't really matter, since all we need is an opcode != 0, but still
> let's do things correctly and keep sparse happy.
>
> Fixes: 32646db8cc28 ("Bluetooth: btqca: inject command complete event during fw download")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> drivers/bluetooth/btqca.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-11 7:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-08 21:57 [PATCH] Bluetooth: btqca: Use correct byte format for opcode of injected command Matthias Kaehlcke
2019-07-11 7:09 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).