lkml.org 
[lkml]   [2010]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateFri, 17 Dec 2010 03:43:42 +0000
FromChris Ball <>
SubjectRe: [PATCH] mmc: Test bus-width for old MMC devices (v2)
Hi Philip,

On Thu, Dec 16, 2010 at 06:33:49PM -0800, Philip Rakity wrote:
> It is not possible for bus_width to be not initialized. This would imply ARRAY_SIZE(bus_widths) is 1. Certainly not true.

Right, I agree. We should fix the warning anyway.

> We could just initialize by changing
> + unsigned idx, bus_width;
> to
> + unsigned idx, bus_width = 0;

Okay, I've pushed to mmc-next with that change.

> I wonder what compiler are you using so we can avoid this issue in future.

Ah, good point -- I was building with a gcc 4.1.2 ARM cross-compiler,
and using a gcc 4.5.1 cross-build instead avoids the warning.

Thanks,

--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child


\
 
 \ /
  Last update: 2010-12-17 04:47    [from the cache]
©2003-2010