diff options
author | Niklas Söderlund <niso@kth.se> | 2012-01-29 17:04:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 05:01:20 -0500 |
commit | c31d34fe92e9d0b146907d7294269ee03e1b403f (patch) | |
tree | 6d406d14433a7a81a4ba50f4919e1df038de0fb8 /drivers/edac | |
parent | da14d93d95ee3923b6e690220bdb7ce191e76d95 (diff) |
i7core_edac: fix erroneous size of static array
Remove size from lookup arrays and mark them as const.
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Niklas Söderlund <niso@kth.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i7core_edac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 10c8c00d6469..ad5f934c95d3 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c | |||
@@ -420,21 +420,21 @@ static inline int numdimms(u32 dimms) | |||
420 | 420 | ||
421 | static inline int numrank(u32 rank) | 421 | static inline int numrank(u32 rank) |
422 | { | 422 | { |
423 | static int ranks[4] = { 1, 2, 4, -EINVAL }; | 423 | static const int ranks[] = { 1, 2, 4, -EINVAL }; |
424 | 424 | ||
425 | return ranks[rank & 0x3]; | 425 | return ranks[rank & 0x3]; |
426 | } | 426 | } |
427 | 427 | ||
428 | static inline int numbank(u32 bank) | 428 | static inline int numbank(u32 bank) |
429 | { | 429 | { |
430 | static int banks[4] = { 4, 8, 16, -EINVAL }; | 430 | static const int banks[] = { 4, 8, 16, -EINVAL }; |
431 | 431 | ||
432 | return banks[bank & 0x3]; | 432 | return banks[bank & 0x3]; |
433 | } | 433 | } |
434 | 434 | ||
435 | static inline int numrow(u32 row) | 435 | static inline int numrow(u32 row) |
436 | { | 436 | { |
437 | static int rows[8] = { | 437 | static const int rows[] = { |
438 | 1 << 12, 1 << 13, 1 << 14, 1 << 15, | 438 | 1 << 12, 1 << 13, 1 << 14, 1 << 15, |
439 | 1 << 16, -EINVAL, -EINVAL, -EINVAL, | 439 | 1 << 16, -EINVAL, -EINVAL, -EINVAL, |
440 | }; | 440 | }; |
@@ -444,7 +444,7 @@ static inline int numrow(u32 row) | |||
444 | 444 | ||
445 | static inline int numcol(u32 col) | 445 | static inline int numcol(u32 col) |
446 | { | 446 | { |
447 | static int cols[8] = { | 447 | static const int cols[] = { |
448 | 1 << 10, 1 << 11, 1 << 12, -EINVAL, | 448 | 1 << 10, 1 << 11, 1 << 12, -EINVAL, |
449 | }; | 449 | }; |
450 | return cols[col & 0x3]; | 450 | return cols[col & 0x3]; |