Re: [PATCH v2 3/7] Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR

From: Jakub Kicinski
Date: Wed Jun 03 2020 - 23:06:25 EST


On Wed, 3 Jun 2020 16:01:46 -0700 Miao-chen Chou wrote:
> This adds the request handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR command.
> Note that the controller-based monitoring is not yet in place. This tracks
> the content of the monitor without sending HCI traffic, so the request
> returns immediately.
>
> The following manual test was performed.
> - Issue btmgmt advmon-add with valid and invalid inputs.
> - Issue btmgmt advmon-add more the allowed number of monitors.
>
> Signed-off-by: Miao-chen Chou <mcchou@xxxxxxxxxxxx>

Looks like this adds new sparse warnings:

net/bluetooth/mgmt.c:3886:32: warning: incorrect type in assignment (different base types)
net/bluetooth/mgmt.c:3886:32: expected unsigned int [usertype] supported_features
net/bluetooth/mgmt.c:3886:32: got restricted __le32 [usertype]
net/bluetooth/mgmt.c:3888:29: warning: incorrect type in assignment (different base types)
net/bluetooth/mgmt.c:3888:29: expected unsigned short [usertype] max_num_handles
net/bluetooth/mgmt.c:3888:29: got restricted __le16 [usertype]
net/bluetooth/mgmt.c:3890:25: warning: incorrect type in assignment (different base types)
net/bluetooth/mgmt.c:3890:25: expected unsigned short [usertype] num_handles
net/bluetooth/mgmt.c:3890:25: got restricted __le16 [usertype]

Please make sure patches build cleanly with W=1 C=1 flags.