Skip to contentSkip to conversation

alpha: replace `__attribute' by `__attribute__'

PATCH In review Roel Kluin 3 participants 5 messages Apr 1, 2008

Subsystems (4)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/8 alpha: replace `__attribute' by `__attribute__'

replace __attribute' by __attribute__'

---

arch/alpha/kernel/core_cia.c +1 -1
index 1d6ee6c..0f2df3c 100644
@@ -569,7 +569,7 @@ struct
 	unsigned int w_mask;
 	unsigned int t_base;
     } window[4];
-} saved_config __attribute((common));
+} saved_config __attribute__((common));
 
 void
 cia_save_srm_settings(int is_pyxis)
arch/alpha/kernel/core_t2.c +1 -1
index f5ca525..3e4d908 100644
@@ -91,7 +91,7 @@ static struct
 	unsigned long hae_3;
 	unsigned long hae_4;
 	unsigned long hbase;
-} t2_saved_config __attribute((common));
+} t2_saved_config __attribute__((common));
 
 /*
  * Given a bus, device, and function number, compute resulting
arch/alpha/kernel/sys_sio.c +1 -1
index ee7b900..c53a0c2 100644
@@ -40,7 +40,7 @@
 struct 
 {
 	unsigned int orig_route_tab; /* for SAVE/RESTORE */
-} saved_config __attribute((common));
+} saved_config __attribute__((common));
 #endif
 
 
author
#1 lore raw

PATCH 2/8 powerpc: replace `__attribute' by `__attribute__'

replace __attribute' by __attribute__'

---

arch/powerpc/platforms/iseries/main_store.h +4 -4
index 1a7a3f5..976b23e 100644
@@ -61,7 +61,7 @@ struct IoHriMainStoreSegment4 {
 };
 
 /* Main Store VPD for Power4 */
-struct __attribute((packed)) IoHriMainStoreChipInfo1 {
+struct __attribute__((packed)) IoHriMainStoreChipInfo1 {
 	u32	chipMfgID;
 	char	chipECLevel[4];
 };
@@ -73,14 +73,14 @@ struct IoHriMainStoreVpdIdData {
 	char	serialNumber[12];
 };
 
-struct	__attribute((packed)) IoHriMainStoreVpdFruData {
+struct	__attribute__((packed)) IoHriMainStoreVpdFruData {
 	char	fruLabel[8];
 	u8	numberOfSlots;
 	u8	pluggingType;
 	u16	slotMapIndex;
 };
 
-struct  __attribute((packed)) IoHriMainStoreAdrRangeBlock {
+struct  __attribute__((packed)) IoHriMainStoreAdrRangeBlock {
 	void	*blockStart;
 	void	*blockEnd;
 	u32	blockProcChipId;
@@ -88,7 +88,7 @@ struct  __attribute((packed)) IoHriMainStoreAdrRangeBlock {
 
 #define MaxAreaAdrRangeBlocks 4
 
-struct __attribute((packed)) IoHriMainStoreArea4 {
+struct __attribute__((packed)) IoHriMainStoreArea4 {
 	u32	msVpdFormat;
 	u8	containedVpdType;
 	u8	reserved1;
#2 lore raw

Re: [PATCH 2/8] powerpc: replace `__attribute' by `__attribute__'

Quoted 9 lines · Roel Kluin

replace __attribute' by __attribute__'

---

arch/powerpc/platforms/iseries/main_store.h +0 -0
index 1a7a3f5..976b23e 100644

arch/powerpc/platforms/iseries/main_store.h struct IoHriMainStoreSegment4 { · line 67

Quoted 8 lines
arch/powerpc/platforms/iseries/main_store.h +1 -1
@@ -61,7 +61,7 @@ struct IoHriMainStoreSegment4 {
 };
 
 /* Main Store VPD for Power4 */
-struct __attribute((packed)) IoHriMainStoreChipInfo1 {
+struct __attribute__((packed)) IoHriMainStoreChipInfo1 {
 	u32	chipMfgID;
 	char	chipECLevel[4];
 };

Please introduce __packed if you touch this.
See include/linux/compiler-gcc.h

This comment is relevant for all your patches.
We have __used and other similar variants.

So take a good look at include/linux/compiler* and use the proper shortcuts where available.

Sam

#3 lore raw

Re: [PATCH 2/8] powerpc: replace `__attribute' by `__attribute__'

In reply to Roel Kluin
Quoted 1 line · Roel Kluin

replace __attribute' by __attribute__'

Why? Your commit message doesn't give any motivation.

Paul.

author
#4 lore raw

PATCH 3/8 : replace `__attribute' by `__attribute__'

In reply to Roel Kluin

replace __attribute' by __attribute__'

---

drivers/net/3c527.h +3 -3
index 75e28fe..21c59bd 100644
@@ -34,7 +34,7 @@ struct mc32_mailbox
 {
  	u16 mbox;
  	u16 data[1];
-} __attribute((packed));
+} __attribute__((packed));
 
 struct skb_header
 {
@@ -43,7 +43,7 @@ struct skb_header
 	u16 next;	/* Do not change! */
 	u16 length;
 	u32 data;
-} __attribute((packed));
+} __attribute__((packed));
 
 struct mc32_stats
 {
@@ -68,7 +68,7 @@ struct mc32_stats
 	u32 dataA[6];
 	u16 dataB[5];
 	u32 dataC[14];
-} __attribute((packed));
+} __attribute__((packed));
 
 #define STATUS_MASK	0x0F
 #define COMPLETED	(1<<7)
drivers/net/irda/vlsi_ir.h +1 -1
index c8b9c74..200af2b 100644
@@ -545,7 +545,7 @@ struct ring_descr_hw {
 			u8		addr_res[3];
 			volatile u8	status;		/* descriptor status */
 		} __attribute__((packed)) rd_s;
-	} __attribute((packed)) rd_u;
+	} __attribute__((packed)) rd_u;
 } __attribute__ ((packed));
 
 #define rd_addr		rd_u.addr
drivers/net/lib8390.c +1 -1
index 0c5447d..c681056 100644
@@ -1116,7 +1116,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
 								int start_page)
 {
 	unsigned long e8390_base = dev->base_addr;
- 	struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+ 	struct ei_device *ei_local __attribute__((unused)) = (struct ei_device *) netdev_priv(dev);
 
 	ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
 
drivers/net/pcmcia/axnet_cs.c +1 -1
index ce95c5d..69b31d4 100644
@@ -1812,7 +1812,7 @@ static void NS8390_trigger_send(struct net_device *dev, unsigned int length,
 								int start_page)
 {
 	long e8390_base = dev->base_addr;
- 	struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev);
+ 	struct ei_device *ei_local __attribute__((unused)) = (struct ei_device *) netdev_priv(dev);
     
 	if (inb_p(e8390_base) & E8390_TRANS) 
 	{
drivers/net/sky2.h +3 -3
index 7bb3ba9..8cae15f 100644
@@ -1947,21 +1947,21 @@ struct sky2_tx_le {
 	__le16	length;	/* also vlan tag or checksum start */
 	u8	ctrl;
 	u8	opcode;
-} __attribute((packed));
+} __attribute__((packed));
 
 struct sky2_rx_le {
 	__le32	addr;
 	__le16	length;
 	u8	ctrl;
 	u8	opcode;
-} __attribute((packed));
+} __attribute__((packed));
 
 struct sky2_status_le {
 	__le32	status;	/* also checksum */
 	__le16	length;	/* also vlan tag */
 	u8	css;
 	u8	opcode;
-} __attribute((packed));
+} __attribute__((packed));
 
 struct tx_ring_info {
 	struct sk_buff	*skb;