2.6.18-mm1 tiacx-fix-attribute-packed-warnings for wlan

linux

2.6.18-mm1 tiacx-fix-attribute-packed-warnings for wlan

Postby Judith Lebzelter » Sat, 30 Sep 2006 02:40:07 GMT

ello,

The patch tiacx-fix-attribute-packed-warnings.patch takes care of many of
the 'packed attribute' warnings, but I noticed that some of these warnings like:

drivers/net/wireless/tiacx/wlan_compat.h:246: warning: 'packed' attribute ignored for field of type 'u8[5u]'
drivers/net/wireless/tiacx/wlan_hdr.h:476: warning: 'packed' attribute ignored for field of type 'wlanitem_u32_t'
drivers/net/wireless/tiacx/wlan_mgmt.h:253: warning: 'packed' attribute ignored for field of type 'u8'

are still present for the i386/allmodconfig build on gcc-4.1.1 for 2.6.18-mm1.
So I made a patch for the files where it is still a problem. This compiled
without warnings.

Signed-off-by: Judith Lebzelter < XXXX@XXXXX.COM >



diff -Nur linux.nodelta/drivers/net/wireless/tiacx/wlan_compat.h linux/drivers/net/wireless/tiacx/wlan_compat.h
--- linux.nodelta/drivers/net/wireless/tiacx/wlan_compat.h 2006-09-28 09:06:00.628523695 -0700
+++ linux/drivers/net/wireless/tiacx/wlan_compat.h 2006-09-28 09:50:59.301786662 -0700
@@ -243,20 +243,20 @@

/* local ether header type */
typedef struct wlan_ethhdr {
- u8 daddr[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 saddr[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u16 type __WLAN_ATTRIB_PACK__;
-} wlan_ethhdr_t;
+ u8 daddr[ETH_ALEN];
+ u8 saddr[ETH_ALEN];
+ u16 type;
+} __WLAN_ATTRIB_PACK__ wlan_ethhdr_t;

/* local llc header type */
typedef struct wlan_llc {
- u8 dsap __WLAN_ATTRIB_PACK__;
- u8 ssap __WLAN_ATTRIB_PACK__;
- u8 ctl __WLAN_ATTRIB_PACK__;
-} wlan_llc_t;
+ u8 dsap;
+ u8 ssap;
+ u8 ctl;
+} __WLAN_ATTRIB_PACK__ wlan_llc_t;

/* local snap header type */
typedef struct wlan_snap {
- u8 oui[WLAN_IEEE_OUI_LEN] __WLAN_ATTRIB_PACK__;
- u16 type __WLAN_ATTRIB_PACK__;
-} wlan_snap_t;
+ u8 oui[WLAN_IEEE_OUI_LEN];
+ u16 type;
+} __WLAN_ATTRIB_PACK__ wlan_snap_t;
diff -Nur linux.nodelta/drivers/net/wireless/tiacx/wlan_hdr.h linux/drivers/net/wireless/tiacx/wlan_hdr.h
--- linux.nodelta/drivers/net/wireless/tiacx/wlan_hdr.h 2006-09-28 09:06:00.629523545 -0700
+++ linux/drivers/net/wireless/tiacx/wlan_hdr.h 2006-09-28 09:42:18.496905257 -0700
@@ -337,120 +337,120 @@
** seq: [0:3] frag#, [4:15] seq# - used for dup detection
** (dups from retries have same seq#) */
typedef struct wlan_hdr {
- u16 fc __WLAN_ATTRIB_PACK__;
- u16 dur __WLAN_ATTRIB_PACK__;
- u8 a1[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 a2[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 a3[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u16 seq __WLAN_ATTRIB_PACK__;
- u8 a4[ETH_ALEN] __WLAN_ATTRIB_PACK__;
-} wlan_hdr_t;
+ u16 fc;
+ u16 dur;
+ u8 a1[ETH_ALEN];
+ u8 a2[ETH_ALEN];
+ u8 a3[ETH_ALEN];
+ u16 seq;
+ u8 a4[ETH_ALEN];
+} __WLAN_ATTRIB_PACK__ wlan_hdr_t;

/* Separate structs for use if frame type is known */
typedef struct wlan_hdr_a3 {
- u16 fc __WLAN_ATTRIB_PACK__;
- u16 dur __WLAN_ATTRIB_PACK__;
- u8 a1[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 a2[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 a3[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u16 seq __WLAN_ATTRIB_PACK__;
-} wlan_hdr_a3_t;
+ u16 fc;
+ u16 dur;
+ u8 a1[ETH_ALEN];
+ u8 a2[ETH_ALEN];
+ u8 a3[ETH_ALEN];
+ u16 seq;
+} __WLAN_ATTRIB_PACK__ wlan_hdr_a3_t;

typedef struct wlan_hdr_mgmt {
- u16 fc __WLAN_ATTRIB_PACK__;
- u16 dur __WLAN_ATTRIB_PACK__;
- u8 da[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 sa[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u8 bssid[ETH_ALEN] __WLAN_ATTRIB_PACK__;
- u16 seq __WLAN_ATTRIB_PACK__;
-} wlan_hdr_mgmt_t;
+ u16 fc;
+ u16 dur

Re: 2.6.18-mm1 tiacx-fix-attribute-packed-warnings for wlan

Postby Randy Dunlap » Sat, 30 Sep 2006 04:00:10 GMT





Hello,

How are you creating/generating patch files?  (git, quilt, by hand, ...)
[quilt can help a bit if your answer is "by hand" or by custom tools.]

Please see Documentation/SubmittingPatches, e.g.:

section 12) The canonical patch format

Consider including output of "diffstat -p1 -w70" after the
"---" marker so that patch readers can see what files are
changed and how much.

Please add diff option "-p" also.

(all mentioned in SubmittingPatches)


Thanks.
---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to  XXXX@XXXXX.COM 
More majordomo info at   http://www.**--****.com/ 
Please read the FAQ at   http://www.**--****.com/ 



Return to linux

 

Who is online

Users browsing this forum: No registered users and 67 guest