Re: [PATCH] staging: wfx: refactor to avoid duplication at hif_tx.c

From: Tomer Samara
Date: Wed Aug 05 2020 - 08:41:51 EST


On Wed, Aug 05, 2020 at 11:04:25AM +0200, Greg KH wrote:
> On Wed, Aug 05, 2020 at 11:56:08AM +0300, Tomer Samara wrote:
> > Add functions wfx_full_send(), wfx_full_send_no_reply_async(),
> > wfx_full_send_no_reply() and wfx_full_send_no_reply_free()
> > which works as follow:
> > wfx_full_send() - simple wrapper for both wfx_fill_header()
> > and wfx_cmd_send().
> > wfx_full_send_no_reply_async() - wrapper for both but with
> > NULL as reply and size zero.
> > wfx_full_send_no_reply() - same as wfx_full_send_no_reply_async()
> > but with false async value
> > wfx_full_send_no_reply_free() - same as wfx_full_send_no_reply()
> > but also free the struct hif_msg.
>
> Please only do one-thing-per-patch. Why shouldn't this be a 4 patch
> series?
>
> thanks,
>
> greg k-h

All of the 4 functions are wrappers for the same duplicate code when
every time there are different flags, so they are all connected, it is
feel to me more legit to patch them all together, should I split them
into 4 different patches?

Thanks,
Tomer Samara