lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] SFI: include/linux/sfi.h
On Tue, 23 Jun 2009 15:28:11 +0800
Ingo Molnar <mingo@elte.hu> wrote:

>
> * Len Brown <lenb@kernel.org> wrote:
>
> > +/*
> > + * Table structures must be byte-packed to match the SFI
> > specification,
> > + * as they are provided by the BIOS.
> > + */
> > +#pragma pack(1)
>
> We use __attribute__((packed)) for that generally.
>
> > +struct sfi_table_header {
> > + char signature[SFI_SIGNATURE_SIZE];
> > + u32 length;
> > + u8 revision;
> > + u8 checksum;
> > + char oem_id[SFI_OEM_ID_SIZE];
> > + char oem_table_id[SFI_OEM_TABLE_ID_SIZE];
> > +};
>
> Please use more readable structure definitions, such as:
>
> > +struct sfi_table_header {
> > + char signature[SFI_SIGNATURE_SIZE];
> > + u32 length;
> > + u8 revision;
> > + u8 checksum;
> > + char oem_id[SFI_OEM_ID_SIZE];
> > + char
> > oem_table_id[SFI_OEM_TABLE_ID_SIZE]; +};
>
> > +void __init __iomem *
> > +arch_early_ioremap(unsigned long phys, unsigned long size);
> > +void __init arch_early_iounmap(void __iomem *virt, unsigned long
> > size);
>
> Why is this in sfr.h? Should be in a separate series.

Thanks for your great comments, will address them.

For these arch_early_ioremap/arch_early_iounmap API, do you mean we should
put it in a sfi.h under "asm" folder? The reason we put it here is to
give a arch independent API declaration here and let each arch implement
its own func.

Thanks,
Feng

>
> > +static inline int sfi_init_memory_map(void) { return -1; }
> > +static inline int sfi_init(void) { return 0; }
> > +static inline void sfi_init_late(void) {}
>
> Seems half-aligned. Please align consistently, such as:
>
> static inline int sfi_init_memory_map(void) { return -1; }
> static inline int sfi_init(void) { return 0; }
> static inline void sfi_init_late(void) { }
>
> or dont align at all.
>
> Ingo


\
 
 \ /
  Last update: 2009-06-23 09:51    [W:0.063 / U:5.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site