Re: [RFC 5/8] param: arch_get_boot_command_line()

From: Russell King
Date: Tue Dec 02 2008 - 12:45:54 EST


On Tue, Dec 02, 2008 at 12:43:37PM +1030, Rusty Russell wrote:
> A couple of #if 0 around code I don't think can happen (even in the orignal
> place I moved it from?)

Looking at just those...

> @@ -697,32 +693,48 @@ void __init setup_arch(char **cmdline_p)
> */
> if (tags->hdr.tag != ATAG_CORE)
> convert_to_tag_list(tags);
> +#if 0
> if (tags->hdr.tag != ATAG_CORE)
> tags = (struct tag *)&init_tags;
> +#endif

This prevents 'init_tags' from ever being used, which wil happen if
convert_to_tag_list() doesn't find a param_struct to convert.

> +
> + if (mdesc->fixup)
> + mdesc->fixup(mdesc, tags, &meminfo);
> +
> +#if 0
> + if (tags->hdr.tag == ATAG_CORE) {
> +#endif

This may happen if the memory pointed to by 'tags' gets overwritten for
some reason by a machine specific fixup, but that'll probably never
happen.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
--
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/