All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kiran K <kiran.k@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v2 2/3] Bluetooth: btintel_pcie: Add support for PCIe transport
Date: Wed, 8 May 2024 06:25:56 +0800	[thread overview]
Message-ID: <202405080647.VRBej6fA-lkp@intel.com> (raw)
In-Reply-To: <20240507155658.294676-2-kiran.k@intel.com>

Hi Kiran,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on bluetooth/master linus/master v6.9-rc7 next-20240507]
[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/Kiran-K/Bluetooth-btintel_pcie-Add-support-for-PCIe-transport/20240507-234447
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
patch link:    https://lore.kernel.org/r/20240507155658.294676-2-kiran.k%40intel.com
patch subject: [PATCH v2 2/3] Bluetooth: btintel_pcie: Add support for PCIe transport
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240508/202405080647.VRBej6fA-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405080647.VRBej6fA-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405080647.VRBej6fA-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/bluetooth/btintel_pcie.c:184:6: warning: variable 'reg' set but not used [-Wunused-but-set-variable]
           u32 reg;
               ^
>> drivers/bluetooth/btintel_pcie.c:192:26: warning: shift count >= width of type [-Wshift-count-overflow]
                                 data->ci_p_addr >> 32);
                                                 ^  ~~
>> drivers/bluetooth/btintel_pcie.c:458:15: warning: variable 'frbd' set but not used [-Wunused-but-set-variable]
           struct frbd *frbd;
                        ^
   3 warnings generated.


vim +/reg +184 drivers/bluetooth/btintel_pcie.c

   174	
   175	/* This function enables BT function by setting BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT bit in
   176	 * BTINTEL_PCIE_CSR_FUNC_CTRL_REG register and wait for MSI-X with
   177	 * BTINTEL_PCIE_MSIX_HW_INT_CAUSES_GP0.
   178	 * Then the host reads firmware version from BTINTEL_CSR_F2D_MBX and the boot stage
   179	 * from BTINTEL_PCIE_CSR_BOOT_STAGE_REG.
   180	 */
   181	static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
   182	{
   183		int err;
 > 184		u32 reg;
   185	
   186		data->gp0_received = false;
   187	
   188		/* Update the DMA address of CI struct to CSR */
   189		btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_CI_ADDR_LSB_REG,
   190				      data->ci_p_addr & 0xffffffff);
   191		btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_CI_ADDR_MSB_REG,
 > 192				      data->ci_p_addr >> 32);
   193	
   194		/* Reset the cached value of boot stage. it is updated by the MSI-X
   195		 * gp0 interrupt handler.
   196		 */
   197		data->boot_stage_cache = 0x0;
   198	
   199		/* Set MAC_INIT bit to start primary bootloader */
   200		reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
   201	
   202		btintel_pcie_set_reg_bits(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
   203					  BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT);
   204	
   205		/* Wait until MAC_ACCESS is granted */
   206		err = btintel_pcie_poll_bit(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
   207					    BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_ACCESS_STS,
   208					    BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_ACCESS_STS,
   209					    BTINTEL_DEFAULT_MAC_ACCESS_TIMEOUT_US);
   210		if (err < 0)
   211			return -ENODEV;
   212	
   213		/* MAC is ready. Enable BT FUNC */
   214		btintel_pcie_set_reg_bits(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG,
   215					  BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_ENA |
   216					  BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT);
   217	
   218		reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG);
   219	
   220		/* wait for interrupt from the device after booting up to primary
   221		 * bootloader.
   222		 */
   223		err = wait_event_timeout(data->gp0_wait_q, data->gp0_received,
   224					 msecs_to_jiffies(BTINTEL_DEFAULT_INTR_TIMEOUT));
   225		if (!err)
   226			return -ETIME;
   227	
   228		/* Check cached boot stage is BTINTEL_PCIE_CSR_BOOT_STAGE_ROM(BIT(0)) */
   229		if (~data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ROM)
   230			return -ENODEV;
   231	
   232		return 0;
   233	}
   234	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-05-07 22:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 15:56 [PATCH v2 1/3] Bluetooth: btintel: Export few static functions Kiran K
2024-05-07 15:56 ` [PATCH v2 2/3] Bluetooth: btintel_pcie: Add support for PCIe transport Kiran K
2024-05-07 16:29   ` Luiz Augusto von Dentz
2024-05-07 22:25   ` kernel test robot [this message]
2024-05-08  3:22   ` kernel test robot
2024-05-07 15:56 ` [PATCH v2 3/3] Bluetooth: btintel_pcie: Add *setup* function to download firmware Kiran K
2024-05-07 16:56   ` Luiz Augusto von Dentz
2024-05-07 16:34 ` [v2,1/3] Bluetooth: btintel: Export few static functions bluez.test.bot
2024-05-07 20:20 ` [PATCH v2 1/3] " patchwork-bot+bluetooth
2024-05-07 20:29   ` Luiz Augusto von Dentz
  -- strict thread matches above, loose matches on Subject: below --
2024-05-08 18:41 [PATCH v2 2/3] Bluetooth: btintel_pcie: Add support for PCIe transport kernel test robot

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=202405080647.VRBej6fA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kiran.k@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.