[PATCH] staging: fsl-dpaa2/ethsw: Remove unused variable irq

2018-03-30 Thread Nguyen Phan Quang Minh
Local variable irq is not used. Remove it. Signed-off-by: Nguyen Phan Quang Minh<minhnp...@gmail.com> --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c

[PATCH] staging: fsl-dpaa2/ethsw: Remove unused variable irq

2018-03-30 Thread Nguyen Phan Quang Minh
Local variable irq is not used. Remove it. Signed-off-by: Nguyen Phan Quang Minh --- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index c723a04bc3d6..a698498b8537

[PATCHv2] staging: pi433: pi433_if.c remove SET_CHECKED macro

2017-12-02 Thread Nguyen Phan Quang Minh
The macro calls its argument -a function- twice, makes the calling function return prematurely -skipping resource cleanup code- and hurts understandability. Signed-off-by: Nguyen Phan Quang Minh <minhnp...@gmail.com> --- Base on Dan's feedback, I checked and the macro return indeed skip

[PATCHv2] staging: pi433: pi433_if.c remove SET_CHECKED macro

2017-12-02 Thread Nguyen Phan Quang Minh
The macro calls its argument -a function- twice, makes the calling function return prematurely -skipping resource cleanup code- and hurts understandability. Signed-off-by: Nguyen Phan Quang Minh --- Base on Dan's feedback, I checked and the macro return indeed skips over some cleanup code, hence

[PATCH] staging: pi433: pi433_if.c Fix SET_CHECKED style issues

2017-11-30 Thread Nguyen Phan Quang Minh
Fix checkpatch warning and add result holder variable to reduce overhead since the macro is called on functions. Signed-off-by: Nguyen Phan Quang Minh <minhnp...@gmail.com> --- Since SET_CHECKED has a return statement, I'm very tempted to straight up remove it and do the checking

[PATCH] staging: pi433: pi433_if.c Fix SET_CHECKED style issues

2017-11-30 Thread Nguyen Phan Quang Minh
Fix checkpatch warning and add result holder variable to reduce overhead since the macro is called on functions. Signed-off-by: Nguyen Phan Quang Minh --- Since SET_CHECKED has a return statement, I'm very tempted to straight up remove it and do the checking inline. But the macro is used a lot