On Sun, Jun 09, 2019 at 04:02:32PM +0530, Hariprasad Kelam wrote: > > As part of halbtc8723b2ant_TdmaDurationAdjust function below > piece of code is used many times. > > halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val); > pCoexDm->psTdmaDuAdjType = val; > > This patch replaces this common code with MACRO > HAL_BTC8723B2ANT_DMA_DURATION_ADJUST Why is all of this indented? And line-wrapped at an odd column? Please use at lines around 72 characters long. > > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@xxxxxxxxx> > --- > drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c | 746 ++++++++++-------------- > 1 file changed, 293 insertions(+), 453 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c > index cb62fc0..56d842e 100644 > --- a/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c > +++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b2Ant.c > @@ -7,6 +7,13 @@ > > #include "Mp_Precomp.h" > > +/* defines */ > +#define HAL_BTC8723B2ANT_DMA_DURATION_ADJUST(val) \ > +do { \ > + halbtc8723b2ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, val); \ > + pCoexDm->psTdmaDuAdjType = val; \ > +} while (0) The goal is to move away from crazy macros, not add new ones :) But this does make the code a lot simpler, so it's ok. But please fix up the changelog text and resend. thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel