[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180322171944.GB5434@kroah.com>
Date: Thu, 22 Mar 2018 18:19:44 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Quytelda Kahja <quytelda@...alin.org>
Cc: wsa@...-dreams.de, devel@...verdev.osuosl.org,
driverdev-devel@...uxdriverproject.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] staging: ks7010: Factor out repeated request
initialization code.
On Mon, Mar 19, 2018 at 10:58:15PM -0700, Quytelda Kahja wrote:
> The code to initialize various different types of request structs
> is repeated multiple times. Factor this code out into a macro
> called INIT_REQUEST.
>
> Signed-off-by: Quytelda Kahja <quytelda@...alin.org>
> ---
> drivers/staging/ks7010/ks_hostif.c | 55 +++++++++++---------------------------
> 1 file changed, 16 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> index 6fc2c3647908..3e5016aad029 100644
> --- a/drivers/staging/ks7010/ks_hostif.c
> +++ b/drivers/staging/ks7010/ks_hostif.c
> @@ -40,6 +40,17 @@ static inline unsigned int cnt_smeqbody(struct ks_wlan_private *priv)
>
> #define KS_WLAN_MEM_FLAG (GFP_ATOMIC)
>
> +#define INIT_REQUEST(pp, priv)
Ick, please make it a function if you really want to do something like
this.
thanks,
greg k-h
Powered by blists - more mailing lists