Commit ec5510b9 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] gcc-3.4.0 fixes

From: Mikael Pettersson <mikpe@user.it.uu.se>

This patch fixes three warnings from gcc-3.4.0 in 2.6.6-rc3:

- arch/i386/pci/pcbios.c: use of "+m" constraint

- drivers/char/ftape/: use of cast-as-lvalue

- drivers/char/ftape/: __attribute__((packed)) on something containing only
  bytes
parent bd08b0a9
...@@ -431,11 +431,13 @@ struct irq_routing_table * __devinit pcibios_get_irq_routing_table(void) ...@@ -431,11 +431,13 @@ struct irq_routing_table * __devinit pcibios_get_irq_routing_table(void)
"1:" "1:"
: "=a" (ret), : "=a" (ret),
"=b" (map), "=b" (map),
"+m" (opt) "=m" (opt)
: "0" (PCIBIOS_GET_ROUTING_OPTIONS), : "0" (PCIBIOS_GET_ROUTING_OPTIONS),
"1" (0), "1" (0),
"D" ((long) &opt), "D" ((long) &opt),
"S" (&pci_indirect)); "S" (&pci_indirect),
"m" (opt)
: "memory");
DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map); DBG("OK ret=%d, size=%d, map=%x\n", ret, opt.size, map);
if (ret & 0xff00) if (ret & 0xff00)
printk(KERN_ERR "PCI: Error %02x when fetching IRQ routing table.\n", (ret >> 8) & 0xff); printk(KERN_ERR "PCI: Error %02x when fetching IRQ routing table.\n", (ret >> 8) & 0xff);
......
...@@ -203,6 +203,7 @@ static void print_bad_sector_map(void) ...@@ -203,6 +203,7 @@ static void print_bad_sector_map(void)
ft_format_code == fmt_1100ft) { ft_format_code == fmt_1100ft) {
SectorCount *ptr = (SectorCount *)bad_sector_map; SectorCount *ptr = (SectorCount *)bad_sector_map;
unsigned int sector; unsigned int sector;
__u16 *ptr16;
while((sector = get_sector(ptr++)) != 0) { while((sector = get_sector(ptr++)) != 0) {
if ((ft_format_code == fmt_big || if ((ft_format_code == fmt_big ||
...@@ -218,9 +219,10 @@ static void print_bad_sector_map(void) ...@@ -218,9 +219,10 @@ static void print_bad_sector_map(void)
} }
/* Display old ftape's end-of-file marks /* Display old ftape's end-of-file marks
*/ */
while ((sector = get_unaligned(((__u16*)ptr)++)) != 0) { ptr16 = (__u16*)ptr;
while ((sector = get_unaligned(ptr16++)) != 0) {
TRACE(ft_t_noise, "Old ftape eof mark: %4d/%2d", TRACE(ft_t_noise, "Old ftape eof mark: %4d/%2d",
sector, get_unaligned(((__u16*)ptr)++)); sector, get_unaligned(ptr16++));
} }
} else { /* fixed size format */ } else { /* fixed size format */
for (i = ft_first_data_segment; for (i = ft_first_data_segment;
......
...@@ -47,7 +47,7 @@ typedef __u32 SectorMap; ...@@ -47,7 +47,7 @@ typedef __u32 SectorMap;
*/ */
typedef struct NewSectorMap { typedef struct NewSectorMap {
__u8 bytes[3]; __u8 bytes[3];
} SectorCount __attribute__((packed)); } SectorCount;
/* /*
......
...@@ -123,7 +123,7 @@ static __u8 * find_end_of_eof_list(__u8 * ptr, __u8 * limit) ...@@ -123,7 +123,7 @@ static __u8 * find_end_of_eof_list(__u8 * ptr, __u8 * limit)
while (ptr + 3 < limit) { while (ptr + 3 < limit) {
if (get_unaligned((__u32*)ptr)) { if (get_unaligned((__u32*)ptr)) {
++(__u32*)ptr; ptr += sizeof(__u32);
} else { } else {
return ptr; return ptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment