public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: hildawu@realtek.com, marcel@holtmann.org
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	johan.hedberg@gmail.com, luiz.dentz@gmail.com,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	mmandlik@google.com, max.chou@realtek.com,
	alex_lu@realsil.com.cn, kidman@realtek.com
Subject: Re: [PATCH] Bluetooth: btusb: Add Realtek devcoredump support
Date: Fri, 23 Sep 2022 10:48:09 +0800	[thread overview]
Message-ID: <202209231041.TfIbIGWJ-lkp@intel.com> (raw)
In-Reply-To: <20220922103337.26167-1-hildawu@realtek.com>

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@intel.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

      parent reply	other threads:[~2022-09-23  2:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 10:33 [PATCH] Bluetooth: btusb: Add Realtek devcoredump support hildawu
2022-09-22 11:10 ` bluez.test.bot
2022-09-22 23:54 ` [PATCH] " kernel test robot
2022-09-23  2:48 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202209231041.TfIbIGWJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex_lu@realsil.com.cn \
    --cc=hildawu@realtek.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kidman@realtek.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=max.chou@realtek.com \
    --cc=mmandlik@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox