Andrew Morton wrote: > hm. So if I have > > struct bar { > unsigned long b; > } __attribute__((packed)); > > struct foo { > unsigned long u; > struct bar b; > }; > > then the compiler can see that foo.b.b is well-aligned, regardless of the > packedness. In Ralf's code, the structure is anonymous, and is used to declare a pointer type, which is initialized from a void *. So I think the compiler isn't allowed to assume anything about its alignment. J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- From: Ralf Baechle <[email protected]>
- Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- From: Ralf Baechle <[email protected]>
- Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- From: Andrew Morton <[email protected]>
- Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- From: Ralf Baechle <[email protected]>
- Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- From: Andrew Morton <[email protected]>
- [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- Prev by Date: Re: [PATCH 3/5] scsi: megaraid_sas - throttle io if FW is busy
- Next by Date: Re: [2.6 patch] drivers/isdn/gigaset/: build asyncdata.o into the gigaset module
- Previous by thread: Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- Next by thread: Re: [PATCH] Optimize generic get_unaligned / put_unaligned implementations.
- Index(es):