lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 8 Jan 2014 11:07:47 -0800
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Michael Gunselmann <michael.gunselmann@...dium.uni-erlangen.de>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...cs.fau.de,
	Martin Hofmann <martin.hofmann@...dium.uni-erlange.de>,
	linux-kernel@...r.kernel.org,
	Michael Gunselmann <michael.gunselmann@...dium.uni-erlange.de>,
	martin.hofmann@...dium.uni-erlangen.de, forest@...ttletooquiet.net
Subject: Re: [PATCHv2 7/7] vt6655: Remove typedefs in 80211hdr.h

On Tue, Jan 07, 2014 at 01:11:51PM +0100, Michael Gunselmann wrote:
> From: Martin Hofmann <martin.hofmann@...dium.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ