Re: [PATCH 3/7] staging: ks7010: Factor out common members in request structs.

From: Greg KH
Date: Fri Mar 23 2018 - 10:58:13 EST


On Thu, Mar 22, 2018 at 10:07:41PM -0700, Quytelda Kahja wrote:
> Most of the request structures defined in ks_hostif.h have common
> members:
> * __le16 phy_type;
> * __le16 cts_mode;
> * __le16 scan_type;
> * __le16 capability;
> * struct rate_set16_t rate_set;
>
> Factor out these members into a common substructure of type
> 'hostif_request_t'. This allows a large portion of the request
> initialization code in ks_hostif.c to be factored out into the
> 'init_request' function.

The "_t" suffix of structure names is a hold-over from the crazy typedef
mess. It's not needed for new structure names at all, and really needs
to be deleted from this driver. I'll leave this as-is for now, as you
are just following the standard of the existing code, but consider it
something to change in the future.

thanks,

greg k-h