public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Larry Finger <larry.finger-tQ5ms3gMjBLk1uMJSBkQmQ@public•gmane.org>
To: Jiri Benc <jbenc-AlSwsSmVLrQ@public•gmane.org>
Cc: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public•gmane.org>,
	linville-2XuSBdqkA4R54TAoqtyWWQ@public•gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org
Subject: Re: [PATCH v2] mac80211: fix GCC warning on 64bit platforms
Date: Wed, 18 Jul 2007 11:14:40 -0500	[thread overview]
Message-ID: <469E3C70.4070809@lwfinger.net> (raw)
In-Reply-To: <20070718171044.2de287cd-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>

Jiri Benc wrote:
> net/mac80211/ieee80211.c: In function ieee80211_register_hw:
> net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast
> 
> Size of ieee80211_tx_status_rtap_hdr structure will never be greater than
> unsigned int.
> 
> Signed-off-by: Jiri Benc <jbenc-AlSwsSmVLrQ@public•gmane.org>
> 
> ---
> 
> On Mon, 16 Jul 2007 14:53:58 -0700 (PDT), David Miller wrote:
>> The macro "max_t" exists for these kinds of situations, please
>> use it. :-)
> 
> Ok.
> 
> ---
>  net/mac80211/ieee80211.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- mac80211-2.6.orig/net/mac80211/ieee80211.c
> +++ mac80211-2.6/net/mac80211/ieee80211.c
> @@ -4986,8 +4986,8 @@ int ieee80211_register_hw(struct ieee802
>  	 * and we need some headroom for passing the frame to monitor
>  	 * interfaces, but never both at the same time.
>  	 */
> -	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'? (2) Because tx_headroom is an int, why use unsigned at all?

Larry

  parent reply	other threads:[~2007-07-18 16:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12 20:41 Please pull 'upstream-davem' branch of wireless-2.6 John W. Linville
     [not found] ` <20070712204137.GB14486-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
2007-07-15  1:59   ` David Miller
     [not found]     ` <20070714.185935.18577806.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-07-15  3:41       ` David Miller
     [not found]         ` <20070714.204116.23012949.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-07-16 16:46           ` [PATCH] mac80211: fix GCC warning on 64bit platforms Jiri Benc
     [not found]             ` <20070716184653.355253bf-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2007-07-16 21:53               ` David Miller
     [not found]                 ` <20070716.145358.35015496.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2007-07-18 15:10                   ` [PATCH v2] " Jiri Benc
2007-07-18 16:00                     ` Johannes Berg
     [not found]                     ` <20070718171044.2de287cd-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2007-07-18 16:14                       ` Larry Finger [this message]
     [not found]                         ` <469E3C70.4070809-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2007-07-18 16:27                           ` Jiri Benc
     [not found]                             ` <20070718182740.69addc09-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2007-07-18 16:40                               ` Larry Finger
2007-07-18 22:29                     ` David Miller

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=469E3C70.4070809@lwfinger.net \
    --to=larry.finger-tq5ms3gmjblk1umjsbkqmq@public$(echo .)gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public$(echo .)gmane.org \
    --cc=jbenc-AlSwsSmVLrQ@public$(echo .)gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    --cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public$(echo .)gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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