Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Dear Anatolij Gustschin, > Hello Wolfgang, > > On Fri, 10 Aug 2012 22:45:54 +0200 > Wolfgang Denk wrote: > ... > > > > applied to my staging branch, thanks! > > > > Please undo. This patch does not meet formal requirements. It > > contains code copied from Linux without sufficient attribution. > > OK, dropped for now. This series also needs more build-testing, it seems. Yes, and I'll also fix the request from Mike while at that. I won't be resubmitting it tonight as the build tests will take a bit more time. > Thanks, > Anatolij Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Hello Wolfgang, On Fri, 10 Aug 2012 22:45:54 +0200 Wolfgang Denk wrote: ... > > applied to my staging branch, thanks! > > Please undo. This patch does not meet formal requirements. It > contains code copied from Linux without sufficient attribution. OK, dropped for now. This series also needs more build-testing, it seems. Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Dear Wolfgang Denk, > Dear Anatolij Gustschin, > > In message <20120810222104.1e6c4afc@wker> you wrote: > > Hi, > > > > On Wed, 8 Aug 2012 12:52:17 +0200 > > > > Marek Vasut wrote: > > > This function converts static number to string in preprocessor. > > > This is useful as it allows higher usage of puts() in favour of > > > printf() > > > > > > Signed-off-by: Marek Vasut > > > Cc: Wolfgang Denk > > > --- > > > > > > include/common.h |1 + > > > include/linux/stringify.h | 12 > > > 2 files changed, 13 insertions(+) > > > create mode 100644 include/linux/stringify.h > > > > applied to my staging branch, thanks! > > Please undo. This patch does not meet formal requirements. It > contains code copied from Linux without sufficient attribution. Definitelly agree with this one ... I should be more careful with this. V2 submitted. > Best regards, > > Wolfgang Denk Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Dear Anatolij Gustschin, In message <20120810222104.1e6c4afc@wker> you wrote: > Hi, > > On Wed, 8 Aug 2012 12:52:17 +0200 > Marek Vasut wrote: > > > This function converts static number to string in preprocessor. > > This is useful as it allows higher usage of puts() in favour of printf() > > > > Signed-off-by: Marek Vasut > > Cc: Wolfgang Denk > > --- > > include/common.h |1 + > > include/linux/stringify.h | 12 > > 2 files changed, 13 insertions(+) > > create mode 100644 include/linux/stringify.h > > applied to my staging branch, thanks! Please undo. This patch does not meet formal requirements. It contains code copied from Linux without sufficient attribution. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Even if you can deceive people about a product through misleading statements, sooner or later the product will speak for itself. - Hajime Karatsu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Hi, On Wed, 8 Aug 2012 12:52:17 +0200 Marek Vasut wrote: > This function converts static number to string in preprocessor. > This is useful as it allows higher usage of puts() in favour of printf() > > Signed-off-by: Marek Vasut > Cc: Wolfgang Denk > --- > include/common.h |1 + > include/linux/stringify.h | 12 > 2 files changed, 13 insertions(+) > create mode 100644 include/linux/stringify.h applied to my staging branch, thanks! Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
On Wednesday 08 August 2012 12:01:07 Marek Vasut wrote: > Dear Mike Frysinger, > > On Wednesday 08 August 2012 06:52:17 Marek Vasut wrote: > > > This function converts static number to string in preprocessor. > > > This is useful as it allows higher usage of puts() in favour of > > > printf() > > > > a few more to convert: > > include/nios2.h:#define _str_(x) #x > > include/configs/astro_mcf5373l.h:#define _QUOTEME(x)#x > > include/configs/tegra2-common.h:#define QUOTE_(m) #m > > board/logicpd/zoom2/zoom2_serial.h:#define S(a) #a > > > > not sure if we also want to clean up (in case they're copied from Linux > > -- then we'd prob just leave these headers alone, but fix any usage > > outside of the headers to use your new stringify): > > arch/mips/include/asm/mipsregs.h:#define __STR(x) #x > > arch/powerpc/include/asm/processor.h:#define tostring(s)#s > > Ok, I'll send a subsequent patch for these ... what about merging these now > tho? fine by me -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Dear Mike Frysinger, > On Wednesday 08 August 2012 06:52:17 Marek Vasut wrote: > > This function converts static number to string in preprocessor. > > This is useful as it allows higher usage of puts() in favour of printf() > > a few more to convert: > include/nios2.h:#define _str_(x) #x > include/configs/astro_mcf5373l.h:#define _QUOTEME(x)#x > include/configs/tegra2-common.h:#define QUOTE_(m) #m > board/logicpd/zoom2/zoom2_serial.h:#define S(a) #a > > not sure if we also want to clean up (in case they're copied from Linux -- > then we'd prob just leave these headers alone, but fix any usage outside of > the headers to use your new stringify): > arch/mips/include/asm/mipsregs.h:#define __STR(x) #x > arch/powerpc/include/asm/processor.h:#define tostring(s)#s > -mike Ok, I'll send a subsequent patch for these ... what about merging these now tho? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
On Wednesday 08 August 2012 06:52:17 Marek Vasut wrote: > This function converts static number to string in preprocessor. > This is useful as it allows higher usage of puts() in favour of printf() a few more to convert: include/nios2.h:#define _str_(x) #x include/configs/astro_mcf5373l.h:#define _QUOTEME(x)#x include/configs/tegra2-common.h:#define QUOTE_(m) #m board/logicpd/zoom2/zoom2_serial.h:#define S(a) #a not sure if we also want to clean up (in case they're copied from Linux -- then we'd prob just leave these headers alone, but fix any usage outside of the headers to use your new stringify): arch/mips/include/asm/mipsregs.h:#define __STR(x) #x arch/powerpc/include/asm/processor.h:#define tostring(s)#s -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
Acked-by: Mike Frysinger -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] COMMON: Add __stringify() function
This function converts static number to string in preprocessor. This is useful as it allows higher usage of puts() in favour of printf() Signed-off-by: Marek Vasut Cc: Wolfgang Denk --- include/common.h |1 + include/linux/stringify.h | 12 2 files changed, 13 insertions(+) create mode 100644 include/linux/stringify.h diff --git a/include/common.h b/include/common.h index 39859d3..8f596ec 100644 --- a/include/common.h +++ b/include/common.h @@ -39,6 +39,7 @@ typedef volatile unsigned charvu_char; #include #include #include +#include #include #include #if defined(CONFIG_PCI) && (defined(CONFIG_4xx) && !defined(CONFIG_AP1000)) diff --git a/include/linux/stringify.h b/include/linux/stringify.h new file mode 100644 index 000..841cec8 --- /dev/null +++ b/include/linux/stringify.h @@ -0,0 +1,12 @@ +#ifndef __LINUX_STRINGIFY_H +#define __LINUX_STRINGIFY_H + +/* Indirect stringification. Doing two levels allows the parameter to be a + * macro itself. For example, compile with -DFOO=bar, __stringify(FOO) + * converts to "bar". + */ + +#define __stringify_1(x...)#x +#define __stringify(x...) __stringify_1(x) + +#endif /* !__LINUX_STRINGIFY_H */ -- 1.7.10.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot