Hi Miao-chen, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on bluetooth-next/master] [also build test WARNING on next-20200323] [cannot apply to v5.6-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Miao-chen-Chou/btusb-Introduce-the-use-of-vendor-extension-s/20200323-165723 base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master reproduce: # apt-get install sparse # sparse version: v0.6.1-187-gbff9b106-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) >> net/bluetooth/hci_event.c:1793:32: sparse: sparse: cast to restricted __le16 >> net/bluetooth/hci_event.c:1810:47: sparse: sparse: cast to restricted __le64 arch/x86/include/asm/bitops.h:77:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f) arch/x86/include/asm/bitops.h:77:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f) arch/x86/include/asm/bitops.h:77:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f) arch/x86/include/asm/bitops.h:77:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f) arch/x86/include/asm/bitops.h:77:37: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f) vim +1793 net/bluetooth/hci_event.c 1788 1789 static void hci_cc_msft_vnd_ext(struct hci_dev *hdev, struct sk_buff *skb) 1790 { 1791 struct msft_cmd_cmp_info *info = (void *)skb->data; 1792 const u8 status = info->status; > 1793 const u16 sub_opcode = __le16_to_cpu(info->sub_opcode); 1794 1795 skb_pull(skb, sizeof(*info)); 1796 1797 if (status) { 1798 BT_ERR("Microsoft vendor extension sub command 0x%2.2x failed", 1799 sub_opcode); 1800 return; 1801 } 1802 1803 BT_DBG("%s status 0x%2.2x sub opcode 0x%2.2x", hdev->name, status, 1804 sub_opcode); 1805 1806 switch (sub_opcode) { 1807 case MSFT_OP_READ_SUPPORTED_FEATURES: { 1808 struct msft_rp_read_supported_features *rp = (void *)skb->data; 1809 > 1810 hdev->msft_vnd_ext_features = __le64_to_cpu(rp->features); 1811 hdev->msft_vnd_ext_evt_prefix_len = rp->msft_evt_prefix_len; 1812 hdev->msft_vnd_ext_evt_prefix = 1813 kmalloc(hdev->msft_vnd_ext_evt_prefix_len, GFP_ATOMIC); 1814 if (!hdev->msft_vnd_ext_evt_prefix) 1815 return; 1816 1817 memcpy(hdev->msft_vnd_ext_evt_prefix, rp->msft_evt_prefix, 1818 hdev->msft_vnd_ext_evt_prefix_len); 1819 BT_DBG("%s Microsoft vendor extension features 0x%016llx", 1820 hdev->name, hdev->msft_vnd_ext_features); 1821 break; 1822 } 1823 default: 1824 BT_ERR("%s unknown sub opcode 0x%2.2x", hdev->name, 1825 sub_opcode); 1826 break; 1827 } 1828 } 1829 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx