diff options
Diffstat (limited to 'drivers/net/sk98lin')
-rw-r--r-- | drivers/net/sk98lin/skgemib.c | 2 | ||||
-rw-r--r-- | drivers/net/sk98lin/skgepnmi.c | 12 | ||||
-rw-r--r-- | drivers/net/sk98lin/skgesirq.c | 2 |
3 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/sk98lin/skgemib.c b/drivers/net/sk98lin/skgemib.c index 0a6f67a7a39..fde45083eb7 100644 --- a/drivers/net/sk98lin/skgemib.c +++ b/drivers/net/sk98lin/skgemib.c | |||
@@ -82,7 +82,7 @@ PNMI_STATIC int DiagActions(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, | |||
82 | 82 | ||
83 | 83 | ||
84 | /* defines *******************************************************************/ | 84 | /* defines *******************************************************************/ |
85 | #define ID_TABLE_SIZE (sizeof(IdTable)/sizeof(IdTable[0])) | 85 | #define ID_TABLE_SIZE ARRAY_SIZE(IdTable) |
86 | 86 | ||
87 | 87 | ||
88 | /* global variables **********************************************************/ | 88 | /* global variables **********************************************************/ |
diff --git a/drivers/net/sk98lin/skgepnmi.c b/drivers/net/sk98lin/skgepnmi.c index b36dd9ac6b2..3c19d98fcfa 100644 --- a/drivers/net/sk98lin/skgepnmi.c +++ b/drivers/net/sk98lin/skgepnmi.c | |||
@@ -388,18 +388,6 @@ int Level) /* Initialization level */ | |||
388 | SK_PNMI_CNT_NO, SK_PNMI_MAX_IDX)); | 388 | SK_PNMI_CNT_NO, SK_PNMI_MAX_IDX)); |
389 | } | 389 | } |
390 | 390 | ||
391 | if (SK_PNMI_MAX_IDX != | ||
392 | (sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES))) { | ||
393 | |||
394 | SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR050, SK_PNMI_ERR050MSG); | ||
395 | |||
396 | SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL, | ||
397 | ("StatAddr table size (%d) differs from " | ||
398 | "SK_PNMI_MAX_IDX (%d)\n", | ||
399 | (sizeof(StatAddr) / | ||
400 | (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES)), | ||
401 | SK_PNMI_MAX_IDX)); | ||
402 | } | ||
403 | #endif /* SK_PNMI_CHECK */ | 391 | #endif /* SK_PNMI_CHECK */ |
404 | break; | 392 | break; |
405 | 393 | ||
diff --git a/drivers/net/sk98lin/skgesirq.c b/drivers/net/sk98lin/skgesirq.c index 3e7aa49afd0..e5ee6d63ba4 100644 --- a/drivers/net/sk98lin/skgesirq.c +++ b/drivers/net/sk98lin/skgesirq.c | |||
@@ -892,7 +892,7 @@ int Port) /* Which port should be checked */ | |||
892 | */ | 892 | */ |
893 | RxCts = 0; | 893 | RxCts = 0; |
894 | 894 | ||
895 | for (i = 0; i < sizeof(SkGeRxRegs)/sizeof(SkGeRxRegs[0]); i++) { | 895 | for (i = 0; i < ARRAY_SIZE(SkGeRxRegs); i++) { |
896 | 896 | ||
897 | (void)SkXmMacStatistic(pAC, IoC, Port, SkGeRxRegs[i], &RxTmp); | 897 | (void)SkXmMacStatistic(pAC, IoC, Port, SkGeRxRegs[i], &RxTmp); |
898 | 898 | ||