[PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-19 Thread Yann E. MORIN
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means the CONFIG_ prefix is hard-coded at compile time. This goes against having a run-time defined CONFIG_ prefix. Add a function that returns the CONFIG_ prefix to use (but keep the current hard-coded behavior, to be changed in a

Re: [PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-19 Thread Yann E. MORIN
Michal, All, On Friday 19 October 2012 Michal Marek wrote: > On 18.10.2012 21:50, Yann E. MORIN wrote: > > -#ifndef CONFIG_ > > -#define CONFIG_ "CONFIG_" > > +/* Those two defines copied from include/linux/stringify.h */ > > +#define __stringify_1(x...)#x > > +#define __stringify(x...)

Re: [PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-19 Thread Michal Marek
On 18.10.2012 21:50, Yann E. MORIN wrote: > -#ifndef CONFIG_ > -#define CONFIG_ "CONFIG_" > +/* Those two defines copied from include/linux/stringify.h */ > +#define __stringify_1(x...) #x > +#define __stringify(x...)__stringify_1(x) > +static inline const char *CONFIG_prefix(void) > +{ > +

Re: [PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-19 Thread Michal Marek
On 18.10.2012 21:50, Yann E. MORIN wrote: -#ifndef CONFIG_ -#define CONFIG_ CONFIG_ +/* Those two defines copied from include/linux/stringify.h */ +#define __stringify_1(x...) #x +#define __stringify(x...)__stringify_1(x) +static inline const char *CONFIG_prefix(void) +{ + return

Re: [PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-19 Thread Yann E. MORIN
Michal, All, On Friday 19 October 2012 Michal Marek wrote: On 18.10.2012 21:50, Yann E. MORIN wrote: -#ifndef CONFIG_ -#define CONFIG_ CONFIG_ +/* Those two defines copied from include/linux/stringify.h */ +#define __stringify_1(x...)#x +#define __stringify(x...)

[PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-19 Thread Yann E. MORIN
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means the CONFIG_ prefix is hard-coded at compile time. This goes against having a run-time defined CONFIG_ prefix. Add a function that returns the CONFIG_ prefix to use (but keep the current hard-coded behavior, to be changed in a

[PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-18 Thread Yann E. MORIN
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means the CONFIG_ prefix is hard-coded at compile time. This goes against having a run-time defined CONFIG_ prefix. Add a function that returns the CONFIG_ prefix to use (but keep the current hard-coded behavior, to be changed in a

[PATCH 2/3] kconfig: add a function to get the CONFIG_ prefix

2012-10-18 Thread Yann E. MORIN
Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means the CONFIG_ prefix is hard-coded at compile time. This goes against having a run-time defined CONFIG_ prefix. Add a function that returns the CONFIG_ prefix to use (but keep the current hard-coded behavior, to be changed in a