Re: drivers/block/ub.c

From: Roland Dreier
Date: Mon Jun 28 2004 - 17:42:59 EST


David> Try it out if you don't believe someone who has maintained
David> the Linux networking for 7 years and sits on the GCC
David> Steering Committee. :-)

Just so I'm sure I'm not misunderstanding, are you promising me that I
will never get bitten on the ass on any architecture with kernel code
that assumes the compiler will never add padding as long as struct
fields are naturally aligned to their size? :-)

For example, you're saying I'm definitely safe declaring a structure
(used as a HW descriptor) like say

struct mthca_qp_path {
u32 port_pkey;
u8 rnr_retry;
u8 g_mylmc;
u16 rlid;
u8 ackto;
u8 mgid_index;
u8 static_rate;
u8 hop_limit;
u32 sl_tclass_flowlabel;
u8 rgid[16];
};

without __attribute__((packed))? (Of course I'll only use this struct
aligned to its size)

Thanks,
Roland
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/