Re: [U-Boot] [PATCH 00/11] zap: Do not use macros that are equivalent to IS_ENABLED(CONFIG_...)
Hi Masahiro, On 19 December 2015 at 01:39, Masahiro Yamadawrote: > Hi Simon, > > > 2015-12-19 3:57 GMT+09:00 Simon Glass : > 6 files changed, 16 insertions(+), 70 deletions(-) >> >> I definitely agree it would be good to drop this. But does it work? I >> thought IS_ENABLED() only worked for Kconfig options? > > > Ah, I missed that. > > IS_ENABLED() only works with macros defined as 1. > > Most of include/configs/*.h define macros without values, > so this series does not work. > > I've marked it as Rejected. I suppose we need to convert them all to Kconfig. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/11] zap: Do not use macros that are equivalent to IS_ENABLED(CONFIG_...)
Hi Simon, 2015-12-19 3:57 GMT+09:00 Simon Glass: >>> 6 files changed, 16 insertions(+), 70 deletions(-) > > I definitely agree it would be good to drop this. But does it work? I > thought IS_ENABLED() only worked for Kconfig options? Ah, I missed that. IS_ENABLED() only works with macros defined as 1. Most of include/configs/*.h define macros without values, so this series does not work. I've marked it as Rejected. -- Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/11] zap: Do not use macros that are equivalent to IS_ENABLED(CONFIG_...)
Hi Masahiro, On 17 December 2015 at 20:23, Marek Vasutwrote: > On Friday, December 18, 2015 at 03:04:59 AM, Masahiro Yamada wrote: >> Please stop such coding habit as follows: >> >> #ifdef CONFIG_FOO >> # define ENABLE_FOO 1 >> #else >> # define ENABLE_FOO 0 >> #endif > > Oh yes, this is horrible, kill this with fire :) > >> Use IS_ENABLED(CONFIG_FOO), instead. >> >> >> >> Masahiro Yamada (11): >> image: zap IMAGE_ENABLE_RAMDISK_HIGH >> image: zap IMAGE_ENABLE_OF_LIBFDT >> image: zap IMAGE_BOOT_GET_CMDLINE >> image: zap IMAGE_OF_BOARD_SETUP >> image: zap IMAGE_OF_SYSTEM_SETUP >> ARM: bootm: BOOTM_ENABLE_SERIAL_TAG >> ARM: bootm: BOOTM_ENABLE_CMDLINE_TAG >> ARM: bootm: BOOTM_ENABLE_REVISION_TAG >> ARM: bootm: BOOTM_ENABLE_MEMORY_TAG >> ARM: bootm: BOOTM_ENABLE_INITRD_TAG >> ARM: bootm: drop redundant #ifdef conditional >> >> arch/arc/lib/bootm.c | 2 +- >> arch/arm/include/asm/bootm.h | 22 -- >> arch/arm/lib/bootm.c | 16 +++- >> common/image-fdt.c | 6 +++--- >> common/image.c | 10 +- >> include/image.h | 30 -- >> 6 files changed, 16 insertions(+), 70 deletions(-) I definitely agree it would be good to drop this. But does it work? I thought IS_ENABLED() only worked for Kconfig options? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/11] zap: Do not use macros that are equivalent to IS_ENABLED(CONFIG_...)
On Friday, December 18, 2015 at 03:04:59 AM, Masahiro Yamada wrote: > Please stop such coding habit as follows: > > #ifdef CONFIG_FOO > # define ENABLE_FOO 1 > #else > # define ENABLE_FOO 0 > #endif Oh yes, this is horrible, kill this with fire :) > Use IS_ENABLED(CONFIG_FOO), instead. > > > > Masahiro Yamada (11): > image: zap IMAGE_ENABLE_RAMDISK_HIGH > image: zap IMAGE_ENABLE_OF_LIBFDT > image: zap IMAGE_BOOT_GET_CMDLINE > image: zap IMAGE_OF_BOARD_SETUP > image: zap IMAGE_OF_SYSTEM_SETUP > ARM: bootm: BOOTM_ENABLE_SERIAL_TAG > ARM: bootm: BOOTM_ENABLE_CMDLINE_TAG > ARM: bootm: BOOTM_ENABLE_REVISION_TAG > ARM: bootm: BOOTM_ENABLE_MEMORY_TAG > ARM: bootm: BOOTM_ENABLE_INITRD_TAG > ARM: bootm: drop redundant #ifdef conditional > > arch/arc/lib/bootm.c | 2 +- > arch/arm/include/asm/bootm.h | 22 -- > arch/arm/lib/bootm.c | 16 +++- > common/image-fdt.c | 6 +++--- > common/image.c | 10 +- > include/image.h | 30 -- > 6 files changed, 16 insertions(+), 70 deletions(-) Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 00/11] zap: Do not use macros that are equivalent to IS_ENABLED(CONFIG_...)
Please stop such coding habit as follows: #ifdef CONFIG_FOO # define ENABLE_FOO 1 #else # define ENABLE_FOO 0 #endif Use IS_ENABLED(CONFIG_FOO), instead. Masahiro Yamada (11): image: zap IMAGE_ENABLE_RAMDISK_HIGH image: zap IMAGE_ENABLE_OF_LIBFDT image: zap IMAGE_BOOT_GET_CMDLINE image: zap IMAGE_OF_BOARD_SETUP image: zap IMAGE_OF_SYSTEM_SETUP ARM: bootm: BOOTM_ENABLE_SERIAL_TAG ARM: bootm: BOOTM_ENABLE_CMDLINE_TAG ARM: bootm: BOOTM_ENABLE_REVISION_TAG ARM: bootm: BOOTM_ENABLE_MEMORY_TAG ARM: bootm: BOOTM_ENABLE_INITRD_TAG ARM: bootm: drop redundant #ifdef conditional arch/arc/lib/bootm.c | 2 +- arch/arm/include/asm/bootm.h | 22 -- arch/arm/lib/bootm.c | 16 +++- common/image-fdt.c | 6 +++--- common/image.c | 10 +- include/image.h | 30 -- 6 files changed, 16 insertions(+), 70 deletions(-) -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot