* [PATCH] global_data.h: make <asm-generic/global_data.h> self-contained
@ 2020-02-24 17:22 Masahiro Yamada
2020-03-17 15:28 ` Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2020-02-24 17:22 UTC (permalink / raw)
To: u-boot
The compiler never knows what 'bd_t' is without including <asm/u-boot.h>.
By changing it to (struct bd_info), the compiler learns it is struct.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Maybe, we should replace 'bd_t' with 'struct bd_info' globally
by using coccinelle or something.
Linux coding style (Documentation/process/coding-style.rst)
apparently discourages typedef for cases like this.
include/asm-generic/global_data.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 5d027329fe..d9e220cfe3 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -25,7 +25,7 @@
#include <linux/list.h>
typedef struct global_data {
- bd_t *bd;
+ struct bd_info *bd;
unsigned long flags;
unsigned int baudrate;
unsigned long cpu_clk; /* CPU clock in Hz! */
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] global_data.h: make <asm-generic/global_data.h> self-contained
2020-02-24 17:22 [PATCH] global_data.h: make <asm-generic/global_data.h> self-contained Masahiro Yamada
@ 2020-03-17 15:28 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-03-17 15:28 UTC (permalink / raw)
To: u-boot
On Tue, Feb 25, 2020 at 02:22:27AM +0900, Masahiro Yamada wrote:
> The compiler never knows what 'bd_t' is without including <asm/u-boot.h>.
>
> By changing it to (struct bd_info), the compiler learns it is struct.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200317/29bb983c/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-17 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24 17:22 [PATCH] global_data.h: make <asm-generic/global_data.h> self-contained Masahiro Yamada
2020-03-17 15:28 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox