lkml.org 
[lkml]   [2019]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: rtl8723bs: hal: move common code to macro
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@gmail.com>
> ---
> 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

\
 
 \ /
  Last update: 2019-06-09 12:46    [W:0.032 / U:2.316 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site