* re: Bluetooth: Use the updated key structures for handling LTKs
@ 2012-03-07 11:44 Dan Carpenter
2012-03-07 18:02 ` Vinicius Costa Gomes
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-03-07 11:44 UTC (permalink / raw)
To: vinicius.gomes; +Cc: linux-bluetooth
Hello Vinicius Costa Gomes,
The patch c9839a11c0e4: "Bluetooth: Use the updated key structures
for handling LTKs" from Feb 2, 2012, leads to the following Sparse
warning: net/bluetooth/mgmt.c:2590:59: warning: incorrect type in
argument 9 (different base types)
+int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
+ int new_key, u8 authenticated, u8 tk[16],
+ u8 enc_size, u16 ediv, u8 rand[8]);
^^^^^^^^
+struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr,
+ u8 addr_type);
int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr);
-int hci_add_ltk(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr,
- u8 key_size, __le16 ediv, u8 rand[8], u8 ltk[16]);
^^^^^^^^^^^
int hci_smp_ltks_clear(struct hci_dev *hdev);
We removed the endian notation from ediv, but it seems from a quick read
that the __le16 was correct. Btw, here is an article on how to use
Sparse to find endian bugs: http://lwn.net/Articles/205624/
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bluetooth: Use the updated key structures for handling LTKs
2012-03-07 11:44 Bluetooth: Use the updated key structures for handling LTKs Dan Carpenter
@ 2012-03-07 18:02 ` Vinicius Costa Gomes
0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Costa Gomes @ 2012-03-07 18:02 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-bluetooth
Hi Dan,
On 14:44 Wed 07 Mar, Dan Carpenter wrote:
> Hello Vinicius Costa Gomes,
>
> The patch c9839a11c0e4: "Bluetooth: Use the updated key structures
> for handling LTKs" from Feb 2, 2012, leads to the following Sparse
> warning: net/bluetooth/mgmt.c:2590:59: warning: incorrect type in
> argument 9 (different base types)
>
> +int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
> + int new_key, u8 authenticated, u8 tk[16],
> + u8 enc_size, u16 ediv, u8 rand[8]);
> ^^^^^^^^
> +struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr,
> + u8 addr_type);
> int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr);
> -int hci_add_ltk(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr,
> - u8 key_size, __le16 ediv, u8 rand[8], u8 ltk[16]);
> ^^^^^^^^^^^
> int hci_smp_ltks_clear(struct hci_dev *hdev);
Thanks for the heads up, will fix it.
>
> We removed the endian notation from ediv, but it seems from a quick read
> that the __le16 was correct. Btw, here is an article on how to use
> Sparse to find endian bugs: http://lwn.net/Articles/205624/
>
> regards,
> dan carpenter
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Cheers,
--
Vinicius
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-07 18:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 11:44 Bluetooth: Use the updated key structures for handling LTKs Dan Carpenter
2012-03-07 18:02 ` Vinicius Costa Gomes
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).