]> git.sur5r.net Git - u-boot/blobdiff - post/cpu/mpc8xx/uart.c
fix compile warning for env tools
[u-boot] / post / cpu / mpc8xx / uart.c
index f351ac06d72468fa68bda7de6bf67f73d6489722..7a7a62aa00bb4b1a9ccfa366a7bf1abc9329d4f1 100644 (file)
@@ -61,8 +61,6 @@ static int ctlr_list[][2] =
 static int ctlr_list[][2] = { };
 #endif
 
-#define CTRL_LIST_SIZE (sizeof(ctlr_list) / sizeof(ctlr_list[0]))
-
 static struct {
        void (*init) (int index);
        void (*halt) (int index);
@@ -540,7 +538,7 @@ int uart_post_test (int flags)
        ctlr_proc[CTLR_SCC].putc = scc_putc;
        ctlr_proc[CTLR_SCC].getc = scc_getc;
 
-       for (i = 0; i < CTRL_LIST_SIZE; i++) {
+       for (i = 0; i < ARRAY_SIZE(ctlr_list); i++) {
                if (test_ctlr (ctlr_list[i][0], ctlr_list[i][1]) != 0) {
                        res = -1;
                }