Re: [PATCH] zd1211rw: Use DMA-aware buffer for usb transfer

From: John W. Linville
Date: Thu May 15 2008 - 15:51:59 EST


On Fri, May 16, 2008 at 12:12:15AM +0900, Atsushi Nemoto wrote:
> The zd1211rw driver uses unaligned stack buffer for USB control
> message. But it might cause stack corruption on non-coherent
> platform, such as MIPS. Use DMA-aware buffers for USB transfer.
>
> Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>

Nemoto,

This looks like a reasonable fix to me. I would prefer to see a
comment in the code indicating why you are reusing the "p" buffer
instead of simply using "ret" directly. Also, I think the style
suggestion by Michael Buesch would make the code appear more idiomatic
as well.

Thanks!

John
--
John W. Linville
linville@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/