From: kernel test robot <lkp@intel.com>
To: Hilda Wu <hildawu@realtek.com>, marcel@holtmann.org
Cc: oe-kbuild-all@lists.linux.dev, luiz.dentz@gmail.com,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
max.chou@realtek.com, alex_lu@realsil.com.cn, kidman@realtek.com
Subject: Re: [PATCH] bluetooth: add quirk using packet size 60
Date: Thu, 31 Oct 2024 20:49:13 +0800 [thread overview]
Message-ID: <202410312046.r3WbTClD-lkp@intel.com> (raw)
In-Reply-To: <20241030100804.2743115-1-hildawu@realtek.com>
Hi Hilda,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master linus/master v6.12-rc5 next-20241031]
[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/Hilda-Wu/bluetooth-add-quirk-using-packet-size-60/20241030-181008
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link: https://lore.kernel.org/r/20241030100804.2743115-1-hildawu%40realtek.com
patch subject: [PATCH] bluetooth: add quirk using packet size 60
config: x86_64-randconfig-123-20241031 (https://download.01.org/0day-ci/archive/20241031/202410312046.r3WbTClD-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241031/202410312046.r3WbTClD-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/202410312046.r3WbTClD-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btusb.c:2156:65: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] wMaxPacketSize @@ got int @@
drivers/bluetooth/btusb.c:2156:65: sparse: expected restricted __le16 [usertype] wMaxPacketSize
drivers/bluetooth/btusb.c:2156:65: sparse: got int
drivers/bluetooth/btusb.c:2188:65: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] wMaxPacketSize @@ got int @@
drivers/bluetooth/btusb.c:2188:65: sparse: expected restricted __le16 [usertype] wMaxPacketSize
drivers/bluetooth/btusb.c:2188:65: sparse: got int
>> drivers/bluetooth/btusb.c:2156:65: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] wMaxPacketSize @@ got int @@
drivers/bluetooth/btusb.c:2156:65: sparse: expected restricted __le16 [usertype] wMaxPacketSize
drivers/bluetooth/btusb.c:2156:65: sparse: got int
drivers/bluetooth/btusb.c:2188:65: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le16 [usertype] wMaxPacketSize @@ got int @@
drivers/bluetooth/btusb.c:2188:65: sparse: expected restricted __le16 [usertype] wMaxPacketSize
drivers/bluetooth/btusb.c:2188:65: sparse: got int
vim +2156 drivers/bluetooth/btusb.c
2126
2127 static inline int __set_isoc_interface(struct hci_dev *hdev, int altsetting)
2128 {
2129 struct btusb_data *data = hci_get_drvdata(hdev);
2130 struct usb_interface *intf = data->isoc;
2131 struct usb_endpoint_descriptor *ep_desc;
2132 struct usb_host_interface *alt;
2133 int i, err;
2134
2135 if (!data->isoc)
2136 return -ENODEV;
2137
2138 /* For some Realtek chips, they actually have the altsetting 6, but its
2139 * altsetting descriptor is not exposed. We can activate altsetting 6 by
2140 * replacing the altsetting 5.
2141 */
2142 if (altsetting == 6 && !btusb_find_altsetting(data, 6) &&
2143 btrealtek_test_flag(hdev, REALTEK_ALT6_FORCE)) {
2144 alt = NULL;
2145 for (i = 0; i < intf->num_altsetting; i++) {
2146 if (intf->altsetting[i].desc.bAlternateSetting == 5) {
2147 alt = &intf->altsetting[i];
2148 break;
2149 }
2150 }
2151 if (alt) {
2152 for (i = 0; i < alt->desc.bNumEndpoints; i++) {
2153 ep_desc = &alt->endpoint[i].desc;
2154 if (usb_endpoint_is_isoc_out(ep_desc) ||
2155 usb_endpoint_is_isoc_in(ep_desc))
> 2156 ep_desc->wMaxPacketSize = 63;
2157 }
2158 alt->desc.bAlternateSetting = 6;
2159 set_bit(BTUSB_ALT_CHANGED, &data->flags);
2160 }
2161 }
2162
2163 err = usb_set_interface(data->udev, data->isoc_ifnum, altsetting);
2164 if (err < 0) {
2165 bt_dev_err(hdev, "setting interface failed (%d)", -err);
2166 return err;
2167 }
2168
2169 data->isoc_altsetting = altsetting;
2170
2171 data->isoc_tx_ep = NULL;
2172 data->isoc_rx_ep = NULL;
2173
2174 /* Recover alt 5 desc if alt 0 is set. */
2175 if (!altsetting && test_bit(BTUSB_ALT_CHANGED, &data->flags)) {
2176 alt = NULL;
2177 for (i = 0; i < intf->num_altsetting; i++) {
2178 if (intf->altsetting[i].desc.bAlternateSetting == 6) {
2179 alt = &intf->altsetting[i];
2180 break;
2181 }
2182 }
2183 if (alt) {
2184 for (i = 0; i < alt->desc.bNumEndpoints; i++) {
2185 ep_desc = &alt->endpoint[i].desc;
2186 if (usb_endpoint_is_isoc_out(ep_desc) ||
2187 usb_endpoint_is_isoc_in(ep_desc))
2188 ep_desc->wMaxPacketSize = 49;
2189 }
2190 alt->desc.bAlternateSetting = 5;
2191 clear_bit(BTUSB_ALT_CHANGED, &data->flags);
2192 }
2193 }
2194
2195 for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) {
2196 ep_desc = &intf->cur_altsetting->endpoint[i].desc;
2197
2198 if (!data->isoc_tx_ep && usb_endpoint_is_isoc_out(ep_desc)) {
2199 data->isoc_tx_ep = ep_desc;
2200 continue;
2201 }
2202
2203 if (!data->isoc_rx_ep && usb_endpoint_is_isoc_in(ep_desc)) {
2204 data->isoc_rx_ep = ep_desc;
2205 continue;
2206 }
2207 }
2208
2209 if (!data->isoc_tx_ep || !data->isoc_rx_ep) {
2210 bt_dev_err(hdev, "invalid SCO descriptors");
2211 return -ENODEV;
2212 }
2213
2214 return 0;
2215 }
2216
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-10-31 12:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 10:08 [PATCH] bluetooth: add quirk using packet size 60 Hilda Wu
2024-10-31 12:49 ` kernel test robot [this message]
2024-10-31 20:47 ` Luiz Augusto von Dentz
2024-11-18 9:01 ` Hilda Wu
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=202410312046.r3WbTClD-lkp@intel.com \
--to=lkp@intel.com \
--cc=alex_lu@realsil.com.cn \
--cc=hildawu@realtek.com \
--cc=kidman@realtek.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=max.chou@realtek.com \
--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.