All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Quytelda Kahja <quytelda@tamalin.org>
Cc: devel@driverdev.osuosl.org,
	driverdev-devel@linuxdriverproject.org,
	linux-kernel@vger.kernel.org, wsa@the-dreams.de
Subject: Re: [PATCH 6/6] staging: ks7010: Factor out repeated request initialization code.
Date: Thu, 22 Mar 2018 18:19:44 +0100	[thread overview]
Message-ID: <20180322171944.GB5434@kroah.com> (raw)
In-Reply-To: <20180320055815.32651-6-quytelda@tamalin.org>

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
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-03-22 17:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16  6:26 [PATCH 1/6] staging: ks7010: Factor out repeated code Quytelda Kahja
2018-03-19 18:51 ` Greg KH
2018-03-20  5:58   ` Quytelda Kahja
2018-03-20  5:58     ` [PATCH 2/6] staging: ks7010: Factor out code into helper methods Quytelda Kahja
2018-03-20  5:58     ` [PATCH 3/6] staging: ks7010: Remove unnecessary parentheses Quytelda Kahja
2018-03-22 17:19       ` Greg KH
2018-03-20  5:58     ` [PATCH 4/6] staging: ks7010: Remove unnecessary braces Quytelda Kahja
2018-03-20  5:58     ` [PATCH 5/6] staging: ks7010: Fix line over 80 characters Quytelda Kahja
2018-03-20  6:08       ` Joe Perches
2018-03-20  5:58     ` [PATCH 6/6] staging: ks7010: Factor out repeated request initialization code Quytelda Kahja
2018-03-22 17:19       ` Greg KH [this message]
2018-03-22 17:20     ` [PATCH 1/6] staging: ks7010: Factor out repeated code Greg KH
2018-03-23  5:07       ` [PATCH 1/7] staging: ks7010: Fix line over 80 characters Quytelda Kahja
2018-03-23  5:07         ` [PATCH 2/7] staging: ks7010: Fix lines over 80 characters due to comments Quytelda Kahja
2018-03-23  5:07         ` [PATCH 3/7] staging: ks7010: Factor out common members in request structs Quytelda Kahja
2018-03-23 14:58           ` Greg KH
2018-03-23 14:58             ` Greg KH
2018-03-24  6:40             ` [PATCH 1/2] staging: ks7010: Remove trailing "_t" from all structure names Quytelda Kahja
2018-03-24  6:40               ` [PATCH 2/2] staging: ks7010: Fix spelling mistakes Quytelda Kahja
2018-03-28 11:50               ` [PATCH 1/2] staging: ks7010: Remove trailing "_t" from all structure names Greg KH
2018-03-23  5:07         ` [PATCH 4/7] staging: ks7010: Remove duplicate #define's Quytelda Kahja
2018-03-23  5:07         ` [PATCH 5/7] staging: ks7010: Replace memcmp() operation with ether_addr_equal() Quytelda Kahja
2018-03-23  5:07         ` [PATCH 6/7] staging: ks7010: Factor out repeated code for reading IEs Quytelda Kahja
2018-03-23  5:07         ` [PATCH 7/7] staging: ks7010: Remove hostif_infrastructure_set2_request_t Quytelda Kahja
2018-03-16  6:30 [PATCH 2/6] staging: ks7010: Factor out code into helper methods Quytelda Kahja
2018-03-16  6:30 ` [PATCH 6/6] staging: ks7010: Factor out repeated request initialization code Quytelda Kahja

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=20180322171944.GB5434@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quytelda@tamalin.org \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.