On Thu, Jun 14, 2018 at 9:49 PM Sam Ravnborg <sam@xxxxxxxxxxxx> wrote: > > Hi Andrey. > > On Thu, Jun 14, 2018 at 09:11:10PM -0700, Andrey Smirnov wrote: > > Move all of the shared code into lib/console.c and convert both files > > to use that. > > > > Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> > > --- > > +++ b/lib/console.c > > @@ -0,0 +1,130 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > + > > +/* > > + * File containing all of the console-related code that is used by all > > + * possible consumers: PBL, CONSOLE_FULL, CONSOLE_SIMPLE, etc. > > + * > > + * Copyright (C) 2018 Zodiac Inflight Innovations > > + * Author: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> > > + */ > > + > > +#include <debug_ll.h> > > +#include <console.h> > > + > > +/* > > + * Put this in the data section so that it survives the clearing of > > + * the BSS segment. > > + */ > > +#define __data __attribute__ ((section(".data"))) > This definition would be better placed in compiler.h > together with all the __naked etc. definitions. > I thought about it, but AFAIK, there's only a single user of this in the whole codebase and __data, unlike, say, __naked, seems like a generic enough name to cause name collisions, so I opted at keeping it in .c file. Thanks, Andrey Smirnov _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox