Re: Early printk behaviour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 17 Aug 2007 17:09, Mike Frysinger pondered:
> On 8/17/07, Robin Getz <[email protected]> wrote:
> >
> > Something like:
> >
> > Index: kernel/printk.c
> > ===================================================================
> > --- kernel/printk.c     (revision 3568)
> > +++ kernel/printk.c     (working copy)
> > @@ -1104,6 +1104,22 @@
> >  }
> >  EXPORT_SYMBOL(unregister_console);
> >
> > +int __init disable_boot_consoles(void)
> > +{
> > +       struct console *con;
> > +
> > +       for (con = console_drivers; con; con = con->next) {
> > +               if (con->flags & CON_BOOT) {
> > +                       printk(KERN_INFO "Unregister BootConsole %s%d\n",
> > +                               con->name, con->index);
> > +                       unregister_console(con);
> > +               }
> > +       }
> > +       return 0;
> > +}
> > +late_initcall(disable_boot_consoles);
> 
> is there any need for a return value then ?
> void __init disable_boot_consoles(void);

So, we don't get compiler warnings?

Otherwise:
kernel/printk.c:1119: warning: initialization from incompatible pointer type

> and if we dont think anyone else wants to call it ...
> static void __init disable_boot_consoles(void);

So I think static is Ok, but it needs to be int - that is the proper prototype

-Robin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux