Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37182 )
Change subject: soc/nvidia/tegra: Remove duplicate macros ......................................................................
soc/nvidia/tegra: Remove duplicate macros
These macros are already defined in stdbool.h or commonlib/helpers.h
Change-Id: I6e474fc233d3134c89c29840471797b1e0c9e3c3 Signed-off-by: Jacob Garber jgarber1@ualberta.ca --- M src/soc/nvidia/tegra/types.h 1 file changed, 0 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/37182/1
diff --git a/src/soc/nvidia/tegra/types.h b/src/soc/nvidia/tegra/types.h index 9af4b20..0cbbd5d 100644 --- a/src/soc/nvidia/tegra/types.h +++ b/src/soc/nvidia/tegra/types.h @@ -26,29 +26,4 @@ #define IS_ERR_PTR(ptr) \ (ptr == (void *)-EPTR)
-#ifndef bool -#define bool int -#endif - -#ifndef false -#define false 0 -#endif - -#ifndef true -#define true 1 -#endif - -#ifndef container_of -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - * - */ -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) -#endif - #endif /* __TEGRA_MISC_TYPES_H__ */
HAOUAS Elyes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37182 )
Change subject: soc/nvidia/tegra: Remove duplicate macros ......................................................................
Patch Set 1: Code-Review+1
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37182 )
Change subject: soc/nvidia/tegra: Remove duplicate macros ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37182 )
Change subject: soc/nvidia/tegra: Remove duplicate macros ......................................................................
soc/nvidia/tegra: Remove duplicate macros
These macros are already defined in stdbool.h or commonlib/helpers.h
Change-Id: I6e474fc233d3134c89c29840471797b1e0c9e3c3 Signed-off-by: Jacob Garber jgarber1@ualberta.ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/37182 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Reviewed-by: Julius Werner jwerner@chromium.org --- M src/soc/nvidia/tegra/types.h 1 file changed, 0 insertions(+), 25 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, but someone else must approve Julius Werner: Looks good to me, approved
diff --git a/src/soc/nvidia/tegra/types.h b/src/soc/nvidia/tegra/types.h index 9af4b20..0cbbd5d 100644 --- a/src/soc/nvidia/tegra/types.h +++ b/src/soc/nvidia/tegra/types.h @@ -26,29 +26,4 @@ #define IS_ERR_PTR(ptr) \ (ptr == (void *)-EPTR)
-#ifndef bool -#define bool int -#endif - -#ifndef false -#define false 0 -#endif - -#ifndef true -#define true 1 -#endif - -#ifndef container_of -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - * - */ -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) -#endif - #endif /* __TEGRA_MISC_TYPES_H__ */