All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Kumar Amit Mehta <gmate.amit@gmail.com>,
	devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack
Date: Sat, 23 Feb 2013 18:13:19 +0000	[thread overview]
Message-ID: <512906BF.5030308@bfs.de> (raw)
In-Reply-To: <20130223173442.GL9138@mwanda>



Am 23.02.2013 18:34, schrieb Dan Carpenter:
> On Sat, Feb 23, 2013 at 04:59:43PM +0100, walter harms wrote:
>>>> or is it possible to pass one byte
>>>> in a register ? (aka char/int) without allocating ?
>>>
>>> Nope, the USB host controllers must be able to DMA to this memory
>>> location, so you have to allocate it dynamically, sorry.
>>>
>>> thanks,
>>
>> thx for clarification.
>>
>> @Kumar Amit Mehta:
>> Would you mind to add this as comment ? Allocating one byte does not
>> look clever so maybe will come up with the idea of changing that.
>>
> 
> That can't happen.  The reason is already recorded in the git
> history.  Greg and Ian know that DMA to stack memory doesn't work.
> Most maintainers know about that.  If someone changed it back then
> Fengguang would send an automatic email about it as soon as it was
> committed to a public git tree.
> 

I am not sure about that we talk about the same thing, i am thinking
about the "casual "reader" discovering a one-byte-malloc.
He will not check the githistory, he will thing "WTF there are doing here ?"

I will not make things more complicated, IMHO an malloc of one byte
is a strange thing and strange things should be commented in code.
If the maintainer says "no" i will survive.

re,
 wh


WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Kumar Amit Mehta <gmate.amit@gmail.com>,
	devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack
Date: Sat, 23 Feb 2013 19:13:19 +0100	[thread overview]
Message-ID: <512906BF.5030308@bfs.de> (raw)
In-Reply-To: <20130223173442.GL9138@mwanda>



Am 23.02.2013 18:34, schrieb Dan Carpenter:
> On Sat, Feb 23, 2013 at 04:59:43PM +0100, walter harms wrote:
>>>> or is it possible to pass one byte
>>>> in a register ? (aka char/int) without allocating ?
>>>
>>> Nope, the USB host controllers must be able to DMA to this memory
>>> location, so you have to allocate it dynamically, sorry.
>>>
>>> thanks,
>>
>> thx for clarification.
>>
>> @Kumar Amit Mehta:
>> Would you mind to add this as comment ? Allocating one byte does not
>> look clever so maybe will come up with the idea of changing that.
>>
> 
> That can't happen.  The reason is already recorded in the git
> history.  Greg and Ian know that DMA to stack memory doesn't work.
> Most maintainers know about that.  If someone changed it back then
> Fengguang would send an automatic email about it as soon as it was
> committed to a public git tree.
> 

I am not sure about that we talk about the same thing, i am thinking
about the "casual "reader" discovering a one-byte-malloc.
He will not check the githistory, he will thing "WTF there are doing here ?"

I will not make things more complicated, IMHO an malloc of one byte
is a strange thing and strange things should be commented in code.
If the maintainer says "no" i will survive.

re,
 wh


  reply	other threads:[~2013-02-23 18:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22 18:07 [PATCH 2/2] staging: comedi: drivers: usbduxfast.c: fix for DMA buffers on stack Kumar Amit Mehta
2013-02-22 18:07 ` Kumar Amit Mehta
2013-02-22 18:58 ` walter harms
2013-02-22 18:58   ` walter harms
2013-02-22 19:06   ` Greg KH
2013-02-22 19:06     ` Greg KH
2013-02-23 15:59     ` walter harms
2013-02-23 15:59       ` walter harms
2013-02-23 17:34       ` Dan Carpenter
2013-02-23 17:34         ` Dan Carpenter
2013-02-23 18:13         ` walter harms [this message]
2013-02-23 18:13           ` walter harms

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=512906BF.5030308@bfs.de \
    --to=wharms@bfs.de \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gmate.amit@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.