Files
u-boot/include
Masahiro Yamada b75d8dc564 treewide: convert bd_t to struct bd_info by coccinelle
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h>

  #include <asm/u-boot.h>
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  <smpl>
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  </smpl>

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-17 09:30:13 -04:00
..
2020-07-17 14:32:24 +08:00
2020-07-01 15:01:21 +08:00
2019-12-06 16:44:20 -05:00
2019-10-16 05:42:27 +02:00
2020-07-17 14:32:24 +08:00
2020-05-11 10:16:49 +05:30
2020-04-17 12:32:36 -04:00
2020-05-18 18:36:55 -04:00
2020-07-09 12:33:24 +08:00
2020-05-18 17:33:33 -04:00
2020-02-05 19:33:46 -07:00
2020-05-25 11:54:53 -04:00
2019-04-23 20:26:43 -06:00
2020-02-05 19:33:46 -07:00
2019-10-13 23:34:43 +02:00
2020-05-07 09:01:42 -04:00
2020-05-18 21:19:23 -04:00
2020-05-18 17:33:33 -04:00
2020-05-18 17:33:33 -04:00
2020-06-12 13:14:07 -04:00
2019-02-20 15:27:09 +08:00
2020-05-18 21:19:18 -04:00
2019-02-09 12:50:22 -07:00
2019-10-14 09:31:41 +02:00
2020-01-20 15:38:16 +01:00
2019-11-07 18:39:16 -05:00
2020-05-18 18:36:55 -04:00
2019-08-11 16:43:41 -04:00
2020-04-17 12:32:36 -04:00
2020-07-09 18:57:22 -06:00
2019-12-02 18:23:11 -05:00
2020-01-25 12:04:36 -05:00
2020-06-12 13:17:23 -04:00
2020-02-05 19:33:46 -07:00
2020-07-17 14:32:24 +08:00
2020-05-18 17:33:33 -04:00
2019-05-20 13:50:34 +02:00
2020-06-14 21:07:20 +02:00
2020-02-05 19:33:46 -07:00
2020-06-14 21:07:20 +02:00
2020-07-09 06:02:44 +02:00
2020-05-18 17:33:31 -04:00
2020-05-18 18:36:55 -04:00
2020-02-05 19:33:46 -07:00
2019-02-01 16:59:12 +01:00
2019-05-21 17:33:23 -06:00
2020-01-21 15:56:15 +01:00
2020-04-24 16:40:09 -04:00
2020-05-18 21:19:18 -04:00