linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Koba Ko <koba.ko@canonical.com>,
	Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org
Subject: Re: [PATCH] Bluetooth: btusb: add a reject table to disable msft
Date: Fri, 20 Aug 2021 03:56:39 +0800	[thread overview]
Message-ID: <202108200332.Bxb2MTlM-lkp@intel.com> (raw)
In-Reply-To: <20210819135927.49715-1-koba.ko@canonical.com>

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

Hi Koba,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth/master]
[also build test WARNING on v5.14-rc6]
[cannot apply to bluetooth-next/master next-20210819]
[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]

url:    https://github.com/0day-ci/linux/commits/Koba-Ko/Bluetooth-btusb-add-a-reject-table-to-disable-msft/20210819-220108
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
config: i386-randconfig-a003-20210819 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d2b574a4dea5b718e4386bf2e26af0126e5978ce)
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/0day-ci/linux/commit/bbff58c00c9efb048da28df9dbc3c79c0c40763b
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Koba-Ko/Bluetooth-btusb-add-a-reject-table-to-disable-msft/20210819-220108
        git checkout bbff58c00c9efb048da28df9dbc3c79c0c40763b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 

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 >>):

   clang-14: warning: optimization flag '-falign-jumps=0' is not supported [-Wignored-optimization-argument]
   In file included from drivers/bluetooth/btusb.c:9:
   In file included from include/linux/dmi.h:6:
   In file included from include/linux/kobject.h:20:
   In file included from include/linux/sysfs.h:16:
   In file included from include/linux/kernfs.h:12:
   In file included from include/linux/mutex.h:17:
   In file included from include/linux/lockdep.h:14:
   In file included from include/linux/smp.h:110:
   In file included from include/linux/preempt.h:78:
   In file included from arch/x86/include/asm/preempt.h:7:
   In file included from include/linux/thread_info.h:59:
   arch/x86/include/asm/thread_info.h:172:13: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
           oldframe = __builtin_frame_address(1);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/thread_info.h:174:11: warning: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Wframe-address]
                   frame = __builtin_frame_address(2);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/bluetooth/btusb.c:2917:9: warning: assigning to 'struct usb_device_id *' from 'const struct usb_device_id *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
                   match = usb_match_id(data->intf, msft_rej_table);
                         ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   3 warnings generated.


vim +2917 drivers/bluetooth/btusb.c

  2829	
  2830	static int btusb_setup_intel_new(struct hci_dev *hdev)
  2831	{
  2832		struct btusb_data *data = hci_get_drvdata(hdev);
  2833		struct intel_version ver;
  2834		struct intel_boot_params params;
  2835		u32 boot_param;
  2836		char ddcname[64];
  2837		int err;
  2838		struct intel_debug_features features;
  2839		struct usb_device_id *match;
  2840	
  2841		BT_DBG("%s", hdev->name);
  2842	
  2843		/* Set the default boot parameter to 0x0 and it is updated to
  2844		 * SKU specific boot parameter after reading Intel_Write_Boot_Params
  2845		 * command while downloading the firmware.
  2846		 */
  2847		boot_param = 0x00000000;
  2848	
  2849		/* Read the Intel version information to determine if the device
  2850		 * is in bootloader mode or if it already has operational firmware
  2851		 * loaded.
  2852		 */
  2853		err = btintel_read_version(hdev, &ver);
  2854		if (err) {
  2855			bt_dev_err(hdev, "Intel Read version failed (%d)", err);
  2856			btintel_reset_to_bootloader(hdev);
  2857			return err;
  2858		}
  2859	
  2860		err = btintel_version_info(hdev, &ver);
  2861		if (err)
  2862			return err;
  2863	
  2864		err = btusb_intel_download_firmware(hdev, &ver, &params, &boot_param);
  2865		if (err)
  2866			return err;
  2867	
  2868		/* controller is already having an operational firmware */
  2869		if (ver.fw_variant == 0x23)
  2870			goto finish;
  2871	
  2872		err = btusb_intel_boot(hdev, boot_param);
  2873		if (err)
  2874			return err;
  2875	
  2876		clear_bit(BTUSB_BOOTLOADER, &data->flags);
  2877	
  2878		err = btusb_setup_intel_new_get_fw_name(&ver, &params, ddcname,
  2879							sizeof(ddcname), "ddc");
  2880	
  2881		if (err < 0) {
  2882			bt_dev_err(hdev, "Unsupported Intel firmware naming");
  2883		} else {
  2884			/* Once the device is running in operational mode, it needs to
  2885			 * apply the device configuration (DDC) parameters.
  2886			 *
  2887			 * The device can work without DDC parameters, so even if it
  2888			 * fails to load the file, no need to fail the setup.
  2889			 */
  2890			btintel_load_ddc_config(hdev, ddcname);
  2891		}
  2892	
  2893		/* Read the Intel supported features and if new exception formats
  2894		 * supported, need to load the additional DDC config to enable.
  2895		 */
  2896		btintel_read_debug_features(hdev, &features);
  2897	
  2898		/* Set DDC mask for available debug features */
  2899		btintel_set_debug_features(hdev, &features);
  2900	
  2901		/* Read the Intel version information after loading the FW  */
  2902		err = btintel_read_version(hdev, &ver);
  2903		if (err)
  2904			return err;
  2905	
  2906		btintel_version_info(hdev, &ver);
  2907	
  2908	finish:
  2909		/* All Intel controllers that support the Microsoft vendor
  2910		 * extension are using 0xFC1E for VsMsftOpCode.
  2911		 */
  2912		switch (ver.hw_variant) {
  2913		case 0x11:	/* JfP */
  2914		case 0x12:	/* ThP */
  2915		case 0x13:	/* HrP */
  2916		case 0x14:	/* CcP */
> 2917			match = usb_match_id(data->intf, msft_rej_table);
  2918			if (!match)
  2919				hci_set_msft_opcode(hdev, 0xFC1E);
  2920			break;
  2921		}
  2922	
  2923		/* Set the event mask for Intel specific vendor events. This enables
  2924		 * a few extra events that are useful during general operation. It
  2925		 * does not enable any debugging related events.
  2926		 *
  2927		 * The device will function correctly without these events enabled
  2928		 * and thus no need to fail the setup.
  2929		 */
  2930		btintel_set_event_mask(hdev, false);
  2931	
  2932		return 0;
  2933	}
  2934	

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

  parent reply	other threads:[~2021-08-19 19:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 13:59 [PATCH] Bluetooth: btusb: add a reject table to disable msft Koba Ko
2021-08-19 14:46 ` Marcel Holtmann
2021-08-19 17:44 ` kernel test robot
2021-08-19 19:13 ` kernel test robot
2021-08-19 19:56 ` kernel test robot [this message]
2021-08-19 21:36 ` 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=202108200332.Bxb2MTlM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=johan.hedberg@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=koba.ko@canonical.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.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;
as well as URLs for NNTP newsgroup(s).