提交 fd863db9 编写于 作者: A Ahmed S. Darwish 提交者: Linus Torvalds

[PATCH] isdn/capi: use ARRAY_SIZE when appropriate

Signed-off-by: NAhmed S. Darwish <darwish.07@gmail.com>
Acked-by: NKarsten Keil <kkeil@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 fc238b37
......@@ -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--) {
......
......@@ -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--) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册