From: Alejandro Martinez Ruiz Date: Thu, 18 Oct 2007 08:22:02 +0000 (+0200) Subject: sk98lin: kill bogus check and convert to use ARRAY_SIZE() X-Git-Tag: v2.6.25-rc1~1162^2~631 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef878b889907f29af1b5f34734f14eca1aa43cf6;p=pandora-kernel.git sk98lin: kill bogus check and convert to use ARRAY_SIZE() This converts uses of ARRAY_SIZE(), and while at it also kills unreachable code as far as I can say. I can't tell what was the author trying to do with the following check. First we have: PNMI_STATIC const SK_PNMI_STATADDR StatAddr[SK_PNMI_MAX_IDX][SK_PNMI_MAC_TYPES]; and then a check goes like this: if (SK_PNMI_MAX_IDX != (sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES))) with the second line being just ARRAY_SIZE(StatAddr), which will always return SK_PNMI_MAX_IDX, rendering the check useless. Signed-off-by: Alejandro Martinez Ruiz Signed-off-by: Jeff Garzik --- Reading git-diff-tree failed