From: Ahmed S. Darwish Date: Mon, 12 Feb 2007 08:53:19 +0000 (-0800) Subject: [PATCH] isdn/capi: use ARRAY_SIZE when appropriate X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd863db937c0d30679d4bd5329653adb46b66627;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] isdn/capi: use ARRAY_SIZE when appropriate Signed-off-by: Ahmed S. Darwish Acked-by: Karsten Keil Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index d22c0224fde6..38045910ca94 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -1456,7 +1456,7 @@ static struct procfsentries { static void __init proc_init(void) { - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); + int nelem = ARRAY_SIZE(procfsentries); int i; for (i=0; i < nelem; i++) { @@ -1468,7 +1468,7 @@ static void __init proc_init(void) static void __exit proc_exit(void) { - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); + int nelem = ARRAY_SIZE(procfsentries); int i; for (i=nelem-1; i >= 0; i--) { diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index c4d438c17dab..8cec9c3898ec 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c @@ -2218,7 +2218,7 @@ static struct procfsentries { static void __init proc_init(void) { - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); + int nelem = ARRAY_SIZE(procfsentries); int i; for (i=0; i < nelem; i++) { @@ -2230,7 +2230,7 @@ static void __init proc_init(void) static void __exit proc_exit(void) { - int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]); + int nelem = ARRAY_SIZE(procfsentries); int i; for (i=nelem-1; i >= 0; i--) {