Re: [PATCH 0/2] wireless: Make and use const struct ieee80211_channel

From: John W. Linville
Date: Wed May 11 2011 - 13:01:00 EST


On Fri, May 06, 2011 at 09:10:21AM -0700, Joe Perches wrote:
> On Fri, 2011-05-06 at 09:19 -0400, John W. Linville wrote:
> > On Thu, May 05, 2011 at 03:21:47PM -0700, Joe Perches wrote:
> > > On Thu, 2011-05-05 at 14:49 -0400, John W. Linville wrote:
> > > > These patches generated a lot of warnings in net/mac80211. Did you
> > > > actually build them?
> > > Yes.
> > > Did you apply patch 1/2 first?
> > > It's a dependent patch.
> > That's the one that cause most of the warnings...
>
> Consider the 2 patches as a single patch.
> Do you have new build warnings after applying both
> patches 1 and 2?

Yes, of course.

CC [M] net/mac80211/scan.o
net/mac80211/scan.c: In function âieee80211_scan_state_decisionâ:
net/mac80211/scan.c:509:12: warning: assignment discards qualifiers from pointer target type
net/mac80211/scan.c: In function âieee80211_scan_state_set_channelâ:
net/mac80211/scan.c:610:7: warning: assignment discards qualifiers from pointer target type
CC [M] net/mac80211/offchannel.o
CC [M] net/mac80211/ht.o
CC [M] net/mac80211/agg-tx.o
CC [M] net/mac80211/agg-rx.o
CC [M] net/mac80211/ibss.o
net/mac80211/ibss.c: In function âieee80211_sta_join_ibssâ:
net/mac80211/ibss.c:250:7: warning: passing argument 4 of â__ieee80211_sta_join_ibssâ discards qualifiers from pointer target type
net/mac80211/ibss.c:64:13: note: expected âstruct ieee80211_channel *â but argument is of type âconst struct ieee80211_channel *â
net/mac80211/ibss.c: In function âieee80211_ibss_joinâ:
net/mac80211/ibss.c:918:24: warning: assignment discards qualifiers from pointer target type
net/mac80211/ibss.c:923:30: warning: assignment discards qualifiers from pointer target type
CC [M] net/mac80211/mlme.o
net/mac80211/mlme.c: In function âieee80211_mgd_authâ:
net/mac80211/mlme.c:2350:11: warning: assignment discards qualifiers from pointer target type
net/mac80211/mlme.c: In function âieee80211_mgd_assocâ:
net/mac80211/mlme.c:2500:11: warning: assignment discards qualifiers from pointer target type
CC [M] net/mac80211/work.o
CC [M] net/mac80211/iface.o
CC [M] net/mac80211/rate.o
CC [M] net/mac80211/tkip.o
CC [M] net/mac80211/aes_ccm.o
CC [M] net/mac80211/aes_cmac.o
CC [M] net/mac80211/cfg.o
net/mac80211/cfg.c:2083:2: warning: initialization from incompatible pointer type
net/mac80211/cfg.c:2101:2: warning: initialization from incompatible pointer type
net/mac80211/cfg.c:2103:2: warning: initialization from incompatible pointer type
CC [M] net/mac80211/rx.o

commit 07daa458f14226deff1e464f594a44111168e7ee
Author: Joe Perches <joe@xxxxxxxxxxx>
Date: Thu Apr 28 22:25:08 2011 -0700

wireless: Use const struct ieee80211_channel where possible

Make some structure uses const.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>

commit 5c9adfae8855fc744f77b24df322060a7117c521
Author: Joe Perches <joe@xxxxxxxxxxx>
Date: Thu Apr 28 22:25:07 2011 -0700

wireless: Make struct ieee80211_channel const where possible

Useful for declarations of static const.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>

<commits were temporary, not applied now>

I'm dropping these patches -- feel free to repost if/when the warnings
disappear.

John
--
John W. Linville Someday the world will need a hero, and you
linville@xxxxxxxxxxxxx might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/