You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] arch/alpha: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a duplicate of the macro. Also remove some trailing whitespaces and needless braces. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
c8e5429e49
commit
25c8716cb0
@@ -233,7 +233,7 @@ validate_cc_value(unsigned long cc)
|
||||
index = cpu->type & 0xffffffff;
|
||||
|
||||
/* If index out of bounds, no way to validate. */
|
||||
if (index >= sizeof(cpu_hz)/sizeof(cpu_hz[0]))
|
||||
if (index >= ARRAY_SIZE(cpu_hz))
|
||||
return cc;
|
||||
|
||||
/* If index contains no data, no way to validate. */
|
||||
|
||||
Reference in New Issue
Block a user