treewide: convert bd_t to struct bd_info by coccinelle
authorMasahiro Yamada <masahiroy@kernel.org>
Fri, 26 Jun 2020 06:13:33 +0000 (15:13 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 17 Jul 2020 13:30:13 +0000 (09:30 -0400)
commitb75d8dc5642b71eb029e7cd38031a32029e736cc
treee13a2c309a27c528a79f7c49b468c0c2d246a499
parent02ff91e8c60f1f48bee8f4bd1c87ea0892cc5dae
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>
489 files changed:
arch/arm/cpu/arm1136/mx35/generic.c
arch/arm/cpu/arm926ejs/mx25/generic.c
arch/arm/cpu/arm926ejs/mx27/generic.c
arch/arm/cpu/arm926ejs/mxs/mxs.c
arch/arm/cpu/arm926ejs/mxs/spl_boot.c
arch/arm/cpu/armv7/ls102xa/cpu.c
arch/arm/cpu/armv7/ls102xa/fdt.c
arch/arm/cpu/armv7/vf610/generic.c
arch/arm/cpu/armv8/fsl-layerscape/cpu.c
arch/arm/cpu/armv8/fsl-layerscape/fdt.c
arch/arm/cpu/armv8/s32v234/generic.c
arch/arm/include/asm/arch-mx27/mxcmmc.h
arch/arm/include/asm/arch-mx31/sys_proto.h
arch/arm/include/asm/arch-mx6/litesom.h
arch/arm/include/asm/arch-mxs/sys_proto.h
arch/arm/lib/bdinfo.c
arch/arm/lib/bootm-fdt.c
arch/arm/lib/bootm.c
arch/arm/lib/cache-cp15.c
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/imx8/ahab.c
arch/arm/mach-imx/imx8/fdt.c
arch/arm/mach-imx/imx8m/soc.c
arch/arm/mach-imx/mx6/litesom.c
arch/arm/mach-imx/mx6/module_fuse.c
arch/arm/mach-kirkwood/cpu.c
arch/arm/mach-lpc32xx/cpu.c
arch/arm/mach-meson/board-common.c
arch/arm/mach-mvebu/cpu.c
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/am33xx/fdt.c
arch/arm/mach-omap2/fdt-common.c
arch/arm/mach-omap2/omap-cache.c
arch/arm/mach-omap2/omap3/emac.c
arch/arm/mach-omap2/omap5/fdt.c
arch/arm/mach-orion5x/cpu.c
arch/arm/mach-rmobile/emac.c
arch/arm/mach-stm32mp/fdt.c
arch/arm/mach-tegra/dt-setup.c
arch/arm/mach-uniphier/fdt-fixup.c
arch/m68k/cpu/mcf523x/cpu.c
arch/m68k/cpu/mcf52x2/cpu.c
arch/m68k/cpu/mcf532x/cpu.c
arch/m68k/cpu/mcf5445x/cpu.c
arch/m68k/cpu/mcf547x_8x/cpu.c
arch/m68k/lib/bdinfo.c
arch/m68k/lib/bootm.c
arch/nds32/lib/bootm.c
arch/powerpc/cpu/mpc83xx/cpu.c
arch/powerpc/cpu/mpc83xx/fdt.c
arch/powerpc/cpu/mpc83xx/interrupts.c
arch/powerpc/cpu/mpc83xx/pci.c
arch/powerpc/cpu/mpc85xx/cpu.c
arch/powerpc/cpu/mpc85xx/ether_fcc.c
arch/powerpc/cpu/mpc85xx/fdt.c
arch/powerpc/cpu/mpc86xx/fdt.c
arch/powerpc/cpu/mpc8xx/cpu.c
arch/powerpc/cpu/mpc8xx/fdt.c
arch/powerpc/cpu/mpc8xxx/cpu.c
arch/powerpc/lib/bdinfo.c
arch/powerpc/lib/bootm.c
arch/sh/cpu/sh4/cpu.c
arch/x86/lib/bootm.c
board/AndesTech/adp-ae3xx/adp-ae3xx.c
board/AndesTech/adp-ag101p/adp-ag101p.c
board/AndesTech/ax25-ae350/ax25-ae350.c
board/Arcturus/ucp1020/spl.c
board/Arcturus/ucp1020/ucp1020.c
board/BuR/common/bur_common.h
board/BuR/common/common.c
board/CZ.NIC/turris_mox/turris_mox.c
board/CarMediaLab/flea3/flea3.c
board/Marvell/db-88f6720/db-88f6720.c
board/Marvell/db-88f6820-amc/db-88f6820-amc.c
board/Marvell/db-88f6820-gp/db-88f6820-gp.c
board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c
board/Marvell/gplugd/gplugd.c
board/abilis/tb100/tb100.c
board/advantech/dms-ba16/dms-ba16.c
board/advantech/imx8qm_rom7720_a1/spl.c
board/amazon/kc1/kc1.c
board/armltd/integrator/integrator.c
board/armltd/vexpress/vexpress_common.c
board/armltd/vexpress/vexpress_tc2.c
board/armltd/vexpress64/vexpress64.c
board/atmel/at91rm9200ek/at91rm9200ek.c
board/atmel/at91sam9261ek/at91sam9261ek.c
board/atmel/at91sam9n12ek/at91sam9n12ek.c
board/bachmann/ot1200/ot1200.c
board/barco/platinum/platinum.c
board/barco/titanium/titanium.c
board/bluegiga/apx4devkit/apx4devkit.c
board/bluewater/gurnard/gurnard.c
board/bluewater/snapper9260/snapper9260.c
board/bosch/shc/board.c
board/boundary/nitrogen6x/nitrogen6x.c
board/broadcom/bcm23550_w1d/bcm23550_w1d.c
board/broadcom/bcm28155_ap/bcm28155_ap.c
board/broadcom/bcm_ep/board.c
board/calao/usb_a9263/usb_a9263.c
board/cavium/thunderx/thunderx.c
board/ccv/xpress/xpress.c
board/cirrus/edb93xx/edb93xx.c
board/compulab/cl-som-imx7/cl-som-imx7.c
board/compulab/cl-som-imx7/spl.c
board/compulab/cm_fx6/cm_fx6.c
board/compulab/cm_fx6/spl.c
board/compulab/cm_t335/cm_t335.c
board/compulab/cm_t43/cm_t43.c
board/congatec/cgtqmx6eval/cgtqmx6eval.c
board/corscience/tricorder/tricorder.c
board/creative/xfi3/xfi3.c
board/cssi/MCR3000/MCR3000.c
board/davinci/da8xxevm/da850evm.c
board/davinci/da8xxevm/omapl138_lcdk.c
board/dhelectronics/dh_imx6/dh_imx6_spl.c
board/dhelectronics/dh_stm32mp1/board.c
board/egnite/ethernut5/ethernut5.c
board/el/el6x/el6x.c
board/embest/mx6boards/mx6boards.c
board/esd/meesc/meesc.c
board/esd/vme8349/vme8349.c
board/freescale/common/cds_pci_ft.c
board/freescale/common/p_corenet/pci.c
board/freescale/corenet_ds/corenet_ds.c
board/freescale/corenet_ds/corenet_ds.h
board/freescale/corenet_ds/eth_hydra.c
board/freescale/corenet_ds/eth_p4080.c
board/freescale/corenet_ds/eth_superhydra.c
board/freescale/imx8mq_evk/spl.c
board/freescale/imx8qm_mek/imx8qm_mek.c
board/freescale/imx8qxp_mek/imx8qxp_mek.c
board/freescale/ls1012afrdm/ls1012afrdm.c
board/freescale/ls1012aqds/ls1012aqds.c
board/freescale/ls1012ardb/ls1012ardb.c
board/freescale/ls1021aiot/ls1021aiot.c
board/freescale/ls1021aqds/eth.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1021atsn/ls1021atsn.c
board/freescale/ls1021atwr/ls1021atwr.c
board/freescale/ls1028a/ls1028a.c
board/freescale/ls1043aqds/eth.c
board/freescale/ls1043aqds/ls1043aqds.c
board/freescale/ls1043ardb/eth.c
board/freescale/ls1043ardb/ls1043ardb.c
board/freescale/ls1046afrwy/eth.c
board/freescale/ls1046afrwy/ls1046afrwy.c
board/freescale/ls1046aqds/eth.c
board/freescale/ls1046aqds/ls1046aqds.c
board/freescale/ls1046ardb/eth.c
board/freescale/ls1046ardb/ls1046ardb.c
board/freescale/ls1088a/eth_ls1088aqds.c
board/freescale/ls1088a/eth_ls1088ardb.c
board/freescale/ls1088a/ls1088a.c
board/freescale/ls2080a/ls2080a.c
board/freescale/ls2080aqds/eth.c
board/freescale/ls2080aqds/ls2080aqds.c
board/freescale/ls2080ardb/eth_ls2080rdb.c
board/freescale/ls2080ardb/ls2080ardb.c
board/freescale/lx2160a/eth_lx2160aqds.c
board/freescale/lx2160a/eth_lx2160ardb.c
board/freescale/lx2160a/lx2160a.c
board/freescale/m5253demo/m5253demo.c
board/freescale/mpc8308rdb/mpc8308rdb.c
board/freescale/mpc8313erdb/mpc8313erdb.c
board/freescale/mpc8315erdb/mpc8315erdb.c
board/freescale/mpc8323erdb/mpc8323erdb.c
board/freescale/mpc832xemds/mpc832xemds.c
board/freescale/mpc8349emds/mpc8349emds.c
board/freescale/mpc8349itx/mpc8349itx.c
board/freescale/mpc837xemds/mpc837xemds.c
board/freescale/mpc837xemds/pci.c
board/freescale/mpc837xemds/pci.h
board/freescale/mpc837xerdb/mpc837xerdb.c
board/freescale/mpc8541cds/mpc8541cds.c
board/freescale/mpc8544ds/mpc8544ds.c
board/freescale/mpc8548cds/mpc8548cds.c
board/freescale/mpc8555cds/mpc8555cds.c
board/freescale/mpc8568mds/mpc8568mds.c
board/freescale/mpc8569mds/mpc8569mds.c
board/freescale/mpc8572ds/mpc8572ds.c
board/freescale/mpc8610hpcd/mpc8610hpcd.c
board/freescale/mpc8641hpcn/mpc8641hpcn.c
board/freescale/mx23evk/mx23evk.c
board/freescale/mx25pdk/mx25pdk.c
board/freescale/mx28evk/mx28evk.c
board/freescale/mx35pdk/mx35pdk.c
board/freescale/mx51evk/mx51evk.c
board/freescale/mx53ard/mx53ard.c
board/freescale/mx53evk/mx53evk.c
board/freescale/mx53loco/mx53loco.c
board/freescale/mx53smd/mx53smd.c
board/freescale/mx6qarm2/mx6qarm2.c
board/freescale/mx6sabreauto/mx6sabreauto.c
board/freescale/mx6sabresd/mx6sabresd.c
board/freescale/mx6slevk/mx6slevk.c
board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
board/freescale/mx6sxsabresd/mx6sxsabresd.c
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
board/freescale/mx7ulp_evk/mx7ulp_evk.c
board/freescale/p1010rdb/p1010rdb.c
board/freescale/p1010rdb/spl.c
board/freescale/p1023rdb/p1023rdb.c
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
board/freescale/p1_p2_rdb_pc/spl.c
board/freescale/p2041rdb/eth.c
board/freescale/p2041rdb/p2041rdb.c
board/freescale/qemu-ppce500/qemu-ppce500.c
board/freescale/s32v234evb/s32v234evb.c
board/freescale/t102xrdb/eth_t102xrdb.c
board/freescale/t102xrdb/pci.c
board/freescale/t102xrdb/spl.c
board/freescale/t102xrdb/t102xrdb.c
board/freescale/t102xrdb/t102xrdb.h
board/freescale/t104xrdb/eth.c
board/freescale/t104xrdb/pci.c
board/freescale/t104xrdb/spl.c
board/freescale/t104xrdb/t104xrdb.c
board/freescale/t104xrdb/t104xrdb.h
board/freescale/t208xqds/eth_t208xqds.c
board/freescale/t208xqds/pci.c
board/freescale/t208xqds/spl.c
board/freescale/t208xqds/t208xqds.c
board/freescale/t208xqds/t208xqds.h
board/freescale/t208xrdb/eth_t208xrdb.c
board/freescale/t208xrdb/pci.c
board/freescale/t208xrdb/spl.c
board/freescale/t208xrdb/t208xrdb.c
board/freescale/t208xrdb/t208xrdb.h
board/freescale/t4rdb/eth.c
board/freescale/t4rdb/pci.c
board/freescale/t4rdb/spl.c
board/freescale/t4rdb/t4240rdb.c
board/freescale/t4rdb/t4rdb.h
board/freescale/vf610twr/vf610twr.c
board/gateworks/gw_ventana/common.c
board/gateworks/gw_ventana/gw_ventana.c
board/gdsys/mpc8308/gazerbeam.c
board/gdsys/mpc8308/hrcon.c
board/gdsys/mpc8308/strider.c
board/gdsys/p1022/controlcenterd.c
board/ge/bx50v3/bx50v3.c
board/ge/mx53ppd/mx53ppd.c
board/google/imx8mq_phanbell/spl.c
board/grinn/liteboard/board.c
board/highbank/highbank.c
board/hisilicon/hikey/hikey.c
board/ids/ids8313/ids8313.c
board/imgtec/boston/dt.c
board/imgtec/ci20/ci20.c
board/imgtec/malta/malta.c
board/inversepath/usbarmory/usbarmory.c
board/isee/igep003x/board.c
board/isee/igep00x0/common.c
board/isee/igep00x0/igep00x0.c
board/keymile/common/common.c
board/keymile/km83xx/km83xx.c
board/keymile/kmp204x/eth.c
board/keymile/kmp204x/kmp204x.c
board/keymile/kmp204x/kmp204x.h
board/keymile/kmp204x/pci.c
board/kmc/kzm9g/kzm9g.c
board/kobol/helios4/helios4.c
board/kosagi/novena/novena_spl.c
board/l+g/vinco/vinco.c
board/laird/wb45n/wb45n.c
board/laird/wb50n/wb50n.c
board/lg/sniper/sniper.c
board/liebherr/display5/display5.c
board/liebherr/display5/spl.c
board/liebherr/mccmon6/spl.c
board/liebherr/xea/xea.c
board/logicpd/am3517evm/am3517evm.c
board/menlo/m53menlo/m53menlo.c
board/mini-box/picosam9g45/picosam9g45.c
board/mpc8308_p1m/mpc8308_p1m.c
board/nokia/rx51/rx51.c
board/nvidia/p2371-2180/p2371-2180.c
board/nvidia/p2771-0000/p2771-0000.c
board/nvidia/p3450-0000/p3450-0000.c
board/olimex/mx23_olinuxino/mx23_olinuxino.c
board/phytec/pcl063/spl.c
board/phytec/pfla02/pfla02.c
board/phytec/phycore_am335x_r2/board.c
board/ppcag/bg0900/bg0900.c
board/qemu-mips/qemu-mips.c
board/qualcomm/dragonboard410c/dragonboard410c.c
board/raspberrypi/rpi/rpi.c
board/renesas/MigoR/migo_r.c
board/renesas/blanche/blanche.c
board/renesas/r2dplus/r2dplus.c
board/renesas/r7780mp/r7780mp.c
board/renesas/rcar-common/common.c
board/renesas/sh7752evb/sh7752evb.c
board/renesas/sh7753evb/sh7753evb.c
board/renesas/sh7757lcr/sh7757lcr.c
board/ronetix/pm9261/pm9261.c
board/ronetix/pm9263/pm9263.c
board/ronetix/pm9g45/pm9g45.c
board/samsung/arndale/arndale.c
board/samsung/common/board.c
board/samsung/goni/goni.c
board/samsung/smdkc100/smdkc100.c
board/samsung/smdkv310/smdkv310.c
board/sandbox/sandbox.c
board/sandisk/sansa_fuze_plus/sfp.c
board/sbc8349/sbc8349.c
board/sbc8548/sbc8548.c
board/sbc8641d/sbc8641d.c
board/schulercontrol/sc_sps_1/sc_sps_1.c
board/seco/mx6quq7/mx6quq7.c
board/siemens/capricorn/board.c
board/siemens/corvus/board.c
board/siemens/draco/board.c
board/siemens/pxm2/board.c
board/siemens/rut/board.c
board/siemens/smartweb/smartweb.c
board/siemens/taurus/taurus.c
board/sks-kinkel/sksimx6/sksimx6.c
board/socrates/socrates.c
board/softing/vining_2000/vining_2000.c
board/solidrun/clearfog/clearfog.c
board/spear/spear300/spear300.c
board/spear/spear310/spear310.c
board/spear/spear320/spear320.c
board/spear/spear600/spear600.c
board/spear/x600/x600.c
board/st/stm32mp1/stm32mp1.c
board/st/stv0991/stv0991.c
board/sunxi/board.c
board/tcl/sl50/board.c
board/technexion/pico-imx6/pico-imx6.c
board/technexion/pico-imx6/spl.c
board/technexion/pico-imx6ul/pico-imx6ul.c
board/technexion/pico-imx6ul/spl.c
board/technexion/pico-imx7d/spl.c
board/technexion/pico-imx8mq/spl.c
board/technexion/tao3530/tao3530.c
board/technologic/ts4600/ts4600.c
board/technologic/ts4800/ts4800.c
board/theadorable/theadorable.c
board/ti/am335x/board.c
board/ti/am3517crane/am3517crane.c
board/ti/am43xx/board.c
board/ti/am57xx/board.c
board/ti/am65x/evm.c
board/ti/beagle/beagle.c
board/ti/dra7xx/evm.c
board/ti/evm/evm.c
board/ti/j721e/evm.c
board/ti/ks2_evm/board.c
board/ti/ks2_evm/board_k2g.c
board/ti/omap5_uevm/evm.c
board/ti/panda/panda.c
board/ti/sdp4430/sdp.c
board/ti/ti816x/evm.c
board/timll/devkit8000/devkit8000.c
board/toradex/apalis-imx8/apalis-imx8.c
board/toradex/apalis-tk1/apalis-tk1.c
board/toradex/apalis_imx6/apalis_imx6.c
board/toradex/apalis_t30/apalis_t30.c
board/toradex/colibri-imx6ull/colibri-imx6ull.c
board/toradex/colibri-imx8x/colibri-imx8x.c
board/toradex/colibri_imx6/colibri_imx6.c
board/toradex/colibri_imx7/colibri_imx7.c
board/toradex/colibri_pxa270/colibri_pxa270.c
board/toradex/colibri_t20/colibri_t20.c
board/toradex/colibri_t30/colibri_t30.c
board/toradex/colibri_vf/colibri_vf.c
board/toradex/common/tdx-common.c
board/toradex/common/tdx-common.h
board/toradex/verdin-imx8mm/verdin-imx8mm.c
board/tqc/tqm834x/tqm834x.c
board/tqc/tqma6/tqma6.c
board/tqc/tqma6/tqma6_bb.h
board/tqc/tqma6/tqma6_mba6.c
board/tqc/tqma6/tqma6_wru4.c
board/udoo/neo/neo.c
board/udoo/udoo.c
board/variscite/dart_6ul/dart_6ul.c
board/variscite/dart_6ul/spl.c
board/varisys/cyrus/cyrus.c
board/varisys/cyrus/cyrus.h
board/varisys/cyrus/eth.c
board/varisys/cyrus/pci.c
board/ve8313/ve8313.c
board/vscom/baltos/board.c
board/wandboard/spl.c
board/warp/warp.c
board/warp7/warp7.c
board/xes/common/fsl_8xxx_pci.c
board/xes/xpedite517x/xpedite517x.c
board/xes/xpedite520x/xpedite520x.c
board/xes/xpedite537x/xpedite537x.c
board/xes/xpedite550x/xpedite550x.c
cmd/bdinfo.c
common/board_f.c
common/board_r.c
common/bootm_os.c
common/image.c
common/spl/spl.c
drivers/ddr/altera/sdram_agilex.c
drivers/ddr/altera/sdram_s10.c
drivers/ddr/altera/sdram_soc64.c
drivers/ddr/altera/sdram_soc64.h
drivers/mmc/davinci_mmc.c
drivers/mmc/fsl_esdhc.c
drivers/mmc/fsl_esdhc_imx.c
drivers/mmc/mmc.c
drivers/mmc/mvebu_mmc.c
drivers/mmc/mxcmmc.c
drivers/mmc/mxsmmc.c
drivers/net/armada100_fec.c
drivers/net/at91_emac.c
drivers/net/ax88180.c
drivers/net/bcm-sf2-eth.c
drivers/net/calxedaxgmac.c
drivers/net/cs8900.c
drivers/net/dc2114x.c
drivers/net/designware.c
drivers/net/dm9000x.c
drivers/net/dnet.c
drivers/net/e1000.c
drivers/net/eepro100.c
drivers/net/ep93xx_eth.c
drivers/net/ethoc.c
drivers/net/fec_mxc.c
drivers/net/fec_mxc.h
drivers/net/fm/eth.c
drivers/net/fm/init.c
drivers/net/fm/memac_phy.c
drivers/net/fm/tgec_phy.c
drivers/net/fsl-mc/mc.c
drivers/net/fsl_mcdmafec.c
drivers/net/fsl_mdio.c
drivers/net/ftmac100.c
drivers/net/ftmac110.c
drivers/net/ks8851_mll.c
drivers/net/lan91c96.c
drivers/net/lpc32xx_eth.c
drivers/net/macb.c
drivers/net/mcffec.c
drivers/net/mpc8xx_fec.c
drivers/net/mvgbe.c
drivers/net/natsemi.c
drivers/net/ne2000_base.c
drivers/net/ns8382x.c
drivers/net/pcnet.c
drivers/net/rtl8139.c
drivers/net/rtl8169.c
drivers/net/sh_eth.c
drivers/net/smc91111.c
drivers/net/ti/cpsw.c
drivers/net/tsec.c
drivers/net/uli526x.c
drivers/net/vsc9953.c
drivers/pci/pci-uclass.c
drivers/pci/pcie_fsl_fixup.c
drivers/pci/pcie_layerscape_fixup.c
drivers/pci/pcie_layerscape_fixup_common.c
drivers/pci/pcie_layerscape_fixup_common.h
drivers/pci/pcie_layerscape_gen4_fixup.c
drivers/qe/uec.c
drivers/qe/uec.h
drivers/usb/common/fsl-dt-fixup.c
drivers/usb/eth/asix.c
drivers/usb/eth/asix88179.c
drivers/usb/eth/mcs7830.c
drivers/usb/eth/r8152.c
drivers/usb/eth/smsc95xx.c
drivers/usb/gadget/ether.c
drivers/video/cfb_console.c
include/fdt_support.h
include/fm_eth.h
include/fsl-mc/fsl_mc.h
include/fsl_esdhc.h
include/fsl_esdhc_imx.h
include/fsl_mdio.h
include/image.h
include/lmb.h
include/mvebu_mmc.h
include/net/pfe_eth/pfe_eth.h
include/netdev.h
include/tsec.h
include/vsc9953.h
lib/fdtdec.c
lib/lmb.c
net/eth_legacy.c
post/drivers/memory.c