Messages in this thread Patch in this message | | | Date | Wed, 28 Jul 2004 16:55:26 +1000 | From | David Gibson <> | Subject | [5/15] orinoco merge preliminaries - use ARRAY_SIZE() |
| |
Use the built in ARRAY_SIZE macro, instead of hard coding it ourselves.
Signed-off-by: David Gibson <hermes@gibson.dropbear.id.au>
Index: working-2.6/drivers/net/wireless/orinoco.c =================================================================== --- working-2.6.orig/drivers/net/wireless/orinoco.c 2004-07-28 14:33:14.111384944 +1000 +++ working-2.6/drivers/net/wireless/orinoco.c 2004-07-28 14:33:17.540863584 +1000 @@ -507,7 +507,7 @@ 2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; -#define NUM_CHANNELS ( sizeof(channel_frequency) / sizeof(channel_frequency[0]) ) +#define NUM_CHANNELS ARRAY_SIZE(channel_frequency) /* This tables gives the actual meanings of the bitrate IDs returned by the firmware. */ struct { @@ -525,7 +525,7 @@ {55, 1, 7, 7}, {110, 0, 5, 8}, }; -#define BITRATE_TABLE_SIZE (sizeof(bitrate_table) / sizeof(bitrate_table[0])) +#define BITRATE_TABLE_SIZE ARRAY_SIZE(bitrate_table) /********************************************************************/ /* Data types */ -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |