From: Jim C. <jim...@gm...> - 2012-05-12 06:26:04
|
Verify that several arrays are same size on acx111 and acx100: - acx111_ie_len__VS__acx100_ie_len, - acx111_ie_len_dot11__VS__acx100_ie_len_dot11, - proc_files__VS__acx_proc_show_funcs, These are unlikely to to get checked otherwize, except by involved functional tests at multiple rates. OTOH, they dont actually test anything fundamental, but just catch spurious errors which drop lines in the array initializations. It may be appropriate at some point to add entries, thus breaking this check, but its easy to fix the resulting error (either by adding a corresponding entry, or removing the check). Signed-off-by: Jim Cromie <jim...@gm...> --- common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common.c b/common.c index 2f1b338..2986b9a 100644 --- a/common.c +++ b/common.c @@ -502,6 +502,8 @@ static const u16 acx111_ie_len[] = { 0, ACX1FF_IE_EEPROM_VER_LEN, }; +BUILD_BUG_DECL(acx111_ie_len__VS__acx100_ie_len, + ARRAY_SIZE(acx111_ie_len) != ARRAY_SIZE(acx100_ie_len)); static const u16 acx111_ie_len_dot11[] = { 0, @@ -525,6 +527,8 @@ static const u16 acx111_ie_len_dot11[] = { 0, 0, }; +BUILD_BUG_DECL(acx111_ie_len_dot11__VS__acx100_ie_len_dot11, + ARRAY_SIZE(acx111_ie_len_dot11) != ARRAY_SIZE(acx100_ie_len_dot11)); // BOM Rate and channel definition // --- @@ -687,6 +691,8 @@ static acx_proc_show_t *const acx_proc_show_antenna, acx_proc_show_reg_domain, }; +BUILD_BUG_DECL(proc_files__VS__acx_proc_show_funcs, + ARRAY_SIZE(proc_files) != ARRAY_SIZE(acx_proc_show_funcs)); static acx_proc_write_t *const acx_proc_write_funcs[] = { -- 1.7.10.1.487.ga3935e6 |