* [bluetooth-next:master 5/14] net/bluetooth/mgmt.c:3932:9: sparse: sparse: cast to restricted __le32
@ 2020-06-18 19:06 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-18 19:06 UTC (permalink / raw)
To: Abhishek Pandit-Subedi
Cc: kbuild-all, linux-bluetooth, Johan Hedberg, Alain Michaud,
Marcel Holtmann
[-- Attachment #1: Type: text/plain, Size: 3133 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
head: 46605a271114f1243c807a55c607271c81e662d2
commit: 4c54bf2b093bb2ae95e756342646d868e8101cb4 [5/14] Bluetooth: Add get/set device flags mgmt op
config: c6x-randconfig-s032-20200618 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-rc1-10-gc17b1b06-dirty
git checkout 4c54bf2b093bb2ae95e756342646d868e8101cb4
# save the attached .config to linux build tree
make W=1 C=1 ARCH=c6x CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
net/bluetooth/mgmt.c:3605:29: sparse: sparse: restricted __le16 degrades to integer
>> net/bluetooth/mgmt.c:3932:9: sparse: sparse: cast to restricted __le32
vim +3932 net/bluetooth/mgmt.c
3921
3922 static int set_device_flags(struct sock *sk, struct hci_dev *hdev, void *data,
3923 u16 len)
3924 {
3925 struct mgmt_cp_set_device_flags *cp = data;
3926 struct bdaddr_list_with_flags *br_params;
3927 struct hci_conn_params *params;
3928 u8 status = MGMT_STATUS_INVALID_PARAMS;
3929 u32 supported_flags = SUPPORTED_DEVICE_FLAGS();
3930 u32 current_flags = __le32_to_cpu(cp->current_flags);
3931
> 3932 bt_dev_dbg(hdev, "Set device flags %pMR (type 0x%x) = 0x%x",
3933 &cp->addr.bdaddr, cp->addr.type,
3934 __le32_to_cpu(current_flags));
3935
3936 if ((supported_flags | current_flags) != supported_flags) {
3937 bt_dev_warn(hdev, "Bad flag given (0x%x) vs supported (0x%0x)",
3938 current_flags, supported_flags);
3939 goto done;
3940 }
3941
3942 if (cp->addr.type == BDADDR_BREDR) {
3943 br_params = hci_bdaddr_list_lookup_with_flags(&hdev->whitelist,
3944 &cp->addr.bdaddr,
3945 cp->addr.type);
3946
3947 if (br_params) {
3948 br_params->current_flags = current_flags;
3949 status = MGMT_STATUS_SUCCESS;
3950 } else {
3951 bt_dev_warn(hdev, "No such BR/EDR device %pMR (0x%x)",
3952 &cp->addr.bdaddr, cp->addr.type);
3953 }
3954 } else {
3955 params = hci_conn_params_lookup(hdev, &cp->addr.bdaddr,
3956 le_addr_type(cp->addr.type));
3957 if (params) {
3958 params->current_flags = current_flags;
3959 status = MGMT_STATUS_SUCCESS;
3960 } else {
3961 bt_dev_warn(hdev, "No such LE device %pMR (0x%x)",
3962 &cp->addr.bdaddr,
3963 le_addr_type(cp->addr.type));
3964 }
3965 }
3966
3967 done:
3968 if (status == MGMT_STATUS_SUCCESS)
3969 device_flags_changed(sk, hdev, &cp->addr.bdaddr, cp->addr.type,
3970 supported_flags, current_flags);
3971
3972 return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_DEVICE_FLAGS, status,
3973 &cp->addr, sizeof(cp->addr));
3974 }
3975
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 22905 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-18 19:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-18 19:06 [bluetooth-next:master 5/14] net/bluetooth/mgmt.c:3932:9: sparse: sparse: cast to restricted __le32 kernel test robot
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).