u-boot/arch/x86/lib
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
..
fsp x86: Rename board_final_cleanup() to board_final_init() 2020-07-17 14:32:24 +08:00
fsp1 x86: Avoid #ifdef with CONFIG_HAVE_ACPI_RESUME 2020-07-17 14:32:24 +08:00
fsp2 x86: apl: Use memory-mapped access for VBT 2020-07-17 14:32:24 +08:00
acpi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
acpi_nhlt.c x86: Add support for building up an NHLT structure 2020-07-17 14:32:24 +08:00
acpi_s3.c x86: Move acpi_table header to main include/ directory 2020-04-16 14:36:28 +08:00
acpi_table.c x86: acpi: Correct the version of the MADT 2020-07-17 14:32:24 +08:00
asm-offsets.c x86: Add new slimbootloader CPU type 2019-08-09 22:24:02 +08:00
bios.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bios.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bios_asm.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bios_interrupts.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootm.c treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
cmd_boot.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
coreboot_table.c x86: Avoid #ifdef with CONFIG_HAVE_ACPI_RESUME 2020-07-17 14:32:24 +08:00
crt0_ia32_efi.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
crt0_x86_64_efi.S x86: Remove unused _relocate arguments 2018-07-19 16:31:36 -04:00
div64.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
e820.c efi_loader: round the memory area in efi_add_memory_map() 2020-05-17 21:59:53 +02:00
early_cmos.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
elf_ia32_efi.lds x86: Include bss subsections in linker script 2018-08-20 14:17:43 +02:00
elf_x86_64_efi.lds x86: Include bss subsections in linker script 2018-08-20 14:17:43 +02:00
hob.c x86: fsp: Tidy up comment style a little 2019-10-08 13:53:54 +08:00
i8254.c x86: Make sure i8254 is setup correctly before generating beeps 2019-03-11 22:55:01 +08:00
i8259.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
init_helpers.c x86: cpu: Skip init code when chain loading 2020-04-30 17:40:16 +08:00
interrupts.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
lpc-uclass.c x86: Allow the PCH and LPC uclasses to work with of-platdata 2019-10-08 13:57:48 +08:00
Makefile x86: Add support for building up an NHLT structure 2020-07-17 14:32:24 +08:00
mpspec.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mrccache.c x86: mrccache: Allow use before driver model is active 2020-06-02 09:16:13 +08:00
northbridge-uclass.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
physmem.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pinctrl_ich6.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pirq_routing.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pmu.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ramtest.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
reloc_ia32_efi.c elf: Move x86 reloc defines to common elf.h 2018-07-25 14:57:43 +02:00
reloc_x86_64_efi.c elf: Move x86 reloc defines to common elf.h 2018-07-25 14:57:43 +02:00
relocate.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
scu.c common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sections.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sfi.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl.c x86: spl: Print the error on SPL failure 2020-06-02 09:16:13 +08:00
string.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tables.c x86: Add debugging to table writing 2020-07-17 14:32:24 +08:00
tpl.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
zimage.c x86: Drop setup_pcat_compatibility() 2020-07-17 14:32:24 +08:00