From 6a878184c202395ea17212f111ab9ec4b5f6d6ee Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Sun, 8 Jan 2006 01:05:07 -0800 Subject: [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 Since version 4.1 the gcc is warning about ignored attributes. This patch is using the equivalent attribute on the struct instead of on each of the structure or union members. GCC Manual: "Specifying Attributes of Types packed This attribute, attached to struct or union type definition, specifies that each member of the structure or union is placed to minimize the memory required. When attached to an enum definition, it indicates that the smallest integral type should be used. Specifying this attribute for struct and union types is equivalent to specifying the packed attribute on each of the structure or union members." Signed-off-by: Jan Blunck Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/sdla.h | 64 ++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'include/linux/sdla.h') diff --git a/include/linux/sdla.h b/include/linux/sdla.h index 3b6afb8caa4..564acd3a71c 100644 --- a/include/linux/sdla.h +++ b/include/linux/sdla.h @@ -293,46 +293,46 @@ void sdla(void *cfg_info, char *dev, struct frad_conf *conf, int quiet); #define SDLA_S508_INTEN 0x10 struct sdla_cmd { - char opp_flag __attribute__((packed)); - char cmd __attribute__((packed)); - short length __attribute__((packed)); - char retval __attribute__((packed)); - short dlci __attribute__((packed)); - char flags __attribute__((packed)); - short rxlost_int __attribute__((packed)); - long rxlost_app __attribute__((packed)); - char reserve[2] __attribute__((packed)); - char data[SDLA_MAX_DATA] __attribute__((packed)); /* transfer data buffer */ -}; + char opp_flag; + char cmd; + short length; + char retval; + short dlci; + char flags; + short rxlost_int; + long rxlost_app; + char reserve[2]; + char data[SDLA_MAX_DATA]; /* transfer data buffer */ +} __attribute__((packed)); struct intr_info { - char flags __attribute__((packed)); - short txlen __attribute__((packed)); - char irq __attribute__((packed)); - char flags2 __attribute__((packed)); - short timeout __attribute__((packed)); -}; + char flags; + short txlen; + char irq; + char flags2; + short timeout; +} __attribute__((packed)); /* found in the 508's control window at RXBUF_INFO */ struct buf_info { - unsigned short rse_num __attribute__((packed)); - unsigned long rse_base __attribute__((packed)); - unsigned long rse_next __attribute__((packed)); - unsigned long buf_base __attribute__((packed)); - unsigned short reserved __attribute__((packed)); - unsigned long buf_top __attribute__((packed)); -}; + unsigned short rse_num; + unsigned long rse_base; + unsigned long rse_next; + unsigned long buf_base; + unsigned short reserved; + unsigned long buf_top; +} __attribute__((packed)); /* structure pointed to by rse_base in RXBUF_INFO struct */ struct buf_entry { - char opp_flag __attribute__((packed)); - short length __attribute__((packed)); - short dlci __attribute__((packed)); - char flags __attribute__((packed)); - short timestamp __attribute__((packed)); - short reserved[2] __attribute__((packed)); - long buf_addr __attribute__((packed)); -}; + char opp_flag; + short length; + short dlci; + char flags; + short timestamp; + short reserved[2]; + long buf_addr; +} __attribute__((packed)); #endif -- cgit v1.2.3-70-g09d2