[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190609104540.GB7328@kroah.com>
Date: Sun, 9 Jun 2019 12:45:40 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Hariprasad Kelam <hariprasad.kelam@...il.com>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...il.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
Powered by blists - more mailing lists