On Tue, Jan 07, 2014 at 01:11:51PM +0100, Michael Gunselmann wrote:
> From: Martin Hofmann <martin.hofm...@studium.uni-erlangen.de>
> 
> The file 80211hdr.h contained typedefs for 5 types. To satisfy checkpatch,
> this commit removes them. In 11 other files, every occurence of a now deleted
> type has been substituted with the correct struct ... syntax.

Why not split this into 5 patches, one for each typedef?  That way the
one I don't like, I could have ignored, and taken the other 4 patches?
:)

> -typedef union tagUWLAN_80211HDR {
> -     WLAN_80211HDR_A2        sA2;
> -     WLAN_80211HDR_A3        sA3;
> -     WLAN_80211HDR_A4        sA4;
> -} UWLAN_80211HDR, *PUWLAN_80211HDR;
> +} __attribute__((__packed__));
> +
> +union UWLAN_80211HDR {
> +     struct WLAN_80211HDR_A2 sA2;
> +     struct WLAN_80211HDR_A3 sA3;
> +     struct WLAN_80211HDR_A4 sA4;
> +};

This really should be a struct of a union, right?  Then you don't have
these "odd" casts to do:

> -     pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
> +     pFrame->pHdr = (union UWLAN_80211HDR *)pFrame->pBuf;

And are these casts even needed?

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to