linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Benc <jbenc@suse.cz>
To: David Miller <davem@davemloft.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	netdev@vger.kernel.org
Subject: [PATCH] mac80211: fix GCC warning on 64bit platforms
Date: Mon, 16 Jul 2007 18:46:53 +0200	[thread overview]
Message-ID: <20070716184653.355253bf@griffin.suse.cz> (raw)
In-Reply-To: <20070714.204116.23012949.davem@davemloft.net>

net/mac80211/ieee80211.c: In function ieee80211_register_hw:
net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

Fix by casting from size_t to unsigned as size of ieee80211_tx_status_rtap_hdr
structure will never be greater than that.

Signed-off-by: Jiri Benc <jbenc@suse.cz>

---

On Sat, 14 Jul 2007 20:41:16 -0700 (PDT), David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Sat, 14 Jul 2007 18:59:35 -0700 (PDT)
> 
> > From: "John W. Linville" <linville@tuxdriver.com>
> > Date: Thu, 12 Jul 2007 16:41:38 -0400
> > 
> > > This request is based off net-2.6, as it requires a patch that is in
> > > net-2.6 but not yet in Linus' tree (b3d88ad49a0623d09efcf998beb26288c8029f75).
> >  ...
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-davem
> > 
> > Pulled, thanks John!
> 
> A warning to look into:
> 
> net/mac80211/ieee80211.c: In function $,1rxieee80211_register_hw$,1ry:
> net/mac80211/ieee80211.c:4989: warning: comparison of distinct pointer types lacks a cast

---
 net/mac80211/ieee80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- mac80211-2.6.orig/net/mac80211/ieee80211.c
+++ mac80211-2.6/net/mac80211/ieee80211.c
@@ -4987,7 +4987,7 @@ int ieee80211_register_hw(struct ieee802
 	 * interfaces, but never both at the same time.
 	 */
 	local->tx_headroom = max(local->hw.extra_tx_headroom,
-				 sizeof(struct ieee80211_tx_status_rtap_hdr));
+				 (unsigned)sizeof(struct ieee80211_tx_status_rtap_hdr));
 
 	debugfs_hw_add(local);
 

-- 
Jiri Benc
SUSE Labs

  reply	other threads:[~2007-07-16 16:46 UTC|newest]

Thread overview: 13+ 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
2007-07-15  1:59 ` David Miller
2007-07-15  3:41   ` David Miller
2007-07-16 16:46     ` Jiri Benc [this message]
2007-07-16 21:53       ` [PATCH] mac80211: fix GCC warning on 64bit platforms David Miller
2007-07-18 15:10         ` [PATCH v2] " Jiri Benc
2007-07-18 16:00           ` Johannes Berg
2007-07-18 16:14           ` Larry Finger
2007-07-18 16:27             ` Jiri Benc
2007-07-18 16:40               ` Larry Finger
2007-07-18 22:29           ` David Miller
2007-07-16 16:37 ` Please pull 'upstream-davem' branch of wireless-2.6 Andy Green
2007-07-16 16:49   ` Jiri Benc

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=20070716184653.355253bf@griffin.suse.cz \
    --to=jbenc@suse.cz \
    --cc=davem@davemloft.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).