Context |
Check |
Description |
tedd_an/pre-ci_am |
success
|
Success
|
tedd_an/CheckPatch |
success
|
CheckPatch PASS
|
tedd_an/GitLint |
success
|
Gitlint PASS
|
tedd_an/SubjectPrefix |
success
|
Gitlint PASS
|
tedd_an/BuildKernel |
success
|
BuildKernel PASS
|
tedd_an/CheckAllWarning |
success
|
CheckAllWarning PASS
|
tedd_an/CheckSparse |
success
|
CheckSparse PASS
|
tedd_an/CheckSmatch |
success
|
CheckSparse PASS
|
tedd_an/BuildKernel32 |
success
|
BuildKernel32 PASS
|
tedd_an/TestRunnerSetup |
success
|
TestRunnerSetup PASS
|
tedd_an/TestRunner_l2cap-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_iso-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_bnep-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_mgmt-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_rfcomm-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_sco-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_ioctl-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_mesh-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_smp-tester |
success
|
TestRunner PASS
|
tedd_an/TestRunner_userchan-tester |
success
|
TestRunner PASS
|
tedd_an/IncrementalBuild |
success
|
Incremental Build PASS
|
@@ -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(-)