lkml.org 
[lkml]   [2011]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 01/19] OpenRISC: Boot code
Date
On Sunday 19 June 2011 13:43:27 Jonas Bonn wrote:
>
> +
> +/*
> + * Setup options
> + */
> +
> +extern int root_mountflags;
> +extern char _stext, _etext, _edata, _end;
> +extern int __init setup_early_serial8250_console(char *cmdline);
> +#ifdef CONFIG_BLK_DEV_INITRD
> +extern char __initrd_start, __initrd_end;
> +extern char __initramfs_start;
> +#endif
> +
> +extern u32 __dtb_start[];
> ...
> +extern const unsigned long text_start, edata; /* set by the linker script */
> +
> ...
> +
> +extern void __ic_enable(u32 icache_size, u32 icache_block_size);
> +extern void __dc_enable(u32 dcache_size, u32 dcache_block_size);
> +

Better move these all to a header file.

> +unsigned long or32_mem_size = 0;

This seems to be unused.

> +#ifdef CONFIG_CMDLINE
> +char __initdata cmd_line[COMMAND_LINE_SIZE] = CONFIG_CMDLINE;
> +#else
> +char __initdata cmd_line[COMMAND_LINE_SIZE] = "console=uart,mmio,0x90000000,115200";
> +#endif

You can set the Kconfig default to "console=uart,mmio,0x90000000,115200" and get
rid of the #ifdef here.

> + printk("OpenRISC Linux -- http://openrisc.net\n");

Missing KERN_* level.

> +struct seq_operations cpuinfo_op = {
> + start: c_start,
> + next: c_next,
> + stop: c_stop,
> + show: show_cpuinfo,
> +};

Structures should be initialized with modern named field initializers, like

.start = c_start,

> +/*RGD this awful hack is because our compiler does
> + *support the "weak" attribute correctly at this time
> + *once we do (support weak) this should be removed!!
> + */
> +void __start_notes(void){}
> +void __stop_notes(void){}

Does that comment still apply, or can you remove this now?

Arnd


\
 
 \ /
  Last update: 2011-06-19 19:17    [W:0.282 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site