tree:
https://android.googlesource.com/kernel/common android-3.18
head: 90185371a0bcda7afe26ea32a64b815fac6e1349
commit: af397d0efa00bc54c10aff845018794c461c6b8e [16538/16558] Bluetooth: MGMT: Fix not
checking if BT_HS is enabled
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 5.5.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add android-common
https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-3.18
git checkout af397d0efa00bc54c10aff845018794c461c6b8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-5.5.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/arm64/include/asm/mmu.h:24:0,
from include/linux/mm_types.h:18,
from include/linux/sched.h:27,
from arch/arm64/include/asm/compat.h:25,
from arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from net/bluetooth/mgmt.c:27:
arch/arm64/include/asm/cpufeature.h: In function 'arm64_ftr_value':
arch/arm64/include/asm/cpufeature.h:153:68: warning: signed and unsigned type in
conditional expression [-Wsign-compare]
cpuid_feature_extract_field_width(val, ftrp->shift, ftrp->width) :
^
In file included from arch/arm64/include/asm/compat.h:25:0,
from arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from net/bluetooth/mgmt.c:27:
include/linux/sched.h: At top level:
include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
^
In file included from include/linux/if_ether.h:23:0,
from include/uapi/linux/ethtool.h:17,
from include/linux/ethtool.h:16,
from include/linux/netdevice.h:43,
from include/net/sock.h:51,
from include/net/bluetooth/bluetooth.h:29,
from net/bluetooth/mgmt.c:30:
include/linux/skbuff.h: In function 'skb_can_coalesce':
include/linux/skbuff.h:2528:14: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
off == frag->page_offset + skb_frag_size(frag);
^
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/module.h:9,
from net/bluetooth/mgmt.c:27:
include/linux/netdevice.h: In function 'get_netdev_rx_queue_index':
include/linux/netdevice.h:2830:15: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
BUG_ON(index >= dev->num_rx_queues);
^
include/linux/compiler.h:176:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/netdevice.h:2830:2: note: in expansion of macro 'BUG_ON'
BUG_ON(index >= dev->num_rx_queues);
^
In file included from include/net/sock.h:51:0,
from include/net/bluetooth/bluetooth.h:29,
from net/bluetooth/mgmt.c:30:
include/linux/netdevice.h: In function 'netif_msg_init':
include/linux/netdevice.h:3101:37: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
if (debug_value < 0 || debug_value >= (sizeof(u32) * 8))
^
In file included from include/net/sock.h:63:0,
from include/net/bluetooth/bluetooth.h:29,
from net/bluetooth/mgmt.c:30:
include/linux/filter.h: In function 'bpf_needs_clear_a':
include/linux/filter.h:444:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
^
In file included from include/net/rtnetlink.h:5:0,
from include/net/neighbour.h:29,
from include/net/dst.h:17,
from include/net/sock.h:68,
from include/net/bluetooth/bluetooth.h:29,
from net/bluetooth/mgmt.c:30:
include/net/netlink.h: In function 'nlmsg_ok':
include/net/netlink.h:334:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
nlh->nlmsg_len <= remaining);
^
include/net/netlink.h: In function 'nlmsg_parse':
include/net/netlink.h:369:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
include/net/netlink.h: In function 'nlmsg_validate':
include/net/netlink.h:402:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
In file included from include/net/neighbour.h:29:0,
from include/net/dst.h:17,
from include/net/sock.h:68,
from include/net/bluetooth/bluetooth.h:29,
from net/bluetooth/mgmt.c:30:
include/net/rtnetlink.h: In function 'rtnl_msg_family':
include/net/rtnetlink.h:20:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
^
net/bluetooth/mgmt.c: In function 'create_uuid16_list':
net/bluetooth/mgmt.c:668:34: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if ((ptr - data) + sizeof(u16) > len) {
^
net/bluetooth/mgmt.c: In function 'create_uuid32_list':
net/bluetooth/mgmt.c:701:34: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if ((ptr - data) + sizeof(u32) > len) {
^
net/bluetooth/mgmt.c: In function 'set_link_security':
> net/bluetooth/mgmt.c:1978:10: error: implicit declaration of
function 'mgmt_cmd_status' [-Werror=implicit-function-declaration]
return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_HS,
^
cc1: some warnings being treated as errors
vim +/mgmt_cmd_status +1978 net/bluetooth/mgmt.c
1966
1967 static int set_link_security(struct sock *sk, struct hci_dev *hdev, void *data,
1968 u16 len)
1969 {
1970 struct mgmt_mode *cp = data;
1971 struct pending_cmd *cmd;
1972 u8 val, status;
1973 int err;
1974
1975 BT_DBG("request for %s", hdev->name);
1976
1977 if (!IS_ENABLED(CONFIG_BT_HS))
1978 return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_HS,
1979 MGMT_STATUS_NOT_SUPPORTED);
1980
1981 status = mgmt_bredr_support(hdev);
1982 if (status)
1983 return cmd_status(sk, hdev->id, MGMT_OP_SET_LINK_SECURITY,
1984 status);
1985
1986 if (cp->val != 0x00 && cp->val != 0x01)
1987 return cmd_status(sk, hdev->id, MGMT_OP_SET_LINK_SECURITY,
1988 MGMT_STATUS_INVALID_PARAMS);
1989
1990 hci_dev_lock(hdev);
1991
1992 if (!hdev_is_powered(hdev)) {
1993 bool changed = false;
1994
1995 if (!!cp->val != test_bit(HCI_LINK_SECURITY,
1996 &hdev->dev_flags)) {
1997 change_bit(HCI_LINK_SECURITY, &hdev->dev_flags);
1998 changed = true;
1999 }
2000
2001 err = send_settings_rsp(sk, MGMT_OP_SET_LINK_SECURITY, hdev);
2002 if (err < 0)
2003 goto failed;
2004
2005 if (changed)
2006 err = new_settings(hdev, sk);
2007
2008 goto failed;
2009 }
2010
2011 if (mgmt_pending_find(MGMT_OP_SET_LINK_SECURITY, hdev)) {
2012 err = cmd_status(sk, hdev->id, MGMT_OP_SET_LINK_SECURITY,
2013 MGMT_STATUS_BUSY);
2014 goto failed;
2015 }
2016
2017 val = !!cp->val;
2018
2019 if (test_bit(HCI_AUTH, &hdev->flags) == val) {
2020 err = send_settings_rsp(sk, MGMT_OP_SET_LINK_SECURITY, hdev);
2021 goto failed;
2022 }
2023
2024 cmd = mgmt_pending_add(sk, MGMT_OP_SET_LINK_SECURITY, hdev, data, len);
2025 if (!cmd) {
2026 err = -ENOMEM;
2027 goto failed;
2028 }
2029
2030 err = hci_send_cmd(hdev, HCI_OP_WRITE_AUTH_ENABLE, sizeof(val), &val);
2031 if (err < 0) {
2032 mgmt_pending_remove(cmd);
2033 goto failed;
2034 }
2035
2036 failed:
2037 hci_dev_unlock(hdev);
2038 return err;
2039 }
2040
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org