Actions
Bug #10016
closedbnxe: macro expands to multiple statements
Start date:
2018-11-30
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
Issue found by gcc 8 build:
../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c: In function 'lm_idle_chk': ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:736:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0xF, PBF_REG_DISABLE_NEW_TASK_PROC_P0, PBF_REG_P0_CREDIT, PBF_REG_P0_INIT_CRD, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: P0 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:736:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0xF, PBF_REG_DISABLE_NEW_TASK_PROC_P0, PBF_REG_P0_CREDIT, PBF_REG_P0_INIT_CRD, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: P0 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:738:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0xF, PBF_REG_DISABLE_NEW_TASK_PROC_P1, PBF_REG_P1_CREDIT, PBF_REG_P1_INIT_CRD, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: P1 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:738:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0xF, PBF_REG_DISABLE_NEW_TASK_PROC_P1, PBF_REG_P1_CREDIT, PBF_REG_P1_INIT_CRD, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: P1 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:742:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q0, PBF_REG_CREDIT_Q0, PBF_REG_INIT_CRD_Q0, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q0 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:742:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q0, PBF_REG_CREDIT_Q0, PBF_REG_INIT_CRD_Q0, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q0 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:744:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q1, PBF_REG_CREDIT_Q1, PBF_REG_INIT_CRD_Q1, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q1 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:744:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q1, PBF_REG_CREDIT_Q1, PBF_REG_INIT_CRD_Q1, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q1 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:746:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q2, PBF_REG_CREDIT_Q2, PBF_REG_INIT_CRD_Q2, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q2 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:746:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q2, PBF_REG_CREDIT_Q2, PBF_REG_INIT_CRD_Q2, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q2 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:748:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q3, PBF_REG_CREDIT_Q3, PBF_REG_INIT_CRD_Q3, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q3 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:748:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q3, PBF_REG_CREDIT_Q3, PBF_REG_INIT_CRD_Q3, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q3 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:750:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q4, PBF_REG_CREDIT_Q4, PBF_REG_INIT_CRD_Q4, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q4 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:750:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q4, PBF_REG_CREDIT_Q4, PBF_REG_INIT_CRD_Q4, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q4 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:95:9: error: macro expands to multiple statements [-Werror=multistatement-macros] b_test_chip=0; \ ^~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:141:10: note: in expansion of macro 'IDLE_CHK_CHIP_MASK_CHK' IDLE_CHK_CHIP_MASK_CHK(chip_mask); \ ^~~~~~~~~~~~~~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:171:17: note: in expansion of macro 'IDLE_CHK_3' IDLE_CHK_3(chip_mask, offset1, offset2, condition, severity, fail_msg); \ ^~~~~~~~~~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:752:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q5, PBF_REG_CREDIT_Q5, PBF_REG_INIT_CRD_Q5, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q5 credit is not equal to init_crd"); ^~~~~~~~~~ In file included from ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:53: ../../common/io/bnxe/577xx/drivers/common/lm/device/hw_debug.h:170:13: note: some parts of macro expansion are not guarded by this 'if' clause if (!val) \ ^~ ../../common/io/bnxe/577xx/drivers/common/lm/device/bnxe_hw_debug.c:752:5: note: in expansion of macro 'IDLE_CHK_5' IDLE_CHK_5(0x10, PBF_REG_DISABLE_NEW_TASK_PROC_Q5, PBF_REG_CREDIT_Q5, PBF_REG_INIT_CRD_Q5, (val1 != val2), IDLE_CHK_ERROR_NO_TRAFFIC, "PBF: Q5 credit is not equal to init_crd"); ^~~~~~~~~~ cc1: all warnings being treated as errors
Updated by Electric Monk over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 4e9ec610a7fdddfb6264b1155d0cc9c1874aecc2
commit 4e9ec610a7fdddfb6264b1155d0cc9c1874aecc2 Author: Toomas Soome <tsoome@me.com> Date: 2018-12-05T01:55:54.000Z 10016 bnxe: macro expands to multiple statements Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: C Fraire <cfraire@me.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Actions