login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
17
Re: [PATCH] usb: core: config.c: usb_get_configuration() simplified
view
thread
Previous message: [thread] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Alan Stern
Subject:
Re: [PATCH] usb: core: config.c: usb_get_configuration() simplified
Date: Saturday, April 17, 2010 - 9:13 am
On Sat, 17 Apr 2010, Michal Nazarewicz wrote:
quoted text
> usb_gat_configuratio() used two pointers to point to the same > memory. Code simplified, by removing one of them. > > Signed-off-by: Michal Nazarewicz <mina86@mina86.com> > --- > drivers/usb/core/config.c | 10 ++++------ > 1 files changed, 4 insertions(+), 6 deletions(-) > > > On Sat, 17 Apr 2010, Michal Nazarewicz wrote: > >> usb_get_configuration() uses a temporary buffer allocated on heap > >> to read USB configuration descriptor. The buffer is just nine > >> bytes an so it is a waste to allocate it on heap where it can be > >> allocated on stack with the rest of local variables. This > >> simplifies the code and minimises memory usage. > > Alan Stern <stern@rowland.harvard.edu> writes: > > This is completely wrong. You are not allowed to do DMA to buffers on > > the stack; some architectures are not capable of handling it. > > That makes sense; I haven't considered this thinking that copying nine > bytes by CPU, rather then using DMA, is not a big issue. > > Still, the change proposed by attached commit does not suffer from DMA > issue and still simplify the code.
Yes, this is fine. Alan Stern --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
Re: [PATCH] usb: core: config.c: usb_get_configuration() s ...
, Alan Stern
, (Sat Apr 17, 9:13 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 17/36] sysdev: detect multiple driver registrations
Sam Ravnborg
Re: [PATCH] kbuild: fix make V=1
Nick Piggin
Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
Greg Kroah-Hartman
[PATCH 16/36] driver core: cpu: fix section mismatch in cpu.c:store_online
Greg Kroah-Hartman
[PATCH 22/36] PM: Make wakeup flags available whenever CONFIG_PM is set
git
:
Junio C Hamano
Re: [PATCH 1/2] Teach git-describe to display distances from tags.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
Johan Herland
[PATCH 6/7] Softrefs: Administrivia associated with softrefs subsystem and git-sof...
linux-netdev
:
Jarek Poplawski
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Lennert Buytenhek
Re: Distributed Switch Architecture(DSA)
Daniel Schaffrath
Re: tcp bw in 2.6
Guo-Fu Tseng
Re: jme: UDP checksum error, and lots of them
Gerrit Renker
[PATCH 37/37] dccp: Debugging functions for feature negotiation
openbsd-misc
:
Conor
Re: RFID Reader
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Pieter Verberne
File collision while using pkg_add
Stuart Henderson
Re: SquidGuard problem
Community First Financial
Teacher A+ Loan
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Linux Kernel Mailing List
tracing: protect reader of cmdline output
Linux Kernel Mailing List
kconfig: recalc symbol value before showing search results
Colocation donated by:
Syndicate