[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 Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux