netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Olivier Sobrie <olivier@sobrie.be>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-usb@vger.kernel.org, Daniel Berglund <db@kvaser.com>
Subject: Re: [PATCH v6] can: kvaser_usb: Add support for Kvaser CAN/USB devices
Date: Fri, 23 Nov 2012 09:48:22 +0100	[thread overview]
Message-ID: <50AF3856.8060808@pengutronix.de> (raw)
In-Reply-To: <20121122213022.GB1461@kroah.com>

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

On 11/22/2012 10:30 PM, Greg KH wrote:
> On Thu, Nov 22, 2012 at 04:01:49PM +0100, Olivier Sobrie wrote:
>> Hi linux-usb folks,
>>
>> Is there someone who can help me to fix the following errors?
>>
>> 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))
>>
>> I assume it's due to the buffer I pass to the function usb_bulk_msg()
>> which is on the stack and can't be.
>> Do I just have to kmalloc a buffer and give it to the usb_bulk_msg()
>> function? That's what I understood by reading
>> "Documentation/DMA-API-HOWTO.txt" section "What memory is DMA'able?"...
>> and from commit
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=32ec4576c3fb37316b1d11a04b220527822f3f0d
> 
> Yes, that is all that is needed.

Thanks Greg. Olivier, you can post an incremental patch, I'll squash it
before sending the patches upstream.

regards,
Marc

-- 
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-23  8:48 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30  5:32 [PATCH] can: kvaser_usb: Add support for Kvaser CAN/USB devices Olivier Sobrie
2012-07-30 11:11 ` Marc Kleine-Budde
2012-07-30 13:33   ` Olivier Sobrie
2012-07-31  9:56     ` Marc Kleine-Budde
2012-07-31 13:06       ` Olivier Sobrie
2012-07-31 13:27         ` Marc Kleine-Budde
2012-08-02 10:53           ` Olivier Sobrie
2012-08-02 11:56             ` Marc Kleine-Budde
2012-08-02 12:16               ` Olivier Sobrie
2012-08-02 12:33                 ` Marc Kleine-Budde
2012-08-02 13:20                   ` Olivier Sobrie
2012-08-05 20:43               ` Wolfgang Grandegger
2012-08-06  5:27                 ` Olivier Sobrie
2012-07-31 13:43         ` Wolfgang Grandegger
2012-08-05 20:41       ` Wolfgang Grandegger
2012-08-06  5:21 ` [PATCH v2] " Olivier Sobrie
2012-08-06  8:10   ` Oliver Neukum
2012-08-08  5:28     ` Olivier Sobrie
2012-08-07  6:26   ` Wolfgang Grandegger
2012-08-08  6:14     ` Olivier Sobrie
2012-08-08  8:25       ` Wolfgang Grandegger
     [not found]         ` <5022227F.60800-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2012-08-08 13:30           ` Olivier Sobrie
2012-08-08 15:02             ` Wolfgang Grandegger
2012-08-13 13:51 ` [PATCH v3] " Olivier Sobrie
2012-09-20  5:06 ` [PATCH v4] " Olivier Sobrie
     [not found]   ` <1348117587-2905-1-git-send-email-olivier-Ui3EtX6WB9GzQB+pC5nmwQ@public.gmane.org>
2012-09-21  9:54     ` Marc Kleine-Budde
2012-09-22 16:02       ` Wolfgang Grandegger
     [not found]         ` <505DE106.6060405-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2012-10-02  7:14           ` Olivier Sobrie
2012-10-02  7:16 ` [PATCH v5] " Olivier Sobrie
2012-11-07 20:29   ` Marc Kleine-Budde
2012-11-20  8:46     ` Olivier Sobrie
2012-11-20 10:59       ` Marc Kleine-Budde
     [not found] ` <1343626352-24760-1-git-send-email-olivier-Ui3EtX6WB9GzQB+pC5nmwQ@public.gmane.org>
2012-11-21  7:11   ` [PATCH v6] " Olivier Sobrie
2012-11-22 11:01     ` Marc Kleine-Budde
2012-11-22 15:01     ` Olivier Sobrie
2012-11-22 21:30       ` Greg KH
2012-11-23  8:48         ` Marc Kleine-Budde [this message]
2012-11-23 13:30           ` [PATCH] kvaser_usb: fix "dma on the stack" errors Olivier Sobrie
2012-11-23 13:40             ` Olivier Sobrie
2012-11-23 13:48               ` Marc Kleine-Budde
2012-11-23 13:54               ` [PATCH v2] " Olivier Sobrie
2012-11-23 14:08                 ` Marc Kleine-Budde
2012-11-23 14:16                   ` Olivier Sobrie

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=50AF3856.8060808@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=db@kvaser.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olivier@sobrie.be \
    --cc=wg@grandegger.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;
as well as URLs for NNTP newsgroup(s).