From: kbuild test robot <lkp@intel.com>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: kbuild-all@01.org, linux-bluetooth@vger.kernel.org,
Nishant Sarmukadam <nishants@marvell.com>,
linux-kernel@vger.kernel.org, Cathy Luo <cluo@marvell.com>,
marcel@holtmann.org, Ganapathi Bhat <gbhat@marvell.com>,
Amitkumar Karwar <akarwar@marvell.com>
Subject: Re: [PATCH] Bluetooth: hci_uart: Support firmware download for Marvell
Date: Tue, 16 Feb 2016 00:25:57 +0800 [thread overview]
Message-ID: <201602160006.xiXzASZ0%fengguang.wu@intel.com> (raw)
In-Reply-To: <1455550188-25934-1-git-send-email-akarwar@marvell.com>
[-- Attachment #1: Type: text/plain, Size: 4756 bytes --]
Hi Ganapathi,
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on v4.5-rc4 next-20160215]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Amitkumar-Karwar/Bluetooth-hci_uart-Support-firmware-download-for-Marvell/20160215-234258
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: i386-allmodconfig (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from drivers/bluetooth/hci_mrvl.c:41:0:
drivers/bluetooth/hci_mrvl.c: In function 'mrvl_dnld_fw':
>> drivers/bluetooth/hci_mrvl.c:301:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'size_t {aka const unsigned int}' [-Wformat=]
BT_INFO("Downloading FW (%lu bytes)\n", fw->size);
^
include/net/bluetooth/bluetooth.h:133:35: note: in definition of macro 'BT_INFO'
#define BT_INFO(fmt, ...) bt_info(fmt "\n", ##__VA_ARGS__)
^
coccinelle warnings: (new ones prefixed by >>)
>> drivers/bluetooth/hci_mrvl.c:411:9-10: WARNING: return of 0/1 in function 'mrvl_fw_loaded' with return type bool
--
>> drivers/bluetooth/hci_mrvl.c:536:20-27: ERROR: tty is NULL but dereferenced.
Please review and possibly fold the followup patch.
vim +301 drivers/bluetooth/hci_mrvl.c
295 if (ret < 0) {
296 BT_ERR("request_firmware() failed\n");
297 ret = -1;
298 goto done;
299 }
300 if (fw) {
> 301 BT_INFO("Downloading FW (%lu bytes)\n", fw->size);
302 } else {
303 BT_ERR("No FW image found\n");
304 ret = -1;
305 goto done;
306 }
307
308 skb = bt_skb_alloc(MRVL_MAX_FW_BLOCK_SIZE, GFP_ATOMIC);
309 if (!skb) {
310 BT_ERR("cannot allocate memory for skb\n");
311 ret = -1;
312 goto done;
313 }
314
315 skb->dev = (void *)hdev;
316 fw_data->last_ack = 0;
317
318 do {
319 if ((offset >= fw->size) || (fw_data->last_ack))
320 break;
321 tx_len = fw_data->next_len;
322 if ((fw->size - offset) < tx_len)
323 tx_len = fw->size - offset;
324
325 memcpy(skb->data, &fw->data[offset], tx_len);
326 skb_put(skb, tx_len);
327 if (mrvl_send_data(hu, skb) != 0) {
328 BT_ERR("fail to download firmware\n");
329 ret = -1;
330 goto done;
331 }
332 skb_push(skb, tx_len);
333 skb_trim(skb, 0);
334 offset += tx_len;
335 } while (1);
336
337 BT_INFO("downloaded %d byte firmware\n", offset);
338 done:
339 if (fw)
340 release_firmware(fw);
341
342 kfree(skb);
343 BT_INFO("leave dnld_fw\n");
344
345 return ret;
346 }
347
348 /* Get standard baud rate, given the speed */
349 static unsigned int get_baud_rate(unsigned int speed)
350 {
351 switch (speed) {
352 case 9600:
353 return B9600;
354 case 19200:
355 return B19200;
356 case 38400:
357 return B38400;
358 case 57600:
359 return B57600;
360 case 115200:
361 return B115200;
362 case 230400:
363 return B230400;
364 case 460800:
365 return B460800;
366 case 921600:
367 return B921600;
368 case 2000000:
369 return B2000000;
370 case 3000000:
371 return B3000000;
372 default:
373 return -1;
374 }
375 }
376
377 /* Set terminal properties */
378 static int mrvl_set_termios(struct tty_struct *tty, unsigned int speed,
379 unsigned char flow_ctl)
380 {
381 struct ktermios old_termios = tty->termios;
382 int baud;
383
384 tty->termios.c_cflag &= ~CBAUD;
385 baud = get_baud_rate(speed);
386
387 if (baud == -1) {
388 BT_ERR("Baud rate not supported\n");
389 return -1;
390 }
391
392 tty->termios.c_cflag |= baud;
393
394 if (flow_ctl)
395 tty->termios.c_cflag |= CRTSCTS;
396 else
397 tty->termios.c_cflag &= ~CRTSCTS;
398
399 tty->ops->set_termios(tty, &old_termios);
400
401 return 0;
402 }
403
404 /* Check if firmware is already loaded */
405 static bool mrvl_fw_loaded(struct hci_uart *hu)
406 {
407 struct mrvl_data *mrvl = hu->priv;
408 struct fw_data *fw_data = mrvl->fwdata;
409
410 if ((get_cts(hu->tty)) || (fw_data->fw_loaded))
> 411 return 1;
412 else
413 return 0;
414 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 53461 bytes --]
next prev parent reply other threads:[~2016-02-15 16:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 15:29 Amitkumar Karwar
2016-02-15 16:25 ` kbuild test robot [this message]
2016-02-15 16:25 ` [PATCH] Bluetooth: hci_uart: fix boolreturn.cocci warnings kbuild test robot
2016-02-15 17:09 ` Joe Perches
2016-02-15 16:59 ` [PATCH] Bluetooth: hci_uart: Support firmware download for Marvell kbuild test robot
2016-02-15 19:54 ` kbuild test robot
2016-03-31 11:54 Amitkumar Karwar
2016-03-31 12:03 ` Amitkumar Karwar
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=201602160006.xiXzASZ0%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akarwar@marvell.com \
--cc=cluo@marvell.com \
--cc=gbhat@marvell.com \
--cc=kbuild-all@01.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=nishants@marvell.com \
/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
all inboxes | Powered by JetHome®