lkml.org 
[lkml]   [2018]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@tamalin.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

\
 
 \ /
  Last update: 2018-03-22 18:22    [W:0.144 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site