linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Olivier Sobrie <olivier@sobrie.be>
Cc: linux-can@vger.kernel.org
Subject: Re: [can:for-davem 2/3] drivers/net/can/usb/kvaser_usb.c:431 kvaser_usb_send_simple_msg() error: doing dma on the stack ((null))
Date: Thu, 22 Nov 2012 14:05:30 +0100	[thread overview]
Message-ID: <50AE231A.2040306@pengutronix.de> (raw)
In-Reply-To: <50ae18f9.g1Qzcmfv5xzx4tke%fengguang.wu@intel.com>

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

Hello Olivier,

can you please ask on the usb mailinglist how to fix this problem (given
this isn't a false positive)

Marc

On 11/22/2012 01:22 PM, kbuild test robot wrote:
> tree:   git://gitorious.org/linux-can/linux-can-next for-davem
> head:   21c837dccb1b249864b9c8475f51dad355b42554
> commit: f0fbcc3bab6ff298bbb8c91de2ddf2824996181f [2/3] can: kvaser_usb: Add support for Kvaser CAN/USB devices
> 
> 
> smatch warnings:
> 
> + drivers/net/can/usb/kvaser_usb.c:431 kvaser_usb_send_simple_msg() error: doing dma on the stack ((null))
> + drivers/net/can/usb/kvaser_usb.c:1073 kvaser_usb_set_opt_mode() error: doing dma on the stack ((null))
> + drivers/net/can/usb/kvaser_usb.c:1174 kvaser_usb_flush_queue() error: doing dma on the stack ((null))
> + drivers/net/can/usb/kvaser_usb.c:1384 kvaser_usb_set_bittiming() error: doing dma on the stack ((null))
> 
> vim +431 drivers/net/can/usb/kvaser_usb.c
> 
> f0fbcc3b Olivier Sobrie 2012-11-21  415  end:
> f0fbcc3b Olivier Sobrie 2012-11-21  416  	kfree(buf);
> f0fbcc3b Olivier Sobrie 2012-11-21  417  
> f0fbcc3b Olivier Sobrie 2012-11-21  418  	return err;
> f0fbcc3b Olivier Sobrie 2012-11-21  419  }
> f0fbcc3b Olivier Sobrie 2012-11-21  420  
> f0fbcc3b Olivier Sobrie 2012-11-21  421  static int kvaser_usb_send_simple_msg(const struct kvaser_usb *dev,
> f0fbcc3b Olivier Sobrie 2012-11-21  422  				      u8 msg_id, int channel)
> f0fbcc3b Olivier Sobrie 2012-11-21  423  {
> f0fbcc3b Olivier Sobrie 2012-11-21  424  	struct kvaser_msg msg = {
> f0fbcc3b Olivier Sobrie 2012-11-21  425  		.len = MSG_HEADER_LEN + sizeof(struct kvaser_msg_simple),
> f0fbcc3b Olivier Sobrie 2012-11-21  426  		.id = msg_id,
> f0fbcc3b Olivier Sobrie 2012-11-21  427  		.u.simple.channel = channel,
> f0fbcc3b Olivier Sobrie 2012-11-21  428  		.u.simple.tid = 0xff,
> f0fbcc3b Olivier Sobrie 2012-11-21  429  	};
> f0fbcc3b Olivier Sobrie 2012-11-21  430  
> f0fbcc3b Olivier Sobrie 2012-11-21 @431  	return kvaser_usb_send_msg(dev, &msg);
> f0fbcc3b Olivier Sobrie 2012-11-21  432  }
> f0fbcc3b Olivier Sobrie 2012-11-21  433  
> f0fbcc3b Olivier Sobrie 2012-11-21  434  static int kvaser_usb_get_software_info(struct kvaser_usb *dev)
> f0fbcc3b Olivier Sobrie 2012-11-21  435  {
> f0fbcc3b Olivier Sobrie 2012-11-21  436  	struct kvaser_msg msg;
> f0fbcc3b Olivier Sobrie 2012-11-21  437  	int err;
> f0fbcc3b Olivier Sobrie 2012-11-21  438  
> f0fbcc3b Olivier Sobrie 2012-11-21  439  	err = kvaser_usb_send_simple_msg(dev, CMD_GET_SOFTWARE_INFO, 0);
> 
> ---
> 0-DAY kernel build testing backend         Open Source Technology Center
> Fengguang Wu, Yuanhan Liu                              Intel Corporation
> 


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

  reply	other threads:[~2012-11-22 19:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22 12:22 [can:for-davem 2/3] drivers/net/can/usb/kvaser_usb.c:431 kvaser_usb_send_simple_msg() error: doing dma on the stack ((null)) kbuild test robot
2012-11-22 13:05 ` Marc Kleine-Budde [this message]
2012-11-22 14:46   ` Olivier Sobrie
2012-11-22 15:50     ` Marc Kleine-Budde
2012-11-22 16:29       ` Fengguang 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=50AE231A.2040306@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=olivier@sobrie.be \
    /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).