Re: [PATCH v5 BlueZ 4/4] Bluetooth: Handle Slave Connection Interval Range AD

From: kbuild test robot
Date: Thu Apr 13 2017 - 16:02:59 EST


Hi Felipe,

[auto build test WARNING on bluetooth/master]
[also build test WARNING on v4.11-rc6 next-20170413]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Felipe-F-Tonello/Connection-Update-improvements/20170414-030326
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: x86_64-randconfig-x011-201715 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

In file included from include/linux/byteorder/little_endian.h:4:0,
from arch/x86/include/uapi/asm/byteorder.h:4,
from include/asm-generic/bitops/le.h:5,
from arch/x86/include/asm/bitops.h:517,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/module.h:9,
from net/bluetooth/mgmt.c:27:
net/bluetooth/mgmt.c: In function 'has_eir_slave_conn_int':
>> include/uapi/linux/byteorder/little_endian.h:35:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
include/linux/byteorder/generic.h:90:21: note: in expansion of macro '__le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^~~~~~~~~~~~~
>> net/bluetooth/mgmt.c:7474:16: note: in expansion of macro 'le16_to_cpu'
*min_conn = le16_to_cpu(&data[0]);
^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
include/linux/byteorder/generic.h:90:21: note: in expansion of macro '__le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^~~~~~~~~~~~~
net/bluetooth/mgmt.c:7475:16: note: in expansion of macro 'le16_to_cpu'
*max_conn = le16_to_cpu(&data[2]);
^~~~~~~~~~~
--
In file included from include/linux/byteorder/little_endian.h:4:0,
from arch/x86/include/uapi/asm/byteorder.h:4,
from include/asm-generic/bitops/le.h:5,
from arch/x86/include/asm/bitops.h:517,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/module.h:9,
from net//bluetooth/mgmt.c:27:
net//bluetooth/mgmt.c: In function 'has_eir_slave_conn_int':
>> include/uapi/linux/byteorder/little_endian.h:35:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
include/linux/byteorder/generic.h:90:21: note: in expansion of macro '__le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^~~~~~~~~~~~~
net//bluetooth/mgmt.c:7474:16: note: in expansion of macro 'le16_to_cpu'
*min_conn = le16_to_cpu(&data[0]);
^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
include/linux/byteorder/generic.h:90:21: note: in expansion of macro '__le16_to_cpu'
#define le16_to_cpu __le16_to_cpu
^~~~~~~~~~~~~
net//bluetooth/mgmt.c:7475:16: note: in expansion of macro 'le16_to_cpu'
*max_conn = le16_to_cpu(&data[2]);
^~~~~~~~~~~

vim +/le16_to_cpu +7474 net/bluetooth/mgmt.c

7458 break;
7459
7460 len += field_len + 1;
7461
7462 /* Do not continue EIR Data parsing if got
7463 * incorrect length
7464 */
7465 if (len > eir_len)
7466 break;
7467
7468 data = &eir_data[2];
7469 data_len = field_len - 1;
7470
7471 if (eir_data[1] == EIR_SLAVE_CONN_INT) {
7472 if (data_len < 4)
7473 break;
> 7474 *min_conn = le16_to_cpu(&data[0]);
7475 *max_conn = le16_to_cpu(&data[2]);
7476 return true;
7477 }
7478
7479 eir_data += field_len + 1;
7480 }
7481
7482 return false;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip