public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-bluetooth@vger.kernel.org,
	Marcel Holtmann <marcel@holtmann.org>
Subject: [bluetooth-next:master 3/6] net/bluetooth/hci_request.c:1111:13: warning: address of array 'hdev->suspend_tasks' will always evaluate to 'true'
Date: Thu, 7 Oct 2021 16:16:30 +0800	[thread overview]
Message-ID: <202110071622.YKfbkPfg-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
head:   f363f0eccfa4ec84d0ed3cd22446768b766548b1
commit: 912730b52552ff3d35f7c98d387709aa003b97c5 [3/6] Bluetooth: Fix wake up suspend_wait_q prematurely
config: riscv-randconfig-r042-20211007 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 58b68e70ebf6308f982426a2618782f473218eed)
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
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=912730b52552ff3d35f7c98d387709aa003b97c5
        git remote add bluetooth-next https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
        git fetch --no-tags bluetooth-next master
        git checkout 912730b52552ff3d35f7c98d387709aa003b97c5
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> net/bluetooth/hci_request.c:1111:13: warning: address of array 'hdev->suspend_tasks' will always evaluate to 'true' [-Wpointer-bool-conversion]
           if (!hdev->suspend_tasks)
               ~~~~~~~^~~~~~~~~~~~~
   1 warning generated.


vim +1111 net/bluetooth/hci_request.c

  1090	
  1091	static void suspend_req_complete(struct hci_dev *hdev, u8 status, u16 opcode)
  1092	{
  1093		bt_dev_dbg(hdev, "Request complete opcode=0x%x, status=0x%x", opcode,
  1094			   status);
  1095	
  1096		if (status) {
  1097			wake_up(&hdev->suspend_wait_q);
  1098			return;
  1099		}
  1100	
  1101		/* Clear all tasks that could be initiated using suspend_req_complete as
  1102		 * callback.
  1103		 */
  1104		clear_bit(SUSPEND_PAUSE_DISCOVERY, hdev->suspend_tasks);
  1105		clear_bit(SUSPEND_PAUSE_ADVERTISING, hdev->suspend_tasks);
  1106		clear_bit(SUSPEND_SCAN_ENABLE, hdev->suspend_tasks);
  1107		clear_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks);
  1108		clear_bit(SUSPEND_SET_ADV_FILTER, hdev->suspend_tasks);
  1109	
  1110		/* Wake up only if there are no tasks left */
> 1111		if (!hdev->suspend_tasks)
  1112			wake_up(&hdev->suspend_wait_q);
  1113	}
  1114	

---
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: 35160 bytes --]

                 reply	other threads:[~2021-10-07  8:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202110071622.YKfbkPfg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luiz.von.dentz@intel.com \
    --cc=marcel@holtmann.org \
    /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