Message ID | 20230519214408.20984-1-minhuadotchen@gmail.com |
---|---|
State | New |
Headers | show |
Series | Bluetooth: hci_mrvl: use correct __le16 type | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=749396 ---Test result--- Test Summary: CheckPatch PASS 0.68 seconds GitLint PASS 0.31 seconds SubjectPrefix PASS 0.10 seconds BuildKernel PASS 37.47 seconds CheckAllWarning PASS 39.39 seconds CheckSparse PASS 45.76 seconds CheckSmatch PASS 121.96 seconds BuildKernel32 PASS 35.34 seconds TestRunnerSetup PASS 499.62 seconds TestRunner_l2cap-tester PASS 18.73 seconds TestRunner_iso-tester PASS 24.52 seconds TestRunner_bnep-tester PASS 6.38 seconds TestRunner_mgmt-tester PASS 126.94 seconds TestRunner_rfcomm-tester PASS 10.07 seconds TestRunner_sco-tester PASS 9.03 seconds TestRunner_ioctl-tester PASS 11.07 seconds TestRunner_mesh-tester PASS 7.96 seconds TestRunner_smp-tester PASS 9.00 seconds TestRunner_userchan-tester PASS 6.41 seconds IncrementalBuild PASS 32.82 seconds --- Regards, Linux Bluetooth
diff --git a/drivers/bluetooth/hci_mrvl.c b/drivers/bluetooth/hci_mrvl.c index e08222395772..91f63d2b0c02 100644 --- a/drivers/bluetooth/hci_mrvl.c +++ b/drivers/bluetooth/hci_mrvl.c @@ -167,7 +167,7 @@ static int mrvl_recv_fw_req(struct hci_dev *hdev, struct sk_buff *skb) struct mrvl_data *mrvl = hu->priv; int ret = 0; - if ((pkt->lhs ^ pkt->rhs) != 0xffff) { + if ((pkt->lhs ^ pkt->rhs) != cpu_to_le16(0xffff)) { bt_dev_err(hdev, "Corrupted mrvl header"); mrvl_send_ack(hu, MRVL_NAK); ret = -EINVAL; @@ -200,7 +200,7 @@ static int mrvl_recv_chip_ver(struct hci_dev *hdev, struct sk_buff *skb) u16 version = le16_to_cpu(pkt->lhs); int ret = 0; - if ((pkt->lhs ^ pkt->rhs) != 0xffff) { + if ((pkt->lhs ^ pkt->rhs) != cpu_to_le16(0xffff)) { bt_dev_err(hdev, "Corrupted mrvl header"); mrvl_send_ack(hu, MRVL_NAK); ret = -EINVAL;
Cast 0xffff to __le16 before comparing it with a __le16 type pkt and fix the following sparse warnings: drivers/bluetooth/hci_mrvl.c:170:23: sparse: warning: restricted __le16 degrades to integer drivers/bluetooth/hci_mrvl.c:203:23: sparse: warning: restricted __le16 degrades to integer Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com> --- drivers/bluetooth/hci_mrvl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)