Re: [PATCH/RFC] s390: Hypervisor File System

From: Pekka Enberg
Date: Fri Apr 21 2006 - 11:49:10 EST


On Fri, 2006-04-21 at 16:59 +0200, Michael Holzheu wrote:
> > > +struct x_info_blk_hdr {
> > > + __u8 npar;
> > > + __u8 flags;
> > > + __u16 tslice;
> > > + __u16 phys_cpus;
> > > + __u16 this_part;
> > > + __u64 curtod1;
> > > + __u64 curtod2;
> > > + char reserved[40];
> > > +} __attribute__ ((packed));
> >
> > Couldn't you use endianess annotated types for these?
>
> What are "endianess annotated types" ?

For example, __le16 and __be16 (search for __bitwise in
<linux/types.h>). You can use sparse to check for endianess erros in
your code if you us them.

Pekka

-
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/