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] drivers/video: Use ARRAY_SIZE macro
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Some coding style and trailing whitespaces are also fixed. Compile-tested where possible (some are other arch or BROKEN) Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Cc: "Antonino A. Daplas" <adaplas@pol.net> 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
b0c8797821
commit
d1ae418eef
@@ -165,20 +165,20 @@ static int neoFindMode(int xres, int yres, int depth)
|
||||
|
||||
switch (depth) {
|
||||
case 8:
|
||||
size = sizeof(bios8) / sizeof(biosMode);
|
||||
size = ARRAY_SIZE(bios8);
|
||||
mode = bios8;
|
||||
break;
|
||||
case 16:
|
||||
size = sizeof(bios16) / sizeof(biosMode);
|
||||
size = ARRAY_SIZE(bios16);
|
||||
mode = bios16;
|
||||
break;
|
||||
case 24:
|
||||
size = sizeof(bios24) / sizeof(biosMode);
|
||||
size = ARRAY_SIZE(bios24);
|
||||
mode = bios24;
|
||||
break;
|
||||
#ifdef NO_32BIT_SUPPORT_YET
|
||||
case 32:
|
||||
size = sizeof(bios32) / sizeof(biosMode);
|
||||
size = ARRAY_SIZE(bios32);
|
||||
mode = bios32;
|
||||
break;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user