Skip to contentSkip to conversation

Firewire: net: replacing deprecated __attribute__((packed)) with __packed

PATCH In review August Lilleaas 2 participants 5 messages May 29, 2011 – Jun 2, 2011 1 message not in the archive Firewire

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Firewire: net: replacing deprecated __attribute__((packed)) with __packed

Fixing a deprecation, replacing __attribute__((packed)) with __packed.

---
 drivers/firewire/net.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/firewire/net.c +2 -2
index b9762d0..2e988ca 100644
@@ -73,7 +73,7 @@ struct rfc2734_arp {
 	__be32 fifo_lo;		/* lo 32bits of sender's FIFO addr	*/
 	__be32 sip;		/* Sender's IP Address			*/
 	__be32 tip;		/* IP Address of requested hw addr	*/
-} __attribute__((packed));
+} __packed;
 
 /* This header format is specific to this driver implementation. */
 #define FWNET_ALEN	8
@@ -81,7 +81,7 @@ struct rfc2734_arp {
 struct fwnet_header {
 	u8 h_dest[FWNET_ALEN];	/* destination address */
 	__be16 h_proto;		/* packet type ID field */
-} __attribute__((packed));
+} __packed;
 
 /* IPv4 and IPv6 encapsulation header */
 struct rfc2734_header {
Signature · 1 line
1.7.5.2
#1 lore raw
Quoted 1 line · On May 29 August Lilleaas wrote:

Fixing a deprecation, replacing __attribute__((packed)) with __packed.

Who deprecated it and why?

Shouldn't you add "#include <linux/compiler.h>" now?

Signature · 3 lines
Stefan Richter
-=====-==-== -=-= ===-=
http://arcgraph.de/sr/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

PATCH 1/1 Firewire: net: replacing deprecated __attribute__((packed)) with __packed

Forwarding as plain text, mistakenly sent as HTML mail first.

---------- Forwarded message ----------
From: August Lilleaas <[email protected]>
Date: Mon, May 30, 2011 at 12:11 AM
Subject: Re: [PATCH] Firewire: net: replacing deprecated __attribute__((packed)) with __packed
To: Stefan Richter <[email protected]>
Cc: [email protected], [email protected]

Quoted 2 lines · Stefan Richter

Who deprecated it and why?

To be frank, the motivation for this patch was a message from script/checkpatch.pl when scouring random files for warnings. (This is my first contribution to the kernel.)
Just did some much needed investigation though. It was deprecated for portability, specifically to avoid GCC specific code. See commit 82ddcb040570411fc2d421d96b3e69711c670328.

Quoted 2 lines

Shouldn't you add "#include <linux/compiler.h>" now?

You're right. I'll read up on updating patches and get at it.

Quoted 5 lines

--
Stefan Richter
-=====-==-== -=-= ===-=
http://arcgraph.de/sr/

#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · On May 30 August Lilleaas wrote:
Quoted 2 lines · Stefan Richter

Who deprecated it and why?

Quoted 7 lines

To be frank, the motivation for this patch was a message from script/ checkpatch.pl when scouring random files for warnings. (This is my first contribution to the kernel.)

Just did some much needed investigation though. It was deprecated for portability, specifically to avoid GCC specific code. See commit 82ddcb040570411fc2d421d96b3e69711c670328.

OK, thanks for the info.

Quoted 4 lines
Quoted 2 lines

Shouldn't you add "#include <linux/compiler.h>" now?

You're right. I'll read up on updating patches and get at it.

I will just add it when I commit the patch.

(One way to update a patch is to make it the top commit, then edit files and "git add ..." them as necessary, then "git commit --amend". There are other ways of course.)

Signature · 3 lines
Stefan Richter
-=====-==-== -=-= ====-
http://arcgraph.de/sr/
#5 lore raw

Committed to linux1394-2.6.git master. Thanks.

Signature · 3 lines
Stefan Richter
-=====-==-== -==- ---=-
http://arcgraph.de/sr/