]> git.sur5r.net Git - u-boot/blobdiff - post/cpu/mpc8xx/ether.c
fix compile warning for env tools
[u-boot] / post / cpu / mpc8xx / ether.c
index fe6c39eb3c335ef36fe0fbd12b8ea850a628c159..fcbb30067eee6a4a6dd5e5fdf4527477d54f74fc 100644 (file)
@@ -67,8 +67,6 @@ static int ctlr_list[][2] = { {CTLR_SCC, 1} };
 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);
@@ -109,14 +107,20 @@ static RTXBD *rtx;
 
 static void scc_init (int scc_index)
 {
-       bd_t *bd = gd->bd;
        uchar ea[6];
 
-       static int proff[] =
-                       { PROFF_SCC1, PROFF_SCC2, PROFF_SCC3, PROFF_SCC4 };
-       static unsigned int cpm_cr[] =
-                       { CPM_CR_CH_SCC1, CPM_CR_CH_SCC2, CPM_CR_CH_SCC3,
-CPM_CR_CH_SCC4 };
+       static int proff[] = {
+                               PROFF_SCC1,
+                               PROFF_SCC2,
+                               PROFF_SCC3,
+                               PROFF_SCC4,
+       };
+       static unsigned int cpm_cr[] = {
+                               CPM_CR_CH_SCC1,
+                               CPM_CR_CH_SCC2,
+                               CPM_CR_CH_SCC3,
+                               CPM_CR_CH_SCC4,
+       };
 
        int i;
        scc_enet_t *pram_ptr;
@@ -612,7 +616,7 @@ int ether_post_test (int flags)
        ctlr_proc[CTLR_SCC].send = scc_send;
        ctlr_proc[CTLR_SCC].recv = scc_recv;
 
-       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;
                }