Re: [PATCH 1/1] [Blackfin try #2] char driver for Blackfin on-chipOTP memory

From: Jiri Slaby
Date: Wed Mar 26 2008 - 14:34:22 EST


On 03/26/2008 03:31 PM, Mike Frysinger wrote:
On Wed, Mar 26, 2008 at 6:33 AM, Jiri Slaby <jirislaby@xxxxxxxxx> wrote:
On 03/27/2008 02:08 AM, Bryan Wu wrote:
> From: Mike Frysinger <vapier.adi@xxxxxxxxx>
+static int __init bfin_otp_init(void)
> +{
> + int ret;
> +
> + stampit();
> +
> + ret = misc_register(&bfin_otp_misc_device);
> + if (ret) {
> + pr_init(KERN_ERR PFX "unable to register a misc device\n");
> + return ret;
> + }
> +
> + pr_init(KERN_INFO PFX "initialized\n");

except the fact, that pr_init definition seems to be broken. Its defined __fmt
is const, so it should reside in .init.rodata (__initconst), not .init.data
(__initdata).

i dont see an __initconst macro anywhere ?

It's in include/linux/init.h as of 2.6.25-rc2.

also, it isnt "broken" in the sense that it "doesnt work" ;)

Gcc simply doesn't allow that, you likely got 2 sections with init.data, with and without readonly bit set, which is wrong, and it seems, that on some systems (debian) you won't even compile it.
--
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/