From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: hal: move common code to macro
Date: Sun, 9 Jun 2019 12:45:40 +0200 [thread overview]
Message-ID: <20190609104540.GB7328@kroah.com> (raw)
In-Reply-To: <20190609103232.GA9769@hari-Inspiron-1545>
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
prev parent reply other threads:[~2019-06-09 10:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-09 10:32 Hariprasad Kelam
2019-06-09 10:45 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190609104540.GB7328@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=hariprasad.kelam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®