Skip to contentSkip to conversation

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

PATCH Judith Lebzelter 2 participants 2 messages Sep 28, 2006 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Hello,

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.

drivers/net/wireless/tiacx/wlan_compat.h +11 -11
diff -Nur linux.nodelta/drivers/net/wireless/tiacx/wlan_compat.h linux/drivers/net/wireless/tiacx/wlan_compat.h
@@ -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;
drivers/net/wireless/tiacx/wlan_hdr.h +110 -110

250 lines not on this page · raw message

drivers/net/wireless/tiacx/wlan_mgmt.h +85 -85

229 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · On Thu, 28 Sep 2006 10:34:21 -0700 Judith Lebzelter wrote:

Hello,

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:

Quoted 7 lines

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.

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)

drivers/net/wireless/tiacx/wlan_compat.h

Quoted 4 lines

diff -Nur linux.nodelta/drivers/net/wireless/tiacx/wlan_compat.h linux/drivers/net/wireless/tiacx/wlan_compat.h

drivers/net/wireless/tiacx/wlan_compat.h +0 -0
@@ -243,20 +243,20 @@

Thanks.
---
~Randy