This patch uses ARRAY_SIZE macro found by checkpatch.pl
WARNING: Prefer ARRAY_SIZE(wb)
drivers/staging/wilc1000/wilc_spi.c:400
drivers/staging/wilc1000/wilc_spi.c:402
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
#undef NUM_DUMMY_BYTES
- if (len2 > (sizeof(wb) / sizeof(wb[0]))) {
+ if (len2 > ARRAY_SIZE(wb)) {
PRINT_ER("[wilc spi]: spi buffer size too small (%d) (%zu)\n",
- len2, (sizeof(wb) / sizeof(wb[0])));
+ len2, ARRAY_SIZE(wb));
result = N_FAIL;
return result;
}