lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202209231041.TfIbIGWJ-lkp@intel.com>
Date:   Fri, 23 Sep 2022 10:48:09 +0800
From:   kernel test robot <lkp@...el.com>
To:     hildawu@...ltek.com, marcel@...tmann.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        johan.hedberg@...il.com, luiz.dentz@...il.com,
        linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org,
        mmandlik@...gle.com, max.chou@...ltek.com, alex_lu@...lsil.com.cn,
        kidman@...ltek.com
Subject: Re: [PATCH] Bluetooth: btusb: Add Realtek devcoredump support

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bluetooth/master]
[also build test ERROR on bluetooth-next/master linus/master v6.0-rc6 next-20220921]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/hildawu-realtek-com/Bluetooth-btusb-Add-Realtek-devcoredump-support/20220922-183533
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: x86_64-randconfig-a003 (https://download.01.org/0day-ci/archive/20220923/202209231041.TfIbIGWJ-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # https://github.com/intel-lab-lkp/linux/commit/b896c161a197fbcb019f6e4f890b667bb9d6f15e
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review hildawu-realtek-com/Bluetooth-btusb-Add-Realtek-devcoredump-support/20220922-183533
        git checkout b896c161a197fbcb019f6e4f890b667bb9d6f15e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/bluetooth/btusb.c:731:7: error: implicit declaration of function 'hci_devcoredump_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (!hci_devcoredump_init(hdev, skb->len)) {
                ^
>> drivers/bluetooth/btusb.c:732:3: error: implicit declaration of function 'hci_devcoredump_append' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   hci_devcoredump_append(hdev, skb);
                   ^
   drivers/bluetooth/btusb.c:732:3: note: did you mean 'hci_devcoredump_init'?
   drivers/bluetooth/btusb.c:731:7: note: 'hci_devcoredump_init' declared here
           if (!hci_devcoredump_init(hdev, skb->len)) {
                ^
>> drivers/bluetooth/btusb.c:733:3: error: implicit declaration of function 'hci_devcoredump_complete' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   hci_devcoredump_complete(hdev);
                   ^
   drivers/bluetooth/btusb.c:733:3: note: did you mean 'hci_devcoredump_append'?
   drivers/bluetooth/btusb.c:732:3: note: 'hci_devcoredump_append' declared here
                   hci_devcoredump_append(hdev, skb);
                   ^
   drivers/bluetooth/btusb.c:776:7: error: implicit declaration of function 'hci_devcoredump_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           if (!hci_devcoredump_init(hdev, skb->len)) {
                ^
   drivers/bluetooth/btusb.c:777:3: error: implicit declaration of function 'hci_devcoredump_append' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   hci_devcoredump_append(hdev, skb);
                   ^
   drivers/bluetooth/btusb.c:778:3: error: implicit declaration of function 'hci_devcoredump_complete' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   hci_devcoredump_complete(hdev);
                   ^
   drivers/bluetooth/btusb.c:2361:8: error: implicit declaration of function 'hci_devcoredump_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                   if (!hci_devcoredump_init(hdev, nskb->len)) {
                        ^
   drivers/bluetooth/btusb.c:2362:4: error: implicit declaration of function 'hci_devcoredump_append' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                           hci_devcoredump_append(hdev, nskb);
                           ^
   drivers/bluetooth/btusb.c:2363:4: error: implicit declaration of function 'hci_devcoredump_complete' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                           hci_devcoredump_complete(hdev);
                           ^
   9 errors generated.
--
>> drivers/bluetooth/btrtl.c:657:8: error: implicit declaration of function 'hci_devcoredump_register' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           err = hci_devcoredump_register(hdev, btrtl_coredump, btrtl_dmp_hdr,
                 ^
   1 error generated.


vim +/hci_devcoredump_init +731 drivers/bluetooth/btusb.c

   719	
   720	static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
   721	{
   722		struct btusb_data *data = hci_get_drvdata(hdev);
   723		struct gpio_desc *reset_gpio = data->reset_gpio;
   724		struct sk_buff *skb;
   725		u8 code[4] = { DEVCOREDUMP_CODE_CMD_TIMEOUT, 0, 0, 0 };
   726	
   727		skb = alloc_skb(sizeof(code), GFP_ATOMIC);
   728		if (!skb)
   729			goto timeout_check;
   730		skb_put_data(skb, code, sizeof(code));
 > 731		if (!hci_devcoredump_init(hdev, skb->len)) {
 > 732			hci_devcoredump_append(hdev, skb);
 > 733			hci_devcoredump_complete(hdev);
   734		} else {
   735			bt_dev_err(hdev, "RTL: cmd timeout, failed to devcoredump");
   736			kfree_skb(skb);
   737		}
   738	
   739	timeout_check:
   740		if (++data->cmd_timeout_cnt < 5)
   741			return;
   742	
   743		if (!reset_gpio) {
   744			bt_dev_err(hdev, "No gpio to reset Realtek device, ignoring");
   745			return;
   746		}
   747	
   748		/* Toggle the hard reset line. The Realtek device is going to
   749		 * yank itself off the USB and then replug. The cleanup is handled
   750		 * correctly on the way out (standard USB disconnect), and the new
   751		 * device is detected cleanly and bound to the driver again like
   752		 * it should be.
   753		 */
   754		if (test_and_set_bit(BTUSB_HW_RESET_ACTIVE, &data->flags)) {
   755			bt_dev_err(hdev, "last reset failed? Not resetting again");
   756			return;
   757		}
   758	
   759		bt_dev_err(hdev, "Reset Realtek device via gpio");
   760		gpiod_set_value_cansleep(reset_gpio, 1);
   761		msleep(200);
   762		gpiod_set_value_cansleep(reset_gpio, 0);
   763	}
   764	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ