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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Jul 2007 18:27:40 +0200
From:	Jiri Benc <>
To:	Larry Finger <>
Cc:	David Miller <>,,,
Subject: Re: [PATCH v2] mac80211: fix GCC warning on 64bit platforms

On Wed, 18 Jul 2007 11:14:40 -0500, Larry Finger wrote:
> > -	local->tx_headroom = max(local->hw.extra_tx_headroom,
> > -				 sizeof(struct ieee80211_tx_status_rtap_hdr));
> > +	local->tx_headroom = max_t(unsigned, local->hw.extra_tx_headroom,
> > +				   sizeof(struct ieee80211_tx_status_rtap_hdr));
> >  
> >  	debugfs_hw_add(local);
> For my info on how to use max_t, not as a critique of this patch.
> (1) Is 'unsigned' enough or should it be 'unsigned int'?

Don't know. For a C compiler, it doesn't matter, but it's fact that
most of the code in the kernel uses "unsigned int".

> (2) Because tx_headroom is an int, why use unsigned at all?

Because hw.extra_tx_headroom is unsigned. tx_headroom should be IMO
unsigned too but that's not just a matter of changing its type as it
would mean a lot of new warnings. We're talking about numbers several
orders less than int, so it's not an issue here anyway.

If you think "int" is more appropriate, fine with me, I don't really


Jiri Benc
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists