u-boot/common
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
..
eeprom SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
init common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
spl treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
android_ab.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
autoboot.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
avb_verify.c common: Move ARM cache operations out of common.h 2019-12-02 18:24:58 -05:00
bedbug.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
bloblist.c bloblist: Zero records when adding 2020-02-05 19:33:46 -07:00
board_f.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
board_info.c common: Drop init.h from common header 2020-05-18 17:33:33 -04:00
board_r.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
boot_fit.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootm.c common: bootm: add checks to verify if ramdisk / fdtimage overlaps OS image 2020-07-17 08:51:01 -04:00
bootm_os.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
bootretry.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
bootstage.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bouncebuf.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cli.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cli_hush.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cli_readline.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
cli_simple.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
command.c command: Drop #ifdef for MEM_SUPPORT_64BIT_DATA 2020-07-08 17:21:46 -04:00
common_fit.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
console.c console: Add a way to output to serial only 2020-07-09 12:33:24 +08:00
cros_ec.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ddr_spd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dfu.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dlmalloc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dlmalloc.src Consolidate bool type 2013-04-01 16:33:52 -04:00
edid.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
exports.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
fdt_region.c common: Drop image.h from common header 2020-05-18 17:33:33 -04:00
fdt_support.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
hash.c common: hash: Remove a debug printf statement 2020-06-16 11:36:30 -04:00
hwconfig.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
image-android-dt.c common: image-android-dt: Fix logic in print fdt info routine 2019-08-07 15:31:05 -04:00
image-android.c image: android: fix abootimg support 2020-06-02 13:06:12 -04:00
image-cipher.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
image-fdt.c image: fdt: bail out with error if no boot time FDT image found 2020-07-17 08:51:01 -04:00
image-fit-sig.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
image-fit.c Add support for SHA384 and SHA512 2020-06-12 13:14:07 -04:00
image-sig.c Add support for SHA384 and SHA512 2020-06-12 13:14:07 -04:00
image.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
iomux.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
iotrace.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
kallsyms.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
Kconfig log: don't show function by default 2020-07-09 18:57:22 -06:00
kgdb.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
kgdb_stubs.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
lcd.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
lcd_console.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
lcd_console_rotation.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
lcd_simplefb.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
log.c log: don't show function by default 2020-07-09 18:57:22 -06:00
log_console.c log: use BIT() instead of 1 << 2020-07-09 18:57:22 -06:00
log_syslog.c log: use BIT() instead of 1 << 2020-07-09 18:57:22 -06:00
lynxkdi.c Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR 2018-04-27 14:54:48 -04:00
main.c common: Drop bootstage.h from common header 2020-05-18 17:33:33 -04:00
Makefile fdt_region: move fdt_region.c to common/ from lib/libfdt/ 2020-04-26 14:23:55 -06:00
malloc_simple.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
memsize.c common: Move RAM-sizing functions to init.h 2020-01-24 23:06:49 +05:30
menu.c menu: add support for client defined statusline function 2020-05-07 09:01:42 -04:00
miiphyutil.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
s_record.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
splash.c splash: Fix build warning on 64 bits CPU 2020-06-28 01:03:09 +02:00
splash_source.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
stdio.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
system_map.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
update.c common: Move the image globals into image.h 2020-01-24 23:06:49 +05:30
usb.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
usb_hub.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
usb_kbd.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
usb_storage.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xyzModem.c spl: Allow tiny printf() to be controlled in SPL and TPL 2019-10-08 13:57:45 +08:00