Re: [PATCH v1] Bluetooth: btintel: Send new command for PPAG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lokendra,

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.5-rc5 next-20230809]
[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/Lokendra-Singh/Bluetooth-btintel-Send-new-command-for-PPAG/20230810-185334
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
patch link:    https://lore.kernel.org/r/20230810105502.27012-1-lokendra.singh%40intel.com
patch subject: [PATCH v1] Bluetooth: btintel: Send new command for PPAG
config: x86_64-randconfig-x011-20230810 (https://download.01.org/0day-ci/archive/20230810/202308102242.EKYkZi8t-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230810/202308102242.EKYkZi8t-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308102242.EKYkZi8t-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/bluetooth/btintel.c: In function 'btintel_set_ppag':
   drivers/bluetooth/btintel.c:2404:36: error: storage size of 'ppag_cmd' isn't known
    2404 |         struct hci_ppag_enable_cmd ppag_cmd;
         |                                    ^~~~~~~~
>> drivers/bluetooth/btintel.c:2404:36: warning: unused variable 'ppag_cmd' [-Wunused-variable]


vim +/ppag_cmd +2404 drivers/bluetooth/btintel.c

  2399	
  2400	static void btintel_set_ppag(struct hci_dev *hdev, struct intel_version_tlv *ver)
  2401	{
  2402		struct btintel_ppag ppag;
  2403		struct sk_buff *skb;
> 2404		struct hci_ppag_enable_cmd ppag_cmd;
  2405		acpi_handle handle;
  2406	
  2407		/* PPAG is not supported if CRF is HrP2, Jfp2, JfP1 */
  2408		switch (ver->cnvr_top & 0xFFF) {
  2409		case 0x504:     /* Hrp2 */
  2410		case 0x202:     /* Jfp2 */
  2411		case 0x201:     /* Jfp1 */
  2412			bt_dev_warn(hdev, "PPAG not supported for Intel CNVr (0x%3x)",
  2413				    ver->cnvr_top & 0xFFF);
  2414			return;
  2415		}
  2416	
  2417		handle = ACPI_HANDLE(GET_HCIDEV_DEV(hdev));
  2418		if (!handle) {
  2419			bt_dev_info(hdev, "No support for BT device in ACPI firmware");
  2420			return;
  2421		}
  2422	
  2423		memset(&ppag, 0, sizeof(ppag));
  2424	
  2425		ppag.hdev = hdev;
  2426		ppag.status = AE_NOT_FOUND;
  2427		acpi_walk_namespace(ACPI_TYPE_PACKAGE, handle, 1, NULL,
  2428				    btintel_ppag_callback, &ppag, NULL);
  2429	
  2430		if (ACPI_FAILURE(ppag.status)) {
  2431			if (ppag.status == AE_NOT_FOUND) {
  2432				bt_dev_dbg(hdev, "PPAG-BT: ACPI entry not found");
  2433				return;
  2434			}
  2435			return;
  2436		}
  2437	
  2438		if (ppag.domain != 0x12) {
  2439			bt_dev_warn(hdev, "PPAG-BT: Bluetooth domain is disabled in ACPI firmware");
  2440			return;
  2441		}
  2442	
  2443		/* PPAG mode
  2444		 * BIT 0 : 0 Disabled in EU
  2445		 *         1 Enabled in EU
  2446		 * BIT 1 : 0 Disabled in China
  2447		 *         1 Enabled in China
  2448		 */
  2449		if((ppag.mode & 0x01) != BIT(0) && (ppag.mode & 0x02) != BIT(1)) {
  2450			bt_dev_warn(hdev, "PPAG-BT: EU, China mode are disabled in CB/BIOS");
  2451			return;
  2452		}
  2453	
  2454		/* HCI_Intel_PpagEnable_CMD - opcode: 0xFE0B
  2455		 * ppag_enable_flags - ppag mode
  2456		 */
  2457		ppag_cmd.ppag_enable_flags = ppag.mode;
  2458	
  2459		skb = __hci_cmd_sync(hdev, 0xfe0b, sizeof(ppag_cmd), &ppag_cmd, HCI_CMD_TIMEOUT);
  2460		if (IS_ERR(skb)) {
  2461			bt_dev_warn(hdev, "Failed to send PPAG Enable (%ld)", PTR_ERR(skb));
  2462			return;
  2463		}
  2464		bt_dev_info(hdev, "PPAG-BT: Enabled (Mode %d)", ppag.mode);
  2465		kfree_skb(skb);
  2466	}
  2467	

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



[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