public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH] global_data.h: make <asm-generic/global_data.h> self-contained
Date: Tue, 25 Feb 2020 02:22:27 +0900	[thread overview]
Message-ID: <20200224172227.13302-1-masahiroy@kernel.org> (raw)

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

             reply	other threads:[~2020-02-24 17:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 17:22 Masahiro Yamada [this message]
2020-03-17 15:28 ` [PATCH] global_data.h: make <asm-generic/global_data.h> self-contained Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200224172227.13302-1-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox