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@xxxxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel