From: Greg KH <gregkh@linuxfoundation.org>
To: Michael Gunselmann <michael.gunselmann@studium.uni-erlangen.de>
Cc: devel@driverdev.osuosl.org, linux-kernel@i4.cs.fau.de,
Martin Hofmann <martin.hofmann@studium.uni-erlange.de>,
linux-kernel@vger.kernel.org,
Michael Gunselmann <michael.gunselmann@studium.uni-erlange.de>,
martin.hofmann@studium.uni-erlangen.de,
forest@alittletooquiet.net
Subject: Re: [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h
Date: Wed, 8 Jan 2014 11:07:47 -0800 [thread overview]
Message-ID: <20140108190747.GA7326@kroah.com> (raw)
In-Reply-To: <1389096711-8595-8-git-send-email-michael.gunselmann@studium.uni-erlangen.de>
On Tue, Jan 07, 2014 at 01:11:51PM +0100, Michael Gunselmann wrote:
> From: Martin Hofmann <martin.hofmann@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
prev parent reply other threads:[~2014-01-08 19:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 12:11 [PATCHv2 0/7] vt6655: Cleanup of checkpatch errors Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 1/7] vt6655: balance faulty parentheses in 80211hdr.h Michael Gunselmann
2014-01-07 12:34 ` Dan Carpenter
2014-01-07 12:11 ` [PATCHv2 2/7] vt6655: remove casts in wroute.c Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 3/7] vt6655: remove unnecessary braces " Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 4/7] vt6655: fix indentation " Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 5/7] vt6655: remove typedefs in wpactl.h Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 6/7] vt6655: fix printk usage in wpactl.c Michael Gunselmann
2014-01-07 12:11 ` [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h Michael Gunselmann
2014-01-08 19:07 ` Greg KH [this message]
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=20140108190747.GA7326@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=linux-kernel@i4.cs.fau.de \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.hofmann@studium.uni-erlange.de \
--cc=martin.hofmann@studium.uni-erlangen.de \
--cc=michael.gunselmann@studium.uni-erlange.de \
--cc=michael.gunselmann@studium.uni-erlangen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox