Commit 0a8320b04c0762a1c65b5800b84023b454c2da54

Authored by Alejandro Martinez Ruiz
Committed by Linus Torvalds
1 parent b9e5e119fd

dio: ARRAY_SIZE() cleanup

[Geert: eliminate NUMNAMES, as suggested by Richard Knutsson ]
[akpm@linux-foundation.org: coding-syle fixes]
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

... ... @@ -88,8 +88,6 @@
88 88 #undef DIONAME
89 89 #undef DIOFBNAME
90 90  
91   -#define NUMNAMES (sizeof(names) / sizeof(struct dioname))
92   -
93 91 static const char *unknowndioname
94 92 = "unknown DIO board -- please email <linux-m68k@lists.linux-m68k.org>!";
95 93  
... ... @@ -97,7 +95,7 @@
97 95 {
98 96 /* return pointer to a constant string describing the board with given ID */
99 97 unsigned int i;
100   - for (i = 0; i < NUMNAMES; i++)
  98 + for (i = 0; i < ARRAY_SIZE(names); i++)
101 99 if (names[i].id == id)
102 100 return names[i].name;
103 101