[RFCv2 11/16] common: Drop errno.h from common header
Tom Rini
trini at konsulko.com
Wed Aug 19 15:09:03 CEST 2020
From: Simon Glass <sjg at chromium.org>
Move this out of the common header and include it only where needed.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
arch/arm/cpu/arm926ejs/mx25/generic.c | 1 +
arch/arm/cpu/armv7/s5p-common/pwm.c | 1 +
arch/arm/cpu/armv7/vf610/generic.c | 1 +
arch/arm/cpu/armv7/virt-dt.c | 1 +
arch/arm/cpu/armv7m/cache.c | 1 +
arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 1 +
arch/arm/cpu/armv8/fsl-layerscape/soc.c | 1 +
arch/arm/cpu/armv8/s32v234/generic.c | 1 +
arch/arm/cpu/armv8/sec_firmware.c | 1 +
arch/arm/cpu/armv8/spin_table.c | 1 +
arch/arm/cpu/pxa/cpuinfo.c | 1 +
arch/arm/include/asm/arch-tegra/cboot.h | 1 +
arch/arm/lib/gic-v3-its.c | 1 +
arch/arm/mach-aspeed/ast2500/sdram_ast2500.c | 1 +
arch/arm/mach-bcm283x/msg.c | 1 +
arch/arm/mach-imx/cmd_nandbcb.c | 1 +
arch/arm/mach-imx/imx8/ahab.c | 1 +
arch/arm/mach-imx/imx8/cpu.c | 1 +
arch/arm/mach-imx/imx8/fdt.c | 1 +
arch/arm/mach-imx/imx8/image.c | 1 +
arch/arm/mach-imx/imx8/parse-container.c | 1 +
arch/arm/mach-imx/imx8/snvs_security_sc.c | 1 +
arch/arm/mach-imx/imx8m/clock_imx8mm.c | 1 +
arch/arm/mach-imx/imx8m/clock_imx8mq.c | 1 +
arch/arm/mach-imx/imx8m/clock_slice.c | 1 +
arch/arm/mach-imx/imx8m/soc.c | 1 +
arch/arm/mach-imx/imx_bootaux.c | 1 +
arch/arm/mach-imx/mx7ulp/clock.c | 1 +
arch/arm/mach-imx/mx7ulp/pcc.c | 1 +
arch/arm/mach-imx/mx7ulp/scg.c | 1 +
arch/arm/mach-ipq40xx/clock-ipq4019.c | 1 +
arch/arm/mach-ipq40xx/pinctrl-snapdragon.c | 1 +
arch/arm/mach-k3/sysfw-loader.c | 1 +
arch/arm/mach-keystone/cmd_mon.c | 1 +
arch/arm/mach-meson/board-common.c | 1 +
arch/arm/mach-meson/board-g12a.c | 1 +
arch/arm/mach-meson/board-gx.c | 1 +
arch/arm/mach-meson/sm.c | 1 +
arch/arm/mach-mvebu/arm64-common.c | 1 +
arch/arm/mach-mvebu/armada3700/cpu.c | 1 +
arch/arm/mach-mvebu/efuse.c | 1 +
arch/arm/mach-nexell/clock.c | 1 +
arch/arm/mach-omap2/sec-common.c | 1 +
arch/arm/mach-rockchip/board.c | 1 +
arch/arm/mach-rockchip/boot_mode.c | 1 +
arch/arm/mach-rockchip/spl-boot-order.c | 1 +
arch/arm/mach-snapdragon/clock-snapdragon.c | 1 +
arch/arm/mach-snapdragon/dram.c | 1 +
arch/arm/mach-snapdragon/pinctrl-snapdragon.c | 1 +
arch/arm/mach-socfpga/board.c | 1 +
arch/arm/mach-socfpga/clock_manager_agilex.c | 1 +
arch/arm/mach-socfpga/clock_manager_arria10.c | 1 +
arch/arm/mach-socfpga/mailbox_s10.c | 1 +
arch/arm/mach-socfpga/misc.c | 1 +
arch/arm/mach-socfpga/misc_gen5.c | 1 +
arch/arm/mach-socfpga/misc_s10.c | 1 +
arch/arm/mach-socfpga/pinmux_arria10.c | 1 +
arch/arm/mach-socfpga/scan_manager.c | 1 +
arch/arm/mach-socfpga/wrap_iocsr_config.c | 1 +
arch/arm/mach-stm32mp/bsec.c | 1 +
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 1 +
.../mach-stm32mp/cmd_stm32prog/stm32prog_serial.c | 1 +
arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c | 1 +
arch/arm/mach-stm32mp/cpu.c | 1 +
arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h | 1 +
arch/arm/mach-stm32mp/pwr_regulator.c | 1 +
arch/arm/mach-stm32mp/spl.c | 1 +
arch/arm/mach-sunxi/cpu_info.c | 1 +
arch/arm/mach-sunxi/dram_sun8i_a33.c | 1 +
arch/arm/mach-sunxi/dram_sun8i_a83t.c | 1 +
arch/arm/mach-sunxi/p2wi.c | 1 +
arch/arm/mach-sunxi/rsb.c | 1 +
arch/arm/mach-tegra/cboot.c | 1 +
arch/arm/mach-tegra/clock.c | 1 +
arch/arm/mach-tegra/ivc.c | 1 +
arch/arm/mach-tegra/powergate.c | 1 +
arch/arm/mach-tegra/tegra124/xusb-padctl.c | 1 +
arch/arm/mach-tegra/tegra20/clock.c | 1 +
arch/arm/mach-tegra/tegra210/clock.c | 1 +
arch/arm/mach-tegra/tegra210/xusb-padctl.c | 1 +
arch/arm/mach-tegra/tegra30/clock.c | 1 +
arch/arm/mach-tegra/xusb-padctl-common.c | 1 +
arch/arm/mach-tegra/xusb-padctl-dummy.c | 1 +
arch/arm/mach-zynq/clk.c | 1 +
arch/arm/mach-zynq/cpu.c | 1 +
arch/arm/mach-zynqmp/cpu.c | 1 +
arch/m68k/lib/fec.c | 1 +
arch/nios2/cpu/cpu.c | 1 +
arch/powerpc/cpu/mpc85xx/ether_fcc.c | 1 +
arch/riscv/lib/andes_plic.c | 1 +
arch/riscv/lib/image.c | 1 +
arch/riscv/lib/sbi.c | 1 +
arch/riscv/lib/smp.c | 1 +
arch/sandbox/cpu/cpu.c | 1 +
arch/sandbox/cpu/eth-raw-os.c | 1 +
arch/sandbox/cpu/os.c | 1 +
arch/sandbox/cpu/sdl.c | 1 +
arch/sandbox/cpu/spl.c | 1 +
arch/sandbox/cpu/start.c | 1 +
arch/sandbox/cpu/state.c | 1 +
arch/sandbox/include/asm/sdl.h | 1 +
arch/sandbox/lib/pci_io.c | 1 +
arch/x86/cpu/acpi_gpe.c | 1 +
arch/x86/cpu/apollolake/fsp_bindings.c | 1 +
arch/x86/cpu/apollolake/fsp_m.c | 1 +
arch/x86/cpu/apollolake/fsp_s.c | 1 +
arch/x86/cpu/apollolake/lpc.c | 1 +
arch/x86/cpu/apollolake/punit.c | 1 +
arch/x86/cpu/apollolake/spl.c | 1 +
arch/x86/cpu/apollolake/uart.c | 1 +
arch/x86/cpu/broadwell/adsp.c | 1 +
arch/x86/cpu/broadwell/cpu.c | 1 +
arch/x86/cpu/broadwell/cpu_from_spl.c | 1 +
arch/x86/cpu/broadwell/cpu_full.c | 1 +
arch/x86/cpu/broadwell/iobp.c | 1 +
arch/x86/cpu/broadwell/me.c | 1 +
arch/x86/cpu/broadwell/pch.c | 1 +
arch/x86/cpu/broadwell/pinctrl_broadwell.c | 1 +
arch/x86/cpu/broadwell/refcode.c | 1 +
arch/x86/cpu/broadwell/sdram.c | 1 +
arch/x86/cpu/coreboot/tables.c | 1 +
arch/x86/cpu/cpu.c | 1 +
arch/x86/cpu/cpu_x86.c | 1 +
arch/x86/cpu/efi/payload.c | 1 +
arch/x86/cpu/i386/cpu.c | 1 +
arch/x86/cpu/i386/interrupt.c | 1 +
arch/x86/cpu/intel_common/cpu.c | 1 +
arch/x86/cpu/intel_common/itss.c | 1 +
arch/x86/cpu/intel_common/lpc.c | 1 +
arch/x86/cpu/intel_common/microcode.c | 1 +
arch/x86/cpu/intel_common/mrc.c | 1 +
arch/x86/cpu/intel_common/p2sb.c | 1 +
arch/x86/cpu/irq.c | 1 +
arch/x86/cpu/ivybridge/bd82x6x.c | 1 +
arch/x86/cpu/ivybridge/cpu.c | 1 +
arch/x86/cpu/ivybridge/early_me.c | 1 +
arch/x86/cpu/ivybridge/lpc.c | 1 +
arch/x86/cpu/ivybridge/model_206ax.c | 1 +
arch/x86/cpu/ivybridge/sdram.c | 1 +
arch/x86/cpu/mp_init.c | 1 +
arch/x86/cpu/mtrr.c | 1 +
arch/x86/cpu/qemu/cpu.c | 1 +
arch/x86/cpu/qfw_cpu.c | 1 +
arch/x86/cpu/quark/dram.c | 1 +
arch/x86/cpu/slimbootloader/serial.c | 1 +
arch/x86/cpu/tangier/pinmux.c | 1 +
arch/x86/cpu/tangier/sdram.c | 1 +
arch/x86/cpu/tangier/sysreset.c | 1 +
arch/x86/include/asm/mp.h | 1 +
arch/x86/lib/acpi_nhlt.c | 1 +
arch/x86/lib/acpi_table.c | 1 +
arch/x86/lib/bootm.c | 1 +
arch/x86/lib/fsp/fsp_common.c | 1 +
arch/x86/lib/fsp/fsp_graphics.c | 1 +
arch/x86/lib/fsp2/fsp_dram.c | 1 +
arch/x86/lib/fsp2/fsp_init.c | 1 +
arch/x86/lib/fsp2/fsp_meminit.c | 1 +
arch/x86/lib/fsp2/fsp_silicon_init.c | 1 +
arch/x86/lib/fsp2/fsp_support.c | 1 +
arch/x86/lib/i8254.c | 1 +
arch/x86/lib/mpspec.c | 1 +
arch/x86/lib/mrccache.c | 1 +
arch/x86/lib/pinctrl_ich6.c | 1 +
arch/x86/lib/sfi.c | 1 +
arch/x86/lib/spl.c | 1 +
arch/x86/lib/tpl.c | 1 +
arch/x86/lib/zimage.c | 1 +
board/AndesTech/ax25-ae350/ax25-ae350.c | 1 +
board/CZ.NIC/turris_mox/mox_sp.c | 1 +
board/CZ.NIC/turris_mox/turris_mox.c | 1 +
board/CZ.NIC/turris_omnia/turris_omnia.c | 1 +
board/Marvell/mvebu_armada-37xx/board.c | 1 +
board/Marvell/mvebu_armada-8k/board.c | 1 +
board/alliedtelesis/common/gpio_hog.c | 1 +
board/alliedtelesis/x530/x530.c | 1 +
board/armltd/vexpress/vexpress_common.c | 1 +
board/atmel/common/mac-spi-nor.c | 1 +
board/bachmann/ot1200/ot1200.c | 1 +
board/beacon/beacon-rzg2m/beacon-rzg2m.c | 1 +
board/beacon/imx8mm/spl.c | 1 +
board/bluegiga/apx4devkit/apx4devkit.c | 1 +
board/bosch/guardian/board.c | 1 +
board/bosch/shc/board.c | 1 +
board/broadcom/bcmns3/ns3.c | 1 +
board/broadcom/bcmstb/bcmstb.c | 1 +
board/ccv/xpress/xpress.c | 1 +
board/compulab/cl-som-imx7/cl-som-imx7.c | 1 +
board/compulab/cm_fx6/cm_fx6.c | 1 +
board/compulab/common/eeprom.c | 1 +
board/compulab/common/eeprom.h | 1 +
board/congatec/cgtqmx6eval/cgtqmx6eval.c | 1 +
board/creative/xfi3/xfi3.c | 1 +
board/dhelectronics/dh_imx6/dh_imx6.c | 1 +
board/dhelectronics/dh_stm32mp1/board.c | 1 +
board/emulation/qemu-arm/qemu-arm.c | 1 +
board/engicam/common/board.c | 1 +
board/esd/vme8349/vme8349.c | 1 +
board/freescale/common/fsl_validate.c | 1 +
board/freescale/common/mc34vr500.c | 1 +
board/freescale/common/pfuze.c | 1 +
board/freescale/imx8mm_evk/spl.c | 1 +
board/freescale/imx8mq_evk/spl.c | 1 +
board/freescale/ls1012ardb/ls1012ardb.c | 1 +
board/freescale/mpc8308rdb/sdram.c | 1 +
board/freescale/mpc8313erdb/sdram.c | 1 +
board/freescale/mpc8315erdb/sdram.c | 1 +
board/freescale/mpc8323erdb/mpc8323erdb.c | 1 +
board/freescale/mpc832xemds/mpc832xemds.c | 1 +
board/freescale/mpc8349emds/mpc8349emds.c | 1 +
board/freescale/mpc8349itx/mpc8349itx.c | 1 +
board/freescale/mpc837xemds/mpc837xemds.c | 1 +
board/freescale/mpc837xerdb/mpc837xerdb.c | 1 +
board/freescale/mx25pdk/mx25pdk.c | 1 +
board/freescale/mx28evk/mx28evk.c | 1 +
board/freescale/mx6slevk/mx6slevk.c | 1 +
board/freescale/mx6sllevk/mx6sllevk.c | 1 +
board/freescale/mx6sxsabreauto/mx6sxsabreauto.c | 1 +
board/freescale/mx6sxsabresd/mx6sxsabresd.c | 1 +
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 1 +
board/freescale/mx7dsabresd/mx7dsabresd.c | 1 +
board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 1 +
board/freescale/p2041rdb/ddr.c | 1 +
board/freescale/qemu-ppce500/qemu-ppce500.c | 1 +
board/friendlyarm/nanopi2/onewire.c | 1 +
board/gateworks/gw_ventana/gw_ventana.c | 1 +
board/gdsys/a38x/ihs_phys.c | 1 +
board/gdsys/mpc8308/hrcon.c | 1 +
board/gdsys/mpc8308/sdram.c | 1 +
board/gdsys/mpc8308/strider.c | 1 +
board/ge/common/ge_common.c | 1 +
board/ge/common/vpd_reader.c | 13 +++++++------
board/ge/common/vpd_reader.h | 2 --
board/google/imx8mq_phanbell/spl.c | 1 +
board/ids/ids8313/ids8313.c | 1 +
board/intel/cougarcanyon2/cougarcanyon2.c | 1 +
board/intel/edison/edison.c | 1 +
board/keymile/km83xx/km83xx.c | 1 +
board/liebherr/display5/spl.c | 1 +
board/liebherr/mccmon6/spl.c | 1 +
board/nvidia/jetson-tk1/jetson-tk1.c | 1 +
board/ppcag/bg0900/bg0900.c | 1 +
board/renesas/grpeach/grpeach.c | 1 +
board/renesas/ulcb/cpld.c | 1 +
board/samsung/common/board.c | 1 +
board/samsung/common/exynos5-dt.c | 1 +
board/samsung/goni/goni.c | 1 +
board/samsung/trats/trats.c | 1 +
board/samsung/trats2/trats2.c | 1 +
board/samsung/universal_c210/universal.c | 1 +
board/sandbox/sandbox.c | 1 +
board/sandisk/sansa_fuze_plus/sfp.c | 1 +
board/siemens/draco/board.c | 1 +
board/siemens/taurus/taurus.c | 1 +
board/sipeed/maix/maix.c | 1 +
board/softing/vining_2000/vining_2000.c | 1 +
board/st/common/stm32mp_dfu.c | 1 +
board/st/stm32f429-discovery/stm32f429-discovery.c | 1 +
.../st/stm32f429-evaluation/stm32f429-evaluation.c | 1 +
board/st/stm32f469-discovery/stm32f469-discovery.c | 1 +
board/st/stm32h743-disco/stm32h743-disco.c | 1 +
board/st/stm32h743-eval/stm32h743-eval.c | 1 +
board/st/stm32mp1/stm32mp1.c | 1 +
board/sunxi/board.c | 1 +
board/synopsys/hsdk/clk-lib.c | 1 +
board/synopsys/hsdk/env-lib.c | 1 +
board/synopsys/hsdk/hsdk.c | 1 +
board/synopsys/iot_devkit/iot_devkit.c | 1 +
board/technexion/pico-imx6ul/pico-imx6ul.c | 1 +
board/technexion/pico-imx7d/pico-imx7d.c | 1 +
board/theadorable/fpga.c | 1 +
board/ti/am335x/board.c | 1 +
board/ti/am57xx/board.c | 1 +
board/ti/am65x/evm.c | 1 +
board/ti/common/board_detect.c | 1 +
board/ti/j721e/evm.c | 1 +
board/ti/omap5_uevm/evm.c | 1 +
board/toradex/apalis-tk1/apalis-tk1.c | 1 +
board/toradex/colibri_imx7/colibri_imx7.c | 1 +
board/toradex/common/tdx-cfg-block.c | 1 +
board/toradex/verdin-imx8mm/spl.c | 1 +
board/udoo/neo/neo.c | 1 +
board/vscom/baltos/board.c | 1 +
board/wandboard/wandboard.c | 1 +
board/warp/warp.c | 1 +
board/warp7/warp7.c | 1 +
board/xilinx/common/board.c | 1 +
.../xilinx/microblaze-generic/microblaze-generic.c | 1 +
board/xilinx/versal/board.c | 1 +
board/xilinx/zynq/board.c | 1 +
board/xilinx/zynqmp/cmds.c | 1 +
board/xilinx/zynqmp/zynqmp.c | 1 +
board/xilinx/zynqmp_r5/board.c | 1 +
cmd/acpi.c | 1 +
cmd/axi.c | 1 +
cmd/bcb.c | 1 +
cmd/bind.c | 1 +
cmd/booti.c | 1 +
cmd/bootm.c | 1 +
cmd/button.c | 1 +
cmd/cpu.c | 1 +
cmd/efi.c | 1 +
cmd/elf.c | 1 +
cmd/ethsw.c | 1 +
cmd/gpio.c | 1 +
cmd/gpt.c | 1 +
cmd/i2c.c | 1 +
cmd/led.c | 1 +
cmd/mtd.c | 1 +
cmd/mvebu/bubt.c | 1 +
cmd/nand.c | 1 +
cmd/nvedit.c | 1 +
cmd/osd.c | 1 +
cmd/pci.c | 1 +
cmd/pinmux.c | 1 +
cmd/pmic.c | 1 +
cmd/pxe.c | 1 +
cmd/pxe_utils.c | 1 +
cmd/regulator.c | 1 +
cmd/spi.c | 1 +
cmd/sysboot.c | 1 +
cmd/tlv_eeprom.c | 1 +
cmd/tpm-v2.c | 1 +
cmd/usb_mass_storage.c | 1 +
cmd/wdt.c | 1 +
common/android_ab.c | 1 +
common/avb_verify.c | 1 +
common/bloblist.c | 1 +
common/board_r.c | 1 +
common/boot_fit.c | 1 +
common/bootm.c | 1 +
common/bootretry.c | 1 +
common/bootstage.c | 1 +
common/bouncebuf.c | 1 +
common/cli_hush.c | 1 +
common/common_fit.c | 1 +
common/edid.c | 1 +
common/image-android.c | 1 +
common/image-fdt.c | 1 +
common/image-fit-sig.c | 1 +
common/image-fit.c | 1 +
common/lcd_simplefb.c | 1 +
common/log.c | 1 +
common/menu.c | 1 +
common/spl/spl.c | 1 +
common/spl/spl_dfu.c | 1 +
common/spl/spl_ext.c | 1 +
common/spl/spl_fat.c | 1 +
common/spl/spl_fit.c | 1 +
common/spl/spl_legacy.c | 1 +
common/spl/spl_mmc.c | 1 +
common/spl/spl_net.c | 1 +
common/spl/spl_opensbi.c | 1 +
common/spl/spl_sata.c | 1 +
common/spl/spl_sdp.c | 1 +
common/spl/spl_spi.c | 1 +
common/spl/spl_usb.c | 1 +
common/spl/spl_ymodem.c | 1 +
common/splash.c | 1 +
common/splash_source.c | 1 +
common/stdio.c | 1 +
common/update.c | 1 +
common/usb.c | 1 +
common/usb_hub.c | 1 +
common/usb_kbd.c | 1 +
common/usb_storage.c | 1 +
disk/part.c | 1 +
disk/part_efi.c | 1 +
drivers/adc/adc-uclass.c | 1 +
drivers/adc/exynos-adc.c | 1 +
drivers/adc/meson-saradc.c | 1 +
drivers/adc/rockchip-saradc.c | 1 +
drivers/adc/sandbox.c | 1 +
drivers/adc/stm32-adc-core.c | 1 +
drivers/adc/stm32-adc.c | 1 +
drivers/ata/ahci_sunxi.c | 1 +
drivers/ata/fsl_sata.c | 1 +
drivers/ata/sata.c | 1 +
drivers/ata/sata_ceva.c | 1 +
drivers/ata/sata_sil.c | 1 +
drivers/axi/axi-emul-uclass.c | 1 +
drivers/axi/axi-uclass.c | 1 +
drivers/axi/axi_sandbox.c | 1 +
drivers/axi/ihs_axi.c | 1 +
drivers/axi/sandbox_store.c | 1 +
drivers/bios_emulator/atibios.c | 1 +
drivers/block/blk-uclass.c | 1 +
drivers/block/blk_legacy.c | 1 +
drivers/board/board-uclass.c | 1 +
drivers/board/gazerbeam.c | 1 +
drivers/board/sandbox.c | 1 +
drivers/bootcount/bootcount-uclass.c | 1 +
drivers/bootcount/bootcount.c | 1 +
drivers/bootcount/i2c-eeprom.c | 1 +
drivers/bootcount/rtc.c | 1 +
drivers/button/button-gpio.c | 1 +
drivers/button/button-uclass.c | 1 +
drivers/cache/cache-ncore.c | 1 +
drivers/cache/cache-uclass.c | 1 +
drivers/cache/cache-v5l2.c | 1 +
drivers/clk/altera/clk-agilex.c | 1 +
drivers/clk/altera/clk-arria10.c | 1 +
drivers/clk/analogbits/wrpll-cln28hpc.c | 1 +
drivers/clk/aspeed/clk_ast2500.c | 1 +
drivers/clk/at91/clk-main.c | 1 +
drivers/clk/at91/clk-plla.c | 1 +
drivers/clk/at91/clk-plladiv.c | 1 +
drivers/clk/at91/clk-system.c | 1 +
drivers/clk/at91/clk-utmi.c | 1 +
drivers/clk/at91/pmc.c | 1 +
drivers/clk/clk-cdce9xx.c | 1 +
drivers/clk/clk-composite.c | 1 +
drivers/clk/clk-divider.c | 1 +
drivers/clk/clk-fixed-factor.c | 1 +
drivers/clk/clk-gate.c | 1 +
drivers/clk/clk-hsdk-cgu.c | 1 +
drivers/clk/clk-mux.c | 1 +
drivers/clk/clk-ti-sci.c | 1 +
drivers/clk/clk-uclass.c | 1 +
drivers/clk/clk.c | 1 +
drivers/clk/clk_bcm6345.c | 1 +
drivers/clk/clk_boston.c | 1 +
drivers/clk/clk_pic32.c | 1 +
drivers/clk/clk_sandbox.c | 1 +
drivers/clk/clk_sandbox_ccf.c | 1 +
drivers/clk/clk_sandbox_test.c | 1 +
drivers/clk/clk_stm32f.c | 1 +
drivers/clk/clk_stm32h7.c | 1 +
drivers/clk/clk_stm32mp1.c | 1 +
drivers/clk/clk_versal.c | 1 +
drivers/clk/clk_vexpress_osc.c | 1 +
drivers/clk/clk_zynq.c | 1 +
drivers/clk/clk_zynqmp.c | 1 +
drivers/clk/exynos/clk-exynos7420.c | 1 +
drivers/clk/ics8n3qv01.c | 1 +
drivers/clk/imx/clk-composite-8m.c | 1 +
drivers/clk/imx/clk-gate2.c | 1 +
drivers/clk/imx/clk-imx6q.c | 1 +
drivers/clk/imx/clk-imx8.c | 1 +
drivers/clk/imx/clk-imx8mm.c | 1 +
drivers/clk/imx/clk-imx8mn.c | 1 +
drivers/clk/imx/clk-imx8mp.c | 1 +
drivers/clk/imx/clk-imx8qm.c | 1 +
drivers/clk/imx/clk-imx8qxp.c | 1 +
drivers/clk/imx/clk-imxrt1020.c | 1 +
drivers/clk/imx/clk-imxrt1050.c | 1 +
drivers/clk/imx/clk-pfd.c | 1 +
drivers/clk/imx/clk-pll14xx.c | 1 +
drivers/clk/imx/clk-pllv3.c | 1 +
drivers/clk/intel/clk_intel.c | 1 +
drivers/clk/kendryte/bypass.c | 1 +
drivers/clk/kendryte/clk.c | 1 +
drivers/clk/kendryte/pll.c | 2 ++
drivers/clk/mediatek/clk-mt7622.c | 1 +
drivers/clk/mediatek/clk-mt7623.c | 1 +
drivers/clk/mediatek/clk-mt7629.c | 1 +
drivers/clk/mediatek/clk-mtk.c | 1 +
drivers/clk/meson/axg.c | 1 +
drivers/clk/meson/g12a.c | 1 +
drivers/clk/meson/gxbb.c | 1 +
drivers/clk/mpc83xx_clk.c | 1 +
drivers/clk/mpc83xx_clk.h | 1 +
drivers/clk/mtmips/clk-mt7628.c | 1 +
drivers/clk/mvebu/armada-37xx-periph.c | 1 +
drivers/clk/mvebu/armada-37xx-tbg.c | 1 +
drivers/clk/owl/clk_owl.c | 1 +
drivers/clk/renesas/clk-rcar-gen2.c | 1 +
drivers/clk/renesas/clk-rcar-gen3.c | 1 +
drivers/clk/renesas/renesas-cpg-mssr.c | 1 +
drivers/clk/rockchip/clk_pll.c | 1 +
drivers/clk/rockchip/clk_px30.c | 1 +
drivers/clk/rockchip/clk_rk3036.c | 1 +
drivers/clk/rockchip/clk_rk3128.c | 1 +
drivers/clk/rockchip/clk_rk3188.c | 1 +
drivers/clk/rockchip/clk_rk322x.c | 1 +
drivers/clk/rockchip/clk_rk3288.c | 1 +
drivers/clk/rockchip/clk_rk3308.c | 1 +
drivers/clk/rockchip/clk_rk3328.c | 1 +
drivers/clk/rockchip/clk_rk3368.c | 1 +
drivers/clk/rockchip/clk_rk3399.c | 1 +
drivers/clk/rockchip/clk_rv1108.c | 1 +
drivers/clk/sifive/fu540-prci.c | 1 +
drivers/clk/sunxi/clk_sunxi.c | 1 +
drivers/clk/tegra/tegra-car-clk.c | 1 +
drivers/clk/uniphier/clk-uniphier-core.c | 1 +
drivers/core/acpi.c | 1 +
drivers/core/device-remove.c | 1 +
drivers/core/device.c | 1 +
drivers/core/devres.c | 1 +
drivers/core/lists.c | 1 +
drivers/core/of_access.c | 1 +
drivers/core/of_addr.c | 1 +
drivers/core/of_extra.c | 1 +
drivers/core/ofnode.c | 1 +
drivers/core/read.c | 1 +
drivers/core/regmap.c | 1 +
drivers/core/root.c | 1 +
drivers/core/simple-pm-bus.c | 1 +
drivers/core/syscon-uclass.c | 1 +
drivers/core/uclass.c | 1 +
drivers/core/util.c | 1 +
drivers/cpu/bmips_cpu.c | 1 +
drivers/cpu/cpu-uclass.c | 1 +
drivers/cpu/imx8_cpu.c | 1 +
drivers/cpu/mpc83xx_cpu.c | 1 +
drivers/cpu/riscv_cpu.c | 1 +
drivers/crypto/fsl/fsl_rsa.c | 1 +
drivers/crypto/fsl/jr.c | 1 +
drivers/crypto/fsl/rng.c | 1 +
drivers/crypto/rsa_mod_exp/mod_exp_uclass.c | 1 +
drivers/ddr/altera/sdram_agilex.c | 1 +
drivers/ddr/altera/sdram_arria10.c | 1 +
drivers/ddr/altera/sdram_gen5.c | 1 +
drivers/ddr/altera/sdram_soc64.c | 1 +
drivers/ddr/altera/sequencer.c | 1 +
drivers/demo/demo-shape.c | 1 +
drivers/demo/demo-uclass.c | 1 +
drivers/dfu/dfu.c | 1 +
drivers/dfu/dfu_mmc.c | 1 +
drivers/dfu/dfu_mtd.c | 1 +
drivers/dfu/dfu_ram.c | 1 +
drivers/dfu/dfu_sf.c | 1 +
drivers/dfu/dfu_tftp.c | 1 +
drivers/dma/bcm6348-iudma.c | 1 +
drivers/dma/dma-uclass.c | 1 +
drivers/dma/lpc32xx_dma.c | 1 +
drivers/dma/sandbox-dma-test.c | 1 +
drivers/dma/ti/k3-psil.c | 1 +
drivers/dma/ti/k3-udma.c | 1 +
drivers/fastboot/fb_common.c | 1 +
drivers/fastboot/fb_getvar.c | 1 +
drivers/fastboot/fb_mmc.c | 1 +
drivers/fastboot/fb_nand.c | 1 +
drivers/firmware/firmware-zynqmp.c | 1 +
drivers/firmware/ti_sci.c | 1 +
drivers/fpga/altera.c | 1 +
drivers/fpga/socfpga_arria10.c | 1 +
drivers/fpga/stratix10.c | 1 +
drivers/gpio/74x164_gpio.c | 1 +
drivers/gpio/atmel_pio4.c | 1 +
drivers/gpio/axp_gpio.c | 1 +
drivers/gpio/bcm2835_gpio.c | 1 +
drivers/gpio/bcm6345_gpio.c | 1 +
drivers/gpio/cortina_gpio.c | 1 +
drivers/gpio/da8xx_gpio.c | 1 +
drivers/gpio/dwapb_gpio.c | 1 +
drivers/gpio/gpio-rza1.c | 1 +
drivers/gpio/gpio-uclass.c | 1 +
drivers/gpio/hi6220_gpio.c | 1 +
drivers/gpio/hsdk-creg-gpio.c | 1 +
drivers/gpio/imx_rgpio2p.c | 1 +
drivers/gpio/intel_broadwell_gpio.c | 1 +
drivers/gpio/intel_gpio.c | 1 +
drivers/gpio/intel_ich6_gpio.c | 1 +
drivers/gpio/iproc_gpio.c | 1 +
drivers/gpio/mpc83xx_spisel_boot.c | 1 +
drivers/gpio/mpc8xxx_gpio.c | 1 +
drivers/gpio/mscc_sgpio.c | 1 +
drivers/gpio/msm_gpio.c | 1 +
drivers/gpio/mt7621_gpio.c | 1 +
drivers/gpio/pca953x_gpio.c | 1 +
drivers/gpio/pic32_gpio.c | 1 +
drivers/gpio/pm8916_gpio.c | 1 +
drivers/gpio/s5p_gpio.c | 1 +
drivers/gpio/sandbox.c | 1 +
drivers/gpio/sifive-gpio.c | 1 +
drivers/gpio/spear_gpio.c | 1 +
drivers/gpio/sunxi_gpio.c | 1 +
drivers/gpio/tegra186_gpio.c | 1 +
drivers/gpio/tegra_gpio.c | 1 +
drivers/gpio/vybrid_gpio.c | 1 +
drivers/gpio/xilinx_gpio.c | 1 +
drivers/hwspinlock/hwspinlock-uclass.c | 1 +
drivers/hwspinlock/stm32_hwspinlock.c | 1 +
drivers/i2c/ast_i2c.c | 1 +
drivers/i2c/at91_i2c.c | 1 +
drivers/i2c/cros_ec_ldo.c | 1 +
drivers/i2c/davinci_i2c.c | 1 +
drivers/i2c/designware_i2c.c | 1 +
drivers/i2c/designware_i2c_pci.c | 1 +
drivers/i2c/exynos_hs_i2c.c | 1 +
drivers/i2c/fsl_i2c.c | 1 +
drivers/i2c/i2c-cortina.c | 1 +
drivers/i2c/i2c-gpio.c | 1 +
drivers/i2c/i2c-uclass.c | 1 +
drivers/i2c/i2c-versatile.c | 1 +
drivers/i2c/ihs_i2c.c | 1 +
drivers/i2c/imx_lpi2c.c | 1 +
drivers/i2c/intel_i2c.c | 1 +
drivers/i2c/iproc_i2c.c | 1 +
drivers/i2c/meson_i2c.c | 1 +
drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 1 +
drivers/i2c/muxes/i2c-mux-uclass.c | 1 +
drivers/i2c/muxes/pca954x.c | 1 +
drivers/i2c/mv_i2c.c | 1 +
drivers/i2c/nx_i2c.c | 1 +
drivers/i2c/octeon_i2c.c | 1 +
drivers/i2c/omap24xx_i2c.c | 1 +
drivers/i2c/rcar_i2c.c | 1 +
drivers/i2c/rcar_iic.c | 1 +
drivers/i2c/rk_i2c.c | 1 +
drivers/i2c/s3c24x0_i2c.c | 1 +
drivers/i2c/sandbox_i2c.c | 1 +
drivers/i2c/stm32f7_i2c.c | 1 +
drivers/i2c/tegra186_bpmp_i2c.c | 1 +
drivers/i2c/tegra_i2c.c | 1 +
drivers/i2c/xilinx_xiic.c | 1 +
drivers/input/cros_ec_keyb.c | 1 +
drivers/input/i8042.c | 1 +
drivers/input/keyboard-uclass.c | 1 +
drivers/input/tegra-kbc.c | 1 +
drivers/led/led-uclass.c | 1 +
drivers/led/led_bcm6328.c | 1 +
drivers/led/led_bcm6358.c | 1 +
drivers/led/led_bcm6858.c | 1 +
drivers/led/led_gpio.c | 1 +
drivers/mailbox/k3-sec-proxy.c | 1 +
drivers/mailbox/mailbox-uclass.c | 1 +
drivers/mailbox/sandbox-mbox.c | 1 +
drivers/mailbox/stm32-ipcc.c | 1 +
drivers/mailbox/tegra-hsp.c | 1 +
drivers/mailbox/zynqmp-ipi.c | 1 +
drivers/misc/atsha204a-i2c.c | 1 +
drivers/misc/cros_ec_i2c.c | 1 +
drivers/misc/cros_ec_lpc.c | 1 +
drivers/misc/cros_ec_sandbox.c | 1 +
drivers/misc/cros_ec_spi.c | 1 +
drivers/misc/fs_loader.c | 1 +
drivers/misc/gdsys_ioep.c | 1 +
drivers/misc/gdsys_soc.c | 1 +
drivers/misc/i2c_eeprom.c | 1 +
drivers/misc/i2c_eeprom_emul.c | 1 +
drivers/misc/ihs_fpga.c | 1 +
drivers/misc/imx8/fuse.c | 1 +
drivers/misc/imx8/scu.c | 1 +
drivers/misc/irq-uclass.c | 1 +
drivers/misc/irq_sandbox.c | 1 +
drivers/misc/k3_avs.c | 1 +
drivers/misc/k3_esm.c | 1 +
drivers/misc/microchip_flexcom.c | 1 +
drivers/misc/misc-uclass.c | 1 +
drivers/misc/misc_sandbox.c | 1 +
drivers/misc/mpc83xx_serdes.c | 1 +
drivers/misc/p2sb-uclass.c | 1 +
drivers/misc/p2sb_emul.c | 1 +
drivers/misc/pca9551_led.c | 1 +
drivers/misc/pwrseq-uclass.c | 1 +
drivers/misc/qfw.c | 1 +
drivers/misc/rockchip-otp.c | 1 +
drivers/misc/sifive-otp.c | 1 +
drivers/misc/smsc_sio1007.c | 1 +
drivers/misc/stm32_rcc.c | 1 +
drivers/misc/stm32mp_fuse.c | 1 +
drivers/misc/swap_case.c | 1 +
drivers/misc/tegra186_bpmp.c | 1 +
drivers/misc/vexpress_config.c | 1 +
drivers/mmc/am654_sdhci.c | 1 +
drivers/mmc/atmel_sdhci.c | 1 +
drivers/mmc/bcm2835_sdhci.c | 1 +
drivers/mmc/bcm2835_sdhost.c | 1 +
drivers/mmc/bcmstb_sdhci.c | 1 +
drivers/mmc/ca_dw_mmc.c | 1 +
drivers/mmc/davinci_mmc.c | 1 +
drivers/mmc/dw_mmc.c | 1 +
drivers/mmc/exynos_dw_mmc.c | 1 +
drivers/mmc/fsl_esdhc.c | 1 +
drivers/mmc/fsl_esdhc_imx.c | 1 +
drivers/mmc/iproc_sdhci.c | 1 +
drivers/mmc/jz_mmc.c | 1 +
drivers/mmc/meson_gx_mmc.c | 1 +
drivers/mmc/mmc-uclass.c | 1 +
drivers/mmc/mmc.c | 1 +
drivers/mmc/mmc_legacy.c | 1 +
drivers/mmc/mmc_spi.c | 1 +
drivers/mmc/msm_sdhci.c | 1 +
drivers/mmc/mtk-sd.c | 1 +
drivers/mmc/mv_sdhci.c | 1 +
drivers/mmc/mvebu_mmc.c | 1 +
drivers/mmc/nexell_dw_mmc.c | 1 +
drivers/mmc/omap_hsmmc.c | 1 +
drivers/mmc/pci_mmc.c | 1 +
drivers/mmc/renesas-sdhi.c | 1 +
drivers/mmc/rockchip_dw_mmc.c | 1 +
drivers/mmc/rpmb.c | 1 +
drivers/mmc/s5p_sdhci.c | 1 +
drivers/mmc/sdhci-cadence.c | 1 +
drivers/mmc/sdhci.c | 1 +
drivers/mmc/snps_dw_mmc.c | 1 +
drivers/mmc/socfpga_dw_mmc.c | 1 +
drivers/mmc/sti_sdhci.c | 1 +
drivers/mmc/stm32_sdmmc2.c | 1 +
drivers/mmc/sunxi_mmc.c | 1 +
drivers/mmc/tangier_sdhci.c | 1 +
drivers/mmc/tegra_mmc.c | 1 +
drivers/mmc/tmio-common.c | 1 +
drivers/mmc/xenon_sdhci.c | 1 +
drivers/mmc/zynq_sdhci.c | 1 +
drivers/mtd/altera_qspi.c | 1 +
drivers/mtd/cfi_flash.c | 1 +
drivers/mtd/hbmc-am654.c | 1 +
drivers/mtd/mtd_uboot.c | 1 +
drivers/mtd/mtdconcat.c | 1 +
drivers/mtd/mtdcore.c | 1 +
drivers/mtd/nand/bbt.c | 1 +
drivers/mtd/nand/core.c | 1 +
drivers/mtd/nand/raw/atmel_nand.c | 1 +
drivers/mtd/nand/raw/davinci_nand.c | 1 +
drivers/mtd/nand/raw/denali_dt.c | 1 +
drivers/mtd/nand/raw/denali_spl.c | 1 +
drivers/mtd/nand/raw/fsmc_nand.c | 1 +
drivers/mtd/nand/raw/mxc_nand.c | 1 +
drivers/mtd/nand/raw/mxc_nand_spl.c | 1 +
drivers/mtd/nand/raw/mxs_nand_dt.c | 1 +
drivers/mtd/nand/raw/mxs_nand_spl.c | 1 +
drivers/mtd/nand/raw/nand.c | 1 +
drivers/mtd/nand/raw/nand_bbt.c | 1 +
drivers/mtd/nand/raw/nand_bch.c | 1 +
drivers/mtd/nand/raw/nand_timings.c | 1 +
drivers/mtd/nand/raw/stm32_fmc2_nand.c | 1 +
drivers/mtd/nand/raw/sunxi_nand.c | 1 +
drivers/mtd/nand/raw/sunxi_nand_spl.c | 1 +
drivers/mtd/nand/raw/vf610_nfc.c | 1 +
drivers/mtd/nand/spi/core.c | 1 +
drivers/mtd/nand/spi/gigadevice.c | 1 +
drivers/mtd/nand/spi/macronix.c | 1 +
drivers/mtd/nand/spi/micron.c | 1 +
drivers/mtd/nand/spi/toshiba.c | 1 +
drivers/mtd/nand/spi/winbond.c | 1 +
drivers/mtd/pic32_flash.c | 1 +
drivers/mtd/renesas_rpc_hf.c | 1 +
drivers/mtd/spi/sandbox.c | 1 +
drivers/mtd/spi/sf_dataflash.c | 1 +
drivers/mtd/spi/sf_probe.c | 1 +
drivers/mtd/st_smi.c | 1 +
drivers/mtd/ubi/attach.c | 1 +
drivers/mtd/ubi/build.c | 1 +
drivers/mtd/ubi/debug.c | 1 +
drivers/mtd/ubi/eba.c | 1 +
drivers/mtd/ubi/fastmap-wl.c | 2 ++
drivers/mtd/ubi/fastmap.c | 1 +
drivers/mtd/ubi/io.c | 1 +
drivers/mtd/ubi/kapi.c | 1 +
drivers/mtd/ubi/misc.c | 1 +
drivers/mtd/ubi/ubi.h | 1 +
drivers/mtd/ubi/upd.c | 1 +
drivers/mtd/ubi/vmt.c | 1 +
drivers/mtd/ubi/vtbl.c | 1 +
drivers/mtd/ubi/wl.c | 1 +
drivers/mtd/ubispl/ubispl.c | 1 +
drivers/net/ag7xxx.c | 1 +
drivers/net/altera_tse.c | 1 +
drivers/net/armada100_fec.c | 1 +
drivers/net/at91_emac.c | 1 +
drivers/net/bcm-sf2-eth.c | 1 +
drivers/net/bcm6348-eth.c | 1 +
drivers/net/bcm6368-eth.c | 1 +
drivers/net/bcmgenet.c | 1 +
drivers/net/calxedaxgmac.c | 1 +
drivers/net/dc2114x.c | 1 +
drivers/net/designware.c | 1 +
drivers/net/dwc_eth_qos.c | 1 +
drivers/net/dwmac_socfpga.c | 1 +
drivers/net/e1000.c | 1 +
drivers/net/eepro100.c | 1 +
drivers/net/ep93xx_eth.c | 1 +
drivers/net/eth-phy-uclass.c | 1 +
drivers/net/ethoc.c | 1 +
drivers/net/fm/eth.c | 1 +
drivers/net/fm/init.c | 1 +
drivers/net/fm/memac_phy.c | 1 +
drivers/net/fsl-mc/dpio/qbman_portal.c | 1 +
drivers/net/fsl-mc/mc.c | 1 +
drivers/net/fsl-mc/mc_sys.c | 1 +
drivers/net/fsl_enetc.c | 1 +
drivers/net/fsl_enetc_mdio.c | 1 +
drivers/net/fsl_mcdmafec.c | 1 +
drivers/net/ftgmac100.c | 1 +
drivers/net/ftmac100.c | 1 +
drivers/net/gmac_rockchip.c | 1 +
drivers/net/higmacv300.c | 1 +
drivers/net/ks8851_mll.c | 1 +
drivers/net/ldpaa_eth/ldpaa_eth.c | 1 +
drivers/net/ldpaa_eth/ldpaa_wriop.c | 1 +
drivers/net/ldpaa_eth/lx2160a.c | 1 +
drivers/net/mcffec.c | 1 +
drivers/net/mdio_mux_sandbox.c | 1 +
drivers/net/mdio_sandbox.c | 1 +
drivers/net/mpc8xx_fec.c | 1 +
drivers/net/mscc_eswitch/jr2_switch.c | 1 +
drivers/net/mscc_eswitch/luton_switch.c | 1 +
drivers/net/mscc_eswitch/mscc_mac_table.c | 1 +
drivers/net/mscc_eswitch/mscc_miim.c | 1 +
drivers/net/mscc_eswitch/mscc_xfer.c | 1 +
drivers/net/mscc_eswitch/ocelot_switch.c | 1 +
drivers/net/mscc_eswitch/serval_switch.c | 1 +
drivers/net/mscc_eswitch/servalt_switch.c | 1 +
drivers/net/mt7628-eth.c | 1 +
drivers/net/mtk_eth.c | 1 +
drivers/net/mvmdio.c | 1 +
drivers/net/pch_gbe.c | 1 +
drivers/net/pcnet.c | 1 +
drivers/net/pfe_eth/pfe_driver.c | 1 +
drivers/net/pfe_eth/pfe_eth.c | 1 +
drivers/net/pfe_eth/pfe_firmware.c | 1 +
drivers/net/pfe_eth/pfe_mdio.c | 1 +
drivers/net/phy/aquantia.c | 1 +
drivers/net/phy/atheros.c | 1 +
drivers/net/phy/b53.c | 1 +
drivers/net/phy/cortina.c | 1 +
drivers/net/phy/dp83867.c | 1 +
drivers/net/phy/fixed.c | 1 +
drivers/net/phy/marvell.c | 1 +
drivers/net/phy/meson-gxl.c | 1 +
drivers/net/phy/micrel_ksz90x1.c | 1 +
drivers/net/phy/mscc.c | 1 +
drivers/net/phy/mv88e61xx.c | 1 +
drivers/net/phy/ncsi.c | 1 +
drivers/net/phy/phy.c | 1 +
drivers/net/phy/xilinx_gmii2rgmii.c | 1 +
drivers/net/phy/xilinx_phy.c | 1 +
drivers/net/pic32_eth.c | 1 +
drivers/net/pic32_mdio.c | 1 +
drivers/net/ravb.c | 1 +
drivers/net/rtl8139.c | 1 +
drivers/net/rtl8169.c | 1 +
drivers/net/sandbox-raw-bus.c | 1 +
drivers/net/sandbox.c | 1 +
drivers/net/smc911x.c | 1 +
drivers/net/sni_ave.c | 1 +
drivers/net/sun8i_emac.c | 1 +
drivers/net/sunxi_emac.c | 1 +
drivers/net/ti/am65-cpsw-nuss.c | 1 +
drivers/net/ti/cpsw-common.c | 1 +
drivers/net/ti/cpsw_mdio.c | 1 +
drivers/net/ti/davinci_emac.c | 1 +
drivers/net/ti/keystone_net.c | 1 +
drivers/net/vsc9953.c | 1 +
drivers/net/xilinx_axi_emac.c | 1 +
drivers/nvme/nvme.c | 1 +
drivers/nvme/nvme_show.c | 1 +
drivers/pch/pch-uclass.c | 1 +
drivers/pch/pch7.c | 1 +
drivers/pch/pch9.c | 1 +
drivers/pch/sandbox_pch.c | 1 +
drivers/pci/pci-aardvark.c | 1 +
drivers/pci/pci-emul-uclass.c | 1 +
drivers/pci/pci-rcar-gen2.c | 1 +
drivers/pci/pci-rcar-gen3.c | 1 +
drivers/pci/pci-uclass.c | 1 +
drivers/pci/pci_common.c | 1 +
drivers/pci/pci_mpc85xx.c | 1 +
drivers/pci/pci_rom.c | 1 +
drivers/pci/pci_sandbox.c | 1 +
drivers/pci/pci_sh7751.c | 1 +
drivers/pci/pci_tegra.c | 1 +
drivers/pci/pcie_brcmstb.c | 1 +
drivers/pci/pcie_dw_mvebu.c | 1 +
drivers/pci/pcie_dw_ti.c | 1 +
drivers/pci/pcie_fsl.c | 1 +
drivers/pci/pcie_imx.c | 1 +
drivers/pci/pcie_intel_fpga.c | 1 +
drivers/pci/pcie_layerscape_ep.c | 1 +
drivers/pci/pcie_layerscape_fixup.c | 1 +
drivers/pci/pcie_layerscape_fixup_common.c | 1 +
drivers/pci/pcie_layerscape_gen4.c | 1 +
drivers/pci/pcie_layerscape_gen4_fixup.c | 1 +
drivers/pci/pcie_layerscape_rc.c | 1 +
drivers/pci/pcie_mediatek.c | 1 +
drivers/pci/pcie_phytium.c | 1 +
drivers/pci/pcie_rockchip.c | 1 +
drivers/pci/pcie_xilinx.c | 1 +
drivers/pci_endpoint/pci_ep-uclass.c | 1 +
drivers/pci_endpoint/pcie-cadence-ep.c | 1 +
drivers/pci_endpoint/sandbox-pci_ep.c | 1 +
drivers/phy/allwinner/phy-sun4i-usb.c | 1 +
drivers/phy/bcm6318-usbh-phy.c | 1 +
drivers/phy/bcm6348-usbh-phy.c | 1 +
drivers/phy/bcm6358-usbh-phy.c | 1 +
drivers/phy/bcm6368-usbh-phy.c | 1 +
drivers/phy/keystone-usb-phy.c | 1 +
drivers/phy/meson-g12a-usb2.c | 1 +
drivers/phy/meson-g12a-usb3-pcie.c | 1 +
drivers/phy/meson-gxbb-usb2.c | 1 +
drivers/phy/meson-gxl-usb2.c | 1 +
drivers/phy/meson-gxl-usb3.c | 1 +
drivers/phy/msm8916-usbh-phy.c | 1 +
drivers/phy/mt76x8-usb-phy.c | 1 +
drivers/phy/omap-usb2-phy.c | 1 +
drivers/phy/phy-da8xx-usb.c | 1 +
drivers/phy/phy-mtk-tphy.c | 1 +
drivers/phy/phy-rcar-gen2.c | 1 +
drivers/phy/phy-rcar-gen3.c | 1 +
drivers/phy/phy-stm32-usbphyc.c | 1 +
drivers/phy/phy-ti-am654.c | 1 +
drivers/phy/phy-uclass.c | 1 +
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1 +
drivers/phy/rockchip/phy-rockchip-pcie.c | 1 +
drivers/phy/rockchip/phy-rockchip-typec.c | 1 +
drivers/phy/sandbox-phy.c | 1 +
drivers/phy/sti_usb_phy.c | 1 +
drivers/phy/ti-pipe3-phy.c | 1 +
drivers/pinctrl/aspeed/pinctrl_ast2500.c | 1 +
drivers/pinctrl/ath79/pinctrl_ar933x.c | 1 +
drivers/pinctrl/ath79/pinctrl_qca953x.c | 1 +
drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 1 +
drivers/pinctrl/broadcom/pinctrl-bcm6838.c | 1 +
drivers/pinctrl/exynos/pinctrl-exynos.c | 1 +
drivers/pinctrl/exynos/pinctrl-exynos7420.c | 1 +
drivers/pinctrl/intel/pinctrl.c | 1 +
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 1 +
drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c | 1 +
drivers/pinctrl/meson/pinctrl-meson.c | 1 +
drivers/pinctrl/mscc/mscc-common.c | 1 +
drivers/pinctrl/mtmips/pinctrl-mt7628.c | 1 +
drivers/pinctrl/mtmips/pinctrl-mtmips-common.c | 1 +
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 1 +
drivers/pinctrl/mvebu/pinctrl-mvebu.c | 1 +
drivers/pinctrl/nexell/pinctrl-nexell.c | 1 +
drivers/pinctrl/nexell/pinctrl-s5pxx18.c | 1 +
drivers/pinctrl/nxp/pinctrl-imx.c | 1 +
drivers/pinctrl/nxp/pinctrl-mxs.c | 1 +
drivers/pinctrl/nxp/pinctrl-scu.c | 1 +
drivers/pinctrl/pinctrl-at91-pio4.c | 1 +
drivers/pinctrl/pinctrl-at91.c | 1 +
drivers/pinctrl/pinctrl-generic.c | 1 +
drivers/pinctrl/pinctrl-single.c | 1 +
drivers/pinctrl/pinctrl-sti.c | 1 +
drivers/pinctrl/pinctrl-stmfx.c | 1 +
drivers/pinctrl/pinctrl-uclass.c | 1 +
drivers/pinctrl/pinctrl_pic32.c | 1 +
drivers/pinctrl/pinctrl_stm32.c | 1 +
drivers/pinctrl/renesas/pfc-r7s72100.c | 1 +
drivers/pinctrl/renesas/pfc-r8a7790.c | 1 +
drivers/pinctrl/renesas/pfc-r8a7791.c | 1 +
drivers/pinctrl/renesas/pfc-r8a7794.c | 1 +
drivers/pinctrl/renesas/pfc-r8a77970.c | 1 +
drivers/pinctrl/renesas/pfc-r8a77980.c | 1 +
drivers/pinctrl/renesas/pfc-r8a77990.c | 1 +
drivers/pinctrl/renesas/pfc.c | 1 +
drivers/pinctrl/rockchip/pinctrl-px30.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3036.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3128.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3188.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk322x.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3288.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3308.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3328.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3368.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rk3399.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rockchip-core.c | 1 +
drivers/pinctrl/rockchip/pinctrl-rv1108.c | 1 +
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 1 +
drivers/power/acpi_pmc/acpi-pmc-uclass.c | 1 +
drivers/power/acpi_pmc/pmc_emul.c | 1 +
drivers/power/acpi_pmc/sandbox.c | 1 +
drivers/power/axp152.c | 1 +
drivers/power/axp209.c | 1 +
drivers/power/axp221.c | 1 +
drivers/power/axp809.c | 1 +
drivers/power/axp818.c | 1 +
drivers/power/battery/bat_trats.c | 1 +
drivers/power/battery/bat_trats2.c | 1 +
drivers/power/domain/bcm6328-power-domain.c | 1 +
drivers/power/domain/imx8-power-domain-legacy.c | 1 +
drivers/power/domain/imx8m-power-domain.c | 1 +
drivers/power/domain/meson-ee-pwrc.c | 1 +
drivers/power/domain/meson-gx-pwrc-vpu.c | 1 +
drivers/power/domain/mtk-power-domain.c | 1 +
drivers/power/domain/power-domain-uclass.c | 1 +
drivers/power/domain/sandbox-power-domain.c | 1 +
drivers/power/domain/ti-sci-power-domain.c | 1 +
drivers/power/exynos-tmu.c | 1 +
drivers/power/fuel_gauge/fg_max17042.c | 1 +
drivers/power/mfd/fg_max77693.c | 1 +
drivers/power/mfd/muic_max77693.c | 1 +
drivers/power/mfd/pmic_max77693.c | 1 +
drivers/power/pmic/act8846.c | 1 +
drivers/power/pmic/as3722.c | 1 +
drivers/power/pmic/as3722_gpio.c | 1 +
drivers/power/pmic/bd71837.c | 1 +
drivers/power/pmic/da9063.c | 1 +
drivers/power/pmic/fan53555.c | 1 +
drivers/power/pmic/i2c_pmic_emul.c | 1 +
drivers/power/pmic/lp873x.c | 1 +
drivers/power/pmic/lp87565.c | 1 +
drivers/power/pmic/max77686.c | 1 +
drivers/power/pmic/mc34708.c | 1 +
drivers/power/pmic/muic_max8997.c | 1 +
drivers/power/pmic/palmas.c | 1 +
drivers/power/pmic/pca9450.c | 1 +
drivers/power/pmic/pfuze100.c | 1 +
drivers/power/pmic/pm8916.c | 1 +
drivers/power/pmic/pmic-uclass.c | 1 +
drivers/power/pmic/pmic_hi6553.c | 1 +
drivers/power/pmic/pmic_ltc3676.c | 1 +
drivers/power/pmic/pmic_max77696.c | 1 +
drivers/power/pmic/pmic_max8997.c | 1 +
drivers/power/pmic/pmic_max8998.c | 1 +
drivers/power/pmic/pmic_mc34vr500.c | 1 +
drivers/power/pmic/pmic_pca9450.c | 1 +
drivers/power/pmic/pmic_pfuze100.c | 1 +
drivers/power/pmic/pmic_pfuze3000.c | 1 +
drivers/power/pmic/pmic_tps65910_dm.c | 1 +
drivers/power/pmic/rk8xx.c | 1 +
drivers/power/pmic/s2mps11.c | 1 +
drivers/power/pmic/s5m8767.c | 1 +
drivers/power/pmic/sandbox.c | 1 +
drivers/power/pmic/stpmic1.c | 1 +
drivers/power/pmic/tps65090.c | 1 +
drivers/power/pmic/tps65941.c | 1 +
drivers/power/power_core.c | 1 +
drivers/power/power_dialog.c | 1 +
drivers/power/power_fsl.c | 1 +
drivers/power/power_i2c.c | 1 +
drivers/power/power_spi.c | 1 +
drivers/power/regulator/act8846.c | 1 +
drivers/power/regulator/as3722_regulator.c | 1 +
drivers/power/regulator/bd71837.c | 1 +
drivers/power/regulator/da9063.c | 1 +
drivers/power/regulator/fan53555.c | 1 +
drivers/power/regulator/fixed.c | 1 +
drivers/power/regulator/gpio-regulator.c | 1 +
drivers/power/regulator/lp873x_regulator.c | 1 +
drivers/power/regulator/lp87565_regulator.c | 1 +
drivers/power/regulator/max77686.c | 1 +
drivers/power/regulator/palmas_regulator.c | 1 +
drivers/power/regulator/pbias_regulator.c | 1 +
drivers/power/regulator/pfuze100.c | 1 +
drivers/power/regulator/pwm_regulator.c | 1 +
drivers/power/regulator/regulator-uclass.c | 1 +
drivers/power/regulator/regulator_common.c | 1 +
drivers/power/regulator/rk8xx.c | 1 +
drivers/power/regulator/s2mps11_regulator.c | 1 +
drivers/power/regulator/s5m8767.c | 1 +
drivers/power/regulator/sandbox.c | 1 +
drivers/power/regulator/stm32-vrefbuf.c | 1 +
drivers/power/regulator/stpmic1.c | 1 +
drivers/power/regulator/tps62360_regulator.c | 1 +
drivers/power/regulator/tps65090_regulator.c | 1 +
drivers/power/regulator/tps65910_regulator.c | 1 +
drivers/power/regulator/tps65941_regulator.c | 1 +
drivers/power/tps6586x.c | 1 +
drivers/pwm/exynos_pwm.c | 1 +
drivers/pwm/pwm-mtk.c | 1 +
drivers/pwm/pwm-sifive.c | 1 +
drivers/pwm/pwm-uclass.c | 1 +
drivers/pwm/rk_pwm.c | 1 +
drivers/pwm/sandbox_pwm.c | 1 +
drivers/pwm/sunxi_pwm.c | 1 +
drivers/pwm/tegra_pwm.c | 1 +
drivers/ram/bmips_ram.c | 1 +
drivers/ram/imxrt_sdram.c | 1 +
drivers/ram/k3-am654-ddrss.c | 1 +
drivers/ram/k3-j721e/k3-j721e-ddrss.c | 1 +
drivers/ram/k3-j721e/lpddr4_sanity.h | 1 +
drivers/ram/mediatek/ddr3-mt7629.c | 1 +
drivers/ram/mpc83xx_sdram.c | 1 +
drivers/ram/ram-uclass.c | 1 +
drivers/ram/rockchip/dmc-rk3368.c | 1 +
drivers/ram/rockchip/sdram_rk3188.c | 1 +
drivers/ram/rockchip/sdram_rk322x.c | 1 +
drivers/ram/rockchip/sdram_rk3288.c | 1 +
drivers/ram/rockchip/sdram_rk3399.c | 1 +
drivers/ram/sifive/fu540_ddr.c | 1 +
drivers/ram/stm32_sdram.c | 1 +
drivers/ram/stm32mp1/stm32mp1_ddr.c | 1 +
drivers/ram/stm32mp1/stm32mp1_ram.c | 1 +
drivers/remoteproc/k3_system_controller.c | 1 +
drivers/remoteproc/rproc-elf-loader.c | 1 +
drivers/remoteproc/rproc-uclass.c | 1 +
drivers/remoteproc/sandbox_testproc.c | 1 +
drivers/remoteproc/stm32_copro.c | 1 +
drivers/remoteproc/ti_k3_arm64_rproc.c | 1 +
drivers/remoteproc/ti_k3_dsp_rproc.c | 1 +
drivers/remoteproc/ti_k3_r5f_rproc.c | 1 +
drivers/remoteproc/ti_power_proc.c | 1 +
drivers/reset/reset-bcm6345.c | 1 +
drivers/reset/reset-hisilicon.c | 1 +
drivers/reset/reset-hsdk.c | 1 +
drivers/reset/reset-imx7.c | 1 +
drivers/reset/reset-mediatek.c | 1 +
drivers/reset/reset-meson.c | 1 +
drivers/reset/reset-mtmips.c | 1 +
drivers/reset/reset-raspberrypi.c | 1 +
drivers/reset/reset-rockchip.c | 1 +
drivers/reset/reset-sunxi.c | 1 +
drivers/reset/reset-syscon.c | 1 +
drivers/reset/reset-ti-sci.c | 1 +
drivers/reset/reset-uclass.c | 1 +
drivers/reset/reset-uniphier.c | 1 +
drivers/reset/sandbox-reset.c | 1 +
drivers/reset/sti-reset.c | 1 +
drivers/reset/stm32-reset.c | 1 +
drivers/reset/tegra-car-reset.c | 1 +
drivers/rng/meson-rng.c | 1 +
drivers/rng/rng-uclass.c | 1 +
drivers/rng/rockchip_rng.c | 1 +
drivers/rng/stm32mp1_rng.c | 1 +
drivers/rtc/ds3231.c | 1 +
drivers/rtc/ds3232.c | 1 +
drivers/rtc/pl031.c | 1 +
drivers/rtc/rtc-uclass.c | 1 +
drivers/rtc/rv3029.c | 1 +
drivers/rtc/rx8010sj.c | 1 +
drivers/rtc/rx8025.c | 1 +
drivers/rtc/s35392a.c | 1 +
drivers/rtc/stm32_rtc.c | 1 +
drivers/scsi/scsi-uclass.c | 1 +
drivers/scsi/scsi.c | 1 +
drivers/serial/altera_jtag_uart.c | 1 +
drivers/serial/altera_uart.c | 1 +
drivers/serial/arm_dcc.c | 1 +
drivers/serial/atmel_usart.c | 1 +
drivers/serial/lpc32xx_hsuart.c | 1 +
drivers/serial/ns16550.c | 1 +
drivers/serial/sandbox.c | 1 +
drivers/serial/serial-uclass.c | 1 +
drivers/serial/serial.c | 1 +
drivers/serial/serial_ar933x.c | 1 +
drivers/serial/serial_bcm283x_mu.c | 1 +
drivers/serial/serial_bcm283x_pl011.c | 1 +
drivers/serial/serial_bcm6345.c | 1 +
drivers/serial/serial_cortina.c | 1 +
drivers/serial/serial_efi.c | 1 +
drivers/serial/serial_linflexuart.c | 1 +
drivers/serial/serial_lpuart.c | 1 +
drivers/serial/serial_mcf.c | 1 +
drivers/serial/serial_meson.c | 1 +
drivers/serial/serial_msm.c | 1 +
drivers/serial/serial_mtk.c | 1 +
drivers/serial/serial_mxc.c | 1 +
drivers/serial/serial_nulldev.c | 1 +
drivers/serial/serial_omap.c | 1 +
drivers/serial/serial_owl.c | 1 +
drivers/serial/serial_pic32.c | 1 +
drivers/serial/serial_pl01x.c | 1 +
drivers/serial/serial_pxa.c | 1 +
drivers/serial/serial_s5p.c | 1 +
drivers/serial/serial_sh.c | 1 +
drivers/serial/serial_sifive.c | 1 +
drivers/serial/serial_sti_asc.c | 1 +
drivers/serial/serial_stm32.c | 1 +
drivers/serial/serial_xuartlite.c | 1 +
drivers/serial/serial_zynq.c | 1 +
drivers/smem/msm_smem.c | 1 +
drivers/smem/smem-uclass.c | 1 +
drivers/soc/soc-uclass.c | 1 +
drivers/soc/soc_ti_k3.c | 1 +
drivers/soc/ti/k3-navss-ringacc.c | 1 +
drivers/soc/ti/keystone_serdes.c | 1 +
drivers/sound/broadwell_i2s.c | 1 +
drivers/sound/broadwell_sound.c | 1 +
drivers/sound/codec-uclass.c | 1 +
drivers/sound/da7219.c | 1 +
drivers/sound/hda_codec.c | 1 +
drivers/sound/i2s-uclass.c | 1 +
drivers/sound/max98088.c | 1 +
drivers/sound/max98090.c | 1 +
drivers/sound/max98095.c | 1 +
drivers/sound/max98357a.c | 1 +
drivers/sound/rockchip_i2s.c | 1 +
drivers/sound/rockchip_sound.c | 1 +
drivers/sound/rt5677.c | 1 +
drivers/sound/samsung-i2s.c | 1 +
drivers/sound/samsung_sound.c | 1 +
drivers/sound/sandbox.c | 1 +
drivers/sound/sound-uclass.c | 1 +
drivers/sound/tegra_ahub.c | 1 +
drivers/sound/tegra_i2s.c | 1 +
drivers/sound/tegra_sound.c | 1 +
drivers/sound/wm8994.c | 1 +
drivers/spi/atcspi200_spi.c | 1 +
drivers/spi/atmel-quadspi.c | 1 +
drivers/spi/atmel_spi.c | 1 +
drivers/spi/bcm63xx_hsspi.c | 1 +
drivers/spi/bcm63xx_spi.c | 1 +
drivers/spi/bcmstb_spi.c | 1 +
drivers/spi/cf_spi.c | 1 +
drivers/spi/davinci_spi.c | 1 +
drivers/spi/designware_spi.c | 1 +
drivers/spi/exynos_spi.c | 1 +
drivers/spi/fsl_dspi.c | 1 +
drivers/spi/fsl_espi.c | 1 +
drivers/spi/fsl_qspi.c | 1 +
drivers/spi/ich.c | 1 +
drivers/spi/meson_spifc.c | 1 +
drivers/spi/mpc8xx_spi.c | 1 +
drivers/spi/mpc8xxx_spi.c | 1 +
drivers/spi/mt7621_spi.c | 1 +
drivers/spi/mtk_snfi_spi.c | 1 +
drivers/spi/nxp_fspi.c | 1 +
drivers/spi/pic32_spi.c | 1 +
drivers/spi/pl022_spi.c | 1 +
drivers/spi/soft_spi.c | 1 +
drivers/spi/spi-mem-nodm.c | 1 +
drivers/spi/spi-sifive.c | 1 +
drivers/spi/spi-sunxi.c | 1 +
drivers/spi/spi-uclass.c | 1 +
drivers/spi/stm32_qspi.c | 1 +
drivers/spi/stm32_spi.c | 1 +
drivers/spi/tegra20_sflash.c | 1 +
drivers/spi/ti_qspi.c | 1 +
drivers/spi/uniphier_spi.c | 1 +
drivers/spi/zynq_qspi.c | 1 +
drivers/spi/zynqmp_gqspi.c | 1 +
drivers/spmi/spmi-msm.c | 1 +
drivers/spmi/spmi-sandbox.c | 1 +
drivers/spmi/spmi-uclass.c | 1 +
drivers/sysreset/sysreset-ti-sci.c | 1 +
drivers/sysreset/sysreset-uclass.c | 1 +
drivers/sysreset/sysreset_ast.c | 1 +
drivers/sysreset/sysreset_microblaze.c | 1 +
drivers/sysreset/sysreset_mpc83xx.c | 1 +
drivers/sysreset/sysreset_octeon.c | 1 +
drivers/sysreset/sysreset_rockchip.c | 1 +
drivers/sysreset/sysreset_sandbox.c | 1 +
drivers/sysreset/sysreset_socfpga.c | 1 +
drivers/sysreset/sysreset_socfpga_s10.c | 1 +
drivers/sysreset/sysreset_sti.c | 1 +
drivers/sysreset/sysreset_syscon.c | 1 +
drivers/sysreset/sysreset_watchdog.c | 1 +
drivers/sysreset/sysreset_x86.c | 1 +
drivers/sysreset/sysreset_xtfpga.c | 1 +
drivers/tee/broadcom/chimp_optee.c | 1 +
drivers/tee/optee/core.c | 1 +
drivers/tee/optee/supplicant.c | 1 +
drivers/tee/sandbox.c | 1 +
drivers/tee/tee-uclass.c | 1 +
drivers/thermal/imx_scu_thermal.c | 1 +
drivers/thermal/imx_thermal.c | 1 +
drivers/thermal/imx_tmu.c | 1 +
drivers/thermal/thermal-uclass.c | 1 +
drivers/timer/arc_timer.c | 1 +
drivers/timer/atmel_pit_timer.c | 1 +
drivers/timer/mpc83xx_timer.c | 1 +
drivers/timer/mtk_timer.c | 1 +
drivers/timer/nomadik-mtu-timer.c | 1 +
drivers/timer/rockchip_timer.c | 1 +
drivers/timer/sti-timer.c | 1 +
drivers/timer/stm32_timer.c | 1 +
drivers/timer/timer-uclass.c | 1 +
drivers/tpm/cr50_i2c.c | 1 +
drivers/tpm/tpm-uclass.c | 1 +
drivers/tpm/tpm2_ftpm_tee.c | 1 +
drivers/tpm/tpm2_tis_sandbox.c | 1 +
drivers/tpm/tpm_tis_lpc.c | 1 +
drivers/tpm/tpm_tis_sandbox.c | 1 +
drivers/tpm/tpm_tis_st33zp24_i2c.c | 1 +
drivers/tpm/tpm_tis_st33zp24_spi.c | 1 +
drivers/ufs/ufs.c | 1 +
drivers/usb/cdns3/cdns3-ti.c | 1 +
drivers/usb/cdns3/core.c | 1 +
drivers/usb/cdns3/drd.c | 1 +
drivers/usb/cdns3/ep0.c | 1 +
drivers/usb/cdns3/gadget-export.h | 1 +
drivers/usb/cdns3/gadget.c | 1 +
drivers/usb/cdns3/host-export.h | 1 +
drivers/usb/cdns3/host.c | 1 +
drivers/usb/common/fsl-dt-fixup.c | 1 +
drivers/usb/dwc3/core.c | 1 +
drivers/usb/dwc3/dwc3-generic.c | 1 +
drivers/usb/dwc3/dwc3-meson-g12a.c | 1 +
drivers/usb/dwc3/dwc3-omap.c | 1 +
drivers/usb/dwc3/ep0.c | 1 +
drivers/usb/dwc3/gadget.c | 1 +
drivers/usb/dwc3/ti_usb_phy.c | 1 +
drivers/usb/emul/sandbox_flash.c | 1 +
drivers/usb/emul/sandbox_hub.c | 1 +
drivers/usb/emul/sandbox_keyb.c | 1 +
drivers/usb/emul/usb-emul-uclass.c | 1 +
drivers/usb/eth/asix.c | 1 +
drivers/usb/eth/asix88179.c | 1 +
drivers/usb/eth/lan78xx.c | 1 +
drivers/usb/eth/lan7x.c | 1 +
drivers/usb/eth/mcs7830.c | 1 +
drivers/usb/eth/r8152.c | 1 +
drivers/usb/eth/r8152_fw.c | 1 +
drivers/usb/eth/smsc95xx.c | 1 +
drivers/usb/eth/usb_ether.c | 1 +
drivers/usb/gadget/composite.c | 1 +
drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c | 1 +
drivers/usb/gadget/f_dfu.c | 1 +
drivers/usb/gadget/f_fastboot.c | 1 +
drivers/usb/gadget/f_mass_storage.c | 1 +
drivers/usb/gadget/f_rockusb.c | 1 +
drivers/usb/gadget/f_sdp.c | 1 +
drivers/usb/gadget/f_thor.c | 1 +
drivers/usb/gadget/g_dnl.c | 1 +
drivers/usb/gadget/gadget_chips.h | 1 +
drivers/usb/gadget/pxa25x_udc.c | 1 +
drivers/usb/gadget/udc/udc-core.c | 1 +
drivers/usb/gadget/udc/udc-uclass.c | 1 +
drivers/usb/host/dwc2.c | 1 +
drivers/usb/host/dwc3-of-simple.c | 1 +
drivers/usb/host/dwc3-sti-glue.c | 1 +
drivers/usb/host/ehci-atmel.c | 1 +
drivers/usb/host/ehci-fsl.c | 1 +
drivers/usb/host/ehci-generic.c | 1 +
drivers/usb/host/ehci-hcd.c | 1 +
drivers/usb/host/ehci-marvell.c | 1 +
drivers/usb/host/ehci-msm.c | 1 +
drivers/usb/host/ehci-mx5.c | 1 +
drivers/usb/host/ehci-mx6.c | 1 +
drivers/usb/host/ehci-mxc.c | 1 +
drivers/usb/host/ehci-mxs.c | 1 +
drivers/usb/host/ehci-omap.c | 1 +
drivers/usb/host/ehci-vf.c | 1 +
drivers/usb/host/ehci-zynq.c | 1 +
drivers/usb/host/ohci-da8xx.c | 1 +
drivers/usb/host/ohci-generic.c | 1 +
drivers/usb/host/ohci-hcd.c | 1 +
drivers/usb/host/r8a66597-hcd.c | 1 +
drivers/usb/host/usb-uclass.c | 1 +
drivers/usb/host/xhci-brcm.c | 1 +
drivers/usb/host/xhci-dwc3.c | 1 +
drivers/usb/host/xhci-mvebu.c | 1 +
drivers/usb/host/xhci-rcar.c | 1 +
drivers/usb/musb-new/am35x.c | 1 +
drivers/usb/musb-new/da8xx.c | 1 +
drivers/usb/musb-new/mt85xx.c | 1 +
drivers/usb/musb-new/musb_dsps.c | 1 +
drivers/usb/musb-new/musb_gadget.c | 1 +
drivers/usb/musb-new/musb_gadget_ep0.c | 1 +
drivers/usb/musb-new/omap2430.c | 1 +
drivers/usb/musb-new/pic32.c | 1 +
drivers/usb/musb-new/sunxi.c | 1 +
drivers/usb/musb-new/ti-musb.c | 1 +
drivers/video/am335x-fb.c | 1 +
drivers/video/atmel_hlcdfb.c | 1 +
drivers/video/atmel_lcdfb.c | 1 +
drivers/video/backlight-uclass.c | 1 +
drivers/video/bcm2835.c | 1 +
drivers/video/bridge/anx6345.c | 1 +
drivers/video/bridge/ps862x.c | 1 +
drivers/video/bridge/video-bridge-uclass.c | 1 +
drivers/video/broadwell_igd.c | 1 +
drivers/video/console_normal.c | 1 +
drivers/video/console_rotate.c | 1 +
drivers/video/console_truetype.c | 1 +
drivers/video/coreboot.c | 1 +
drivers/video/display-uclass.c | 1 +
drivers/video/dsi-host-uclass.c | 1 +
drivers/video/dw_mipi_dsi.c | 1 +
drivers/video/efi.c | 1 +
drivers/video/exynos/exynos_dp.c | 1 +
drivers/video/exynos/exynos_dp_lowlevel.c | 1 +
drivers/video/exynos/exynos_mipi_dsi.c | 1 +
drivers/video/exynos/exynos_mipi_dsi_common.c | 1 +
drivers/video/fsl_dcu_fb.c | 1 +
drivers/video/hitachi_tx18d42vm_lcd.c | 1 +
drivers/video/ihs_video_out.c | 1 +
drivers/video/ivybridge_igd.c | 1 +
drivers/video/lg4573.c | 1 +
drivers/video/logicore_dp_tx.c | 1 +
drivers/video/mali_dp.c | 1 +
drivers/video/meson/meson_dw_hdmi.c | 1 +
drivers/video/meson/meson_vpu.c | 1 +
drivers/video/mipi_dsi.c | 1 +
drivers/video/mvebu_lcd.c | 1 +
drivers/video/nexell/s5pxx18_dp.c | 1 +
drivers/video/nexell/s5pxx18_dp_hdmi.c | 1 +
drivers/video/nexell/s5pxx18_dp_lvds.c | 1 +
drivers/video/nexell/s5pxx18_dp_mipi.c | 1 +
drivers/video/nexell_display.c | 1 +
drivers/video/orisetech_otm8009a.c | 1 +
drivers/video/panel-uclass.c | 1 +
drivers/video/pwm_backlight.c | 1 +
drivers/video/raydium-rm68200.c | 1 +
drivers/video/rockchip/rk3288_mipi.c | 1 +
drivers/video/rockchip/rk3399_mipi.c | 1 +
drivers/video/rockchip/rk_edp.c | 1 +
drivers/video/rockchip/rk_lvds.c | 1 +
drivers/video/rockchip/rk_mipi.c | 1 +
drivers/video/rockchip/rk_vop.c | 1 +
drivers/video/sandbox_osd.c | 1 +
drivers/video/simple_panel.c | 1 +
drivers/video/simplefb.c | 1 +
drivers/video/stm32/stm32_dsi.c | 1 +
drivers/video/stm32/stm32_ltdc.c | 1 +
drivers/video/sunxi/sunxi_de2.c | 1 +
drivers/video/sunxi/sunxi_display.c | 1 +
drivers/video/sunxi/sunxi_lcd.c | 1 +
drivers/video/tda19988.c | 1 +
drivers/video/tegra.c | 1 +
drivers/video/tegra124/display.c | 1 +
drivers/video/tegra124/dp.c | 1 +
drivers/video/tegra124/sor.c | 1 +
drivers/video/vidconsole-uclass.c | 1 +
drivers/video/video-uclass.c | 1 +
drivers/video/video_bmp.c | 1 +
drivers/video/videomodes.c | 1 +
drivers/virtio/virtio-uclass.c | 1 +
drivers/virtio/virtio_blk.c | 1 +
drivers/virtio/virtio_mmio.c | 1 +
drivers/virtio/virtio_net.c | 1 +
drivers/virtio/virtio_pci_legacy.c | 1 +
drivers/virtio/virtio_pci_modern.c | 1 +
drivers/virtio/virtio_ring.c | 1 +
drivers/virtio/virtio_sandbox.c | 1 +
drivers/w1-eeprom/ds2502.c | 1 +
drivers/w1-eeprom/w1-eeprom-uclass.c | 1 +
drivers/w1/mxc_w1.c | 1 +
drivers/w1/w1-uclass.c | 1 +
drivers/watchdog/armada-37xx-wdt.c | 1 +
drivers/watchdog/at91sam9_wdt.c | 1 +
drivers/watchdog/bcm6345_wdt.c | 1 +
drivers/watchdog/cortina_wdt.c | 1 +
drivers/watchdog/designware_wdt.c | 1 +
drivers/watchdog/imx_watchdog.c | 1 +
drivers/watchdog/mpc8xx_wdt.c | 1 +
drivers/watchdog/mt7621_wdt.c | 1 +
drivers/watchdog/mtk_wdt.c | 1 +
drivers/watchdog/omap_wdt.c | 1 +
drivers/watchdog/orion_wdt.c | 1 +
drivers/watchdog/stm32mp_wdt.c | 1 +
drivers/watchdog/wdt-uclass.c | 1 +
drivers/watchdog/xilinx_tb_wdt.c | 1 +
drivers/watchdog/xilinx_wwdt.c | 1 +
env/common.c | 1 +
env/env.c | 1 +
env/ext4.c | 1 +
env/fat.c | 1 +
env/mmc.c | 1 +
env/nand.c | 1 +
env/remote.c | 1 +
env/sata.c | 1 +
env/sf.c | 1 +
env/ubi.c | 1 +
fs/btrfs/btrfs.c | 1 +
fs/cbfs/cbfs.c | 1 +
fs/ext4/ext4_common.c | 1 +
fs/ext4/ext4_journal.c | 1 +
fs/ext4/ext4_write.c | 1 +
fs/ext4/ext4fs.c | 1 +
fs/fat/fat.c | 1 +
fs/fat/fat_write.c | 1 +
fs/fs.c | 1 +
fs/ubifs/debug.c | 1 +
fs/ubifs/io.c | 1 +
fs/ubifs/log.c | 1 +
fs/ubifs/lprops.c | 1 +
fs/ubifs/lpt_commit.c | 1 +
fs/ubifs/orphan.c | 1 +
fs/ubifs/recovery.c | 1 +
fs/ubifs/replay.c | 1 +
fs/ubifs/scan.c | 1 +
fs/ubifs/super.c | 1 +
fs/ubifs/tnc.c | 1 +
fs/ubifs/tnc_misc.c | 1 +
fs/ubifs/ubifs.c | 1 +
fs/yaffs2/yaffs_uboot_glue.c | 1 +
fs/yaffs2/yaffsfs.c | 1 +
fs/yaffs2/yportenv.h | 1 +
include/acpi/acpi_s3.h | 1 +
include/board.h | 1 +
include/common.h | 1 -
include/dfu.h | 1 +
include/dm/pinctrl.h | 1 +
include/dwc3-uboot.h | 1 +
include/eeprom.h | 1 +
include/hwspinlock.h | 1 +
include/linux/soc/ti/ti_sci_protocol.h | 1 +
include/mipi_dsi.h | 1 +
include/power-domain.h | 1 +
include/power/sandbox_pmic.h | 1 +
include/regmap.h | 1 +
include/remoteproc.h | 1 +
include/soc.h | 1 +
include/spi_flash.h | 1 +
include/splash.h | 1 +
include/tlv_eeprom.h | 1 +
include/u-boot/aes.h | 1 +
include/u-boot/rsa.h | 1 +
lib/acpi/acpi_device.c | 1 +
lib/acpi/acpi_dp.c | 1 +
lib/acpi/acpi_table.c | 1 +
lib/acpi/acpigen.c | 1 +
lib/aes/aes-decrypt.c | 1 +
lib/bch.c | 1 +
lib/binman.c | 1 +
lib/crypto/asymmetric_type.c | 1 +
lib/crypto/pkcs7_parser.c | 1 +
lib/crypto/pkcs7_verify.c | 1 +
lib/crypto/public_key.c | 1 +
lib/crypto/rsa_helper.c | 1 +
lib/crypto/x509_cert_parser.c | 1 +
lib/efi/efi_app.c | 1 +
lib/efi/efi_info.c | 1 +
lib/efi/efi_stub.c | 1 +
lib/efi_driver/efi_block_device.c | 1 +
lib/efi_loader/efi_variable_tee.c | 1 +
lib/errno_str.c | 1 +
lib/fdtdec.c | 1 +
lib/list_sort.c | 1 +
lib/lz4_wrapper.c | 1 +
lib/membuff.c | 1 +
lib/of_live.c | 1 +
lib/optee/optee.c | 1 +
lib/rsa/rsa-keyprop.c | 1 +
lib/strto.c | 1 +
lib/trace.c | 1 +
lib/uuid.c | 1 +
lib/vsprintf.c | 1 +
net/eth-uclass.c | 1 +
net/mdio-mux-uclass.c | 1 +
net/mdio-uclass.c | 1 +
net/net.c | 1 +
net/pcap.c | 1 +
test/bloblist.c | 1 +
test/dm/acpi.c | 1 +
test/dm/acpi_dp.c | 1 +
test/dm/acpigen.c | 1 +
test/dm/adc.c | 1 +
test/dm/blk.c | 1 +
test/dm/bus.c | 1 +
test/dm/button.c | 1 +
test/dm/core.c | 1 +
test/dm/eth.c | 1 +
test/dm/gpio.c | 1 +
test/dm/i2c.c | 1 +
test/dm/irq.c | 1 +
test/dm/k210_pll.c | 1 +
test/dm/led.c | 1 +
test/dm/mailbox.c | 1 +
test/dm/nop.c | 1 +
test/dm/pch.c | 1 +
test/dm/phy.c | 1 +
test/dm/pwm.c | 1 +
test/dm/regmap.c | 1 +
test/dm/regulator.c | 1 +
test/dm/remoteproc.c | 1 +
test/dm/rtc.c | 1 +
test/dm/serial.c | 1 +
test/dm/sound.c | 1 +
test/dm/spi.c | 1 +
test/dm/syscon-reset.c | 1 +
test/dm/syscon.c | 1 +
test/dm/sysreset.c | 1 +
test/dm/tee.c | 1 +
test/dm/test-driver.c | 1 +
test/dm/test-fdt.c | 1 +
test/dm/test-uclass.c | 1 +
test/dm/usb.c | 1 +
test/dm/video.c | 1 +
test/dm/virtio.c | 1 +
test/env/attr.c | 1 +
test/lib/test_errno_str.c | 1 +
test/optee/cmd_ut_optee.c | 1 +
test/overlay/cmd_ut_overlay.c | 1 +
test/time_ut.c | 1 +
1549 files changed, 1555 insertions(+), 9 deletions(-)
diff --git a/arch/arm/cpu/arm926ejs/mx25/generic.c b/arch/arm/cpu/arm926ejs/mx25/generic.c
index e9ebda4317c9..8b74650b3647 100644
--- a/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -22,6 +22,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#ifdef CONFIG_FSL_ESDHC_IMX
#include <fsl_esdhc_imx.h>
diff --git a/arch/arm/cpu/armv7/s5p-common/pwm.c b/arch/arm/cpu/armv7/s5p-common/pwm.c
index aef2e5574b41..67c9208084db 100644
--- a/arch/arm/cpu/armv7/s5p-common/pwm.c
+++ b/arch/arm/cpu/armv7/s5p-common/pwm.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/arch/pwm.h>
#include <asm/arch/clk.h>
+#include <linux/errno.h>
int pwm_enable(int pwm_id)
{
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 297a3d2378a9..93418ce9a8c5 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -23,6 +23,7 @@
#include <fsl_esdhc_imx.h>
#endif
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef CONFIG_FSL_ESDHC_IMX
diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
index 61c82f64699c..d4818bf75fc3 100644
--- a/arch/arm/cpu/armv7/virt-dt.c
+++ b/arch/arm/cpu/armv7/virt-dt.c
@@ -20,6 +20,7 @@
#include <log.h>
#include <stdio_dev.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include <asm/global_data.h>
#include <linux/libfdt.h>
diff --git a/arch/arm/cpu/armv7m/cache.c b/arch/arm/cpu/armv7m/cache.c
index f87e1d393676..abed2e36df44 100644
--- a/arch/arm/cpu/armv7m/cache.c
+++ b/arch/arm/cpu/armv7m/cache.c
@@ -13,6 +13,7 @@
#include <asm/cache.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* Cache maintenance operation registers */
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index 0d458d0273ef..60f2a4b002d4 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -24,6 +24,7 @@
#ifdef CONFIG_CHAIN_OF_TRUST
#include <fsl_validate.h>
#endif
+#include <linux/errno.h>
#ifdef CONFIG_SYS_LS_PPA_FW_IN_NAND
#include <nand.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 340206d90952..aaf0bb6440c8 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -13,6 +13,7 @@
#include <init.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <log.h>
#include <asm/arch/fsl_serdes.h>
diff --git a/arch/arm/cpu/armv8/s32v234/generic.c b/arch/arm/cpu/armv8/s32v234/generic.c
index 59900958cd20..575dbb1f6098 100644
--- a/arch/arm/cpu/armv8/s32v234/generic.c
+++ b/arch/arm/cpu/armv8/s32v234/generic.c
@@ -20,6 +20,7 @@
#include <div64.h>
#include <errno.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
u32 get_cpu_rev(void)
{
diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 8f7eef0d4c0e..1b273db4f988 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -13,6 +13,7 @@
#include <asm/cache.h>
#include <asm/global_data.h>
#include <asm/ptrace.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/system.h>
diff --git a/arch/arm/cpu/armv8/spin_table.c b/arch/arm/cpu/armv8/spin_table.c
index f687b54d0e19..49e1903a29f0 100644
--- a/arch/arm/cpu/armv8/spin_table.c
+++ b/arch/arm/cpu/armv8/spin_table.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/spin_table.h>
#include <linux/string.h>
diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
index 582c1fcaa7a7..ff56c3a82be1 100644
--- a/arch/arm/cpu/pxa/cpuinfo.c
+++ b/arch/arm/cpu/pxa/cpuinfo.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <errno.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
#ifdef CONFIG_CPU_PXA25X
#if ((CONFIG_SYS_INIT_SP_ADDR) != 0xfffff800)
diff --git a/arch/arm/include/asm/arch-tegra/cboot.h b/arch/arm/include/asm/arch-tegra/cboot.h
index 4e1da98d1f21..d89e784f2d26 100644
--- a/arch/arm/include/asm/arch-tegra/cboot.h
+++ b/arch/arm/include/asm/arch-tegra/cboot.h
@@ -7,6 +7,7 @@
#define _TEGRA_CBOOT_H_
#include <net.h>
+#include <linux/errno.h>
#ifdef CONFIG_ARM64
diff --git a/arch/arm/lib/gic-v3-its.c b/arch/arm/lib/gic-v3-its.c
index 6cdcd1ed60cf..45c8ae093507 100644
--- a/arch/arm/lib/gic-v3-its.c
+++ b/arch/arm/lib/gic-v3-its.c
@@ -10,6 +10,7 @@
#include <asm/gic-v3.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/sizes.h>
diff --git a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
index cfb0374d60c8..9eefeef5fb33 100644
--- a/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
+++ b/arch/arm/mach-aspeed/ast2500/sdram_ast2500.c
@@ -19,6 +19,7 @@
#include <asm/arch/sdram_ast2500.h>
#include <asm/arch/wdt.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <dt-bindings/clock/ast2500-scu.h>
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index ac43d51e64d4..3c3eac9025b0 100644
--- a/arch/arm/mach-bcm283x/msg.c
+++ b/arch/arm/mach-bcm283x/msg.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <asm/arch/mbox.h>
#include <linux/delay.h>
+#include <linux/errno.h>
struct msg_set_power_state {
struct bcm2835_mbox_hdr hdr;
diff --git a/arch/arm/mach-imx/cmd_nandbcb.c b/arch/arm/mach-imx/cmd_nandbcb.c
index 2b7affaaccdf..beb538677d95 100644
--- a/arch/arm/mach-imx/cmd_nandbcb.c
+++ b/arch/arm/mach-imx/cmd_nandbcb.c
@@ -20,6 +20,7 @@
#include <vsprintf.h>
#include <dm/devres.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <asm/io.h>
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index 1d92c07be246..fb1d067f9c56 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -18,6 +18,7 @@
#include <asm/arch/image.h>
#include <console.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx8/cpu.c b/arch/arm/mach-imx/imx8/cpu.c
index b9cbdc64164d..8ae43f00bcb8 100644
--- a/arch/arm/mach-imx/imx8/cpu.c
+++ b/arch/arm/mach-imx/imx8/cpu.c
@@ -27,6 +27,7 @@
#include <asm/setup.h>
#include <asm/mach-imx/boot_mode.h>
#include <spl.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx8/fdt.c b/arch/arm/mach-imx/imx8/fdt.c
index 0fd0c4bca097..239adfc2e5cd 100644
--- a/arch/arm/mach-imx/imx8/fdt.c
+++ b/arch/arm/mach-imx/imx8/fdt.c
@@ -12,6 +12,7 @@
#include <asm/u-boot.h>
#include <dm/ofnode.h>
#include <fdt_support.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/arch/arm/mach-imx/imx8/image.c b/arch/arm/mach-imx/imx8/image.c
index 9b4fc6f09059..528a42a5996e 100644
--- a/arch/arm/mach-imx/imx8/image.c
+++ b/arch/arm/mach-imx/imx8/image.c
@@ -15,6 +15,7 @@
#include <asm/arch/image.h>
#include <asm/arch/sys_proto.h>
#include <asm/mach-imx/boot_mode.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define MMC_DEV 0
diff --git a/arch/arm/mach-imx/imx8/parse-container.c b/arch/arm/mach-imx/imx8/parse-container.c
index 3a1c8c7a5e5f..6a3a4eaa7c79 100644
--- a/arch/arm/mach-imx/imx8/parse-container.c
+++ b/arch/arm/mach-imx/imx8/parse-container.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <asm/arch/image.h>
#include <asm/arch/sci/sci.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define SEC_SECURE_RAM_BASE 0x31800000UL
diff --git a/arch/arm/mach-imx/imx8/snvs_security_sc.c b/arch/arm/mach-imx/imx8/snvs_security_sc.c
index 6bb067e08bdd..391d2d0e4b17 100644
--- a/arch/arm/mach-imx/imx8/snvs_security_sc.c
+++ b/arch/arm/mach-imx/imx8/snvs_security_sc.c
@@ -21,6 +21,7 @@
#include <asm/arch-imx8/imx8-pins.h>
#include <asm/arch-imx8/snvs_security_sc.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
/* Access to gd */
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index ff3943e5106c..170e6c20853a 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mq.c b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
index 444e9b7feee4..0c74f99f440f 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mq.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mq.c
@@ -14,6 +14,7 @@
#include <asm/arch/sys_proto.h>
#include <errno.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
static struct anamix_pll *ana_pll = (struct anamix_pll *)ANATOP_BASE_ADDR;
diff --git a/arch/arm/mach-imx/imx8m/clock_slice.c b/arch/arm/mach-imx/imx8m/clock_slice.c
index b5ed27a923e0..ad0d553c1cf7 100644
--- a/arch/arm/mach-imx/imx8m/clock_slice.c
+++ b/arch/arm/mach-imx/imx8m/clock_slice.c
@@ -10,6 +10,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
#include <errno.h>
+#include <linux/errno.h>
static struct ccm_reg *ccm_reg = (struct ccm_reg *)CCM_BASE_ADDR;
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index 12f644e69ee7..4e3d12f9b3c7 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -32,6 +32,7 @@
#include <imx_sip.h>
#include <linux/arm-smccc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index c94da85bf760..02fa1d7b62b2 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -15,6 +15,7 @@
#include <linux/arm-smccc.h>
#include <linux/compiler.h>
#include <cpu_func.h>
+#include <linux/errno.h>
int arch_auxiliary_core_up(u32 core_id, ulong addr)
{
diff --git a/arch/arm/mach-imx/mx7ulp/clock.c b/arch/arm/mach-imx/mx7ulp/clock.c
index 10390a74165b..c7dfa798b454 100644
--- a/arch/arm/mach-imx/mx7ulp/clock.c
+++ b/arch/arm/mach-imx/mx7ulp/clock.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-imx/mx7ulp/pcc.c b/arch/arm/mach-imx/mx7ulp/pcc.c
index a70131dfa3b3..1fd8b0a540f7 100644
--- a/arch/arm/mach-imx/mx7ulp/pcc.c
+++ b/arch/arm/mach-imx/mx7ulp/pcc.c
@@ -12,6 +12,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/pcc.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
#define PCC_CLKSRC_TYPES 2
#define PCC_CLKSRC_NUM 7
diff --git a/arch/arm/mach-imx/mx7ulp/scg.c b/arch/arm/mach-imx/mx7ulp/scg.c
index 6c24ec2d819a..58bc3df1e78f 100644
--- a/arch/arm/mach-imx/mx7ulp/scg.c
+++ b/arch/arm/mach-imx/mx7ulp/scg.c
@@ -13,6 +13,7 @@
#include <asm/arch/pcc.h>
#include <asm/arch/sys_proto.h>
#include <linux/delay.h>
+#include <linux/errno.h>
scg_p scg1_regs = (scg_p)SCG1_RBASE;
diff --git a/arch/arm/mach-ipq40xx/clock-ipq4019.c b/arch/arm/mach-ipq40xx/clock-ipq4019.c
index 7cf98a203c2f..dae070f0ed62 100644
--- a/arch/arm/mach-ipq40xx/clock-ipq4019.c
+++ b/arch/arm/mach-ipq40xx/clock-ipq4019.c
@@ -12,6 +12,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <errno.h>
+#include <linux/errno.h>
struct msm_clk_priv {
phys_addr_t base;
diff --git a/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c b/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c
index 64b8b049fa15..08001da66f1b 100644
--- a/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c
+++ b/arch/arm/mach-ipq40xx/pinctrl-snapdragon.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-snapdragon.h"
struct msm_pinctrl_priv {
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index ecc3a6711802..3e76b26dc756 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -16,6 +16,7 @@
#include <vsprintf.h>
#include <asm/cache.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <g_dnl.h>
#include <usb.h>
diff --git a/arch/arm/mach-keystone/cmd_mon.c b/arch/arm/mach-keystone/cmd_mon.c
index e98df01e89f7..5887a89ff114 100644
--- a/arch/arm/mach-keystone/cmd_mon.c
+++ b/arch/arm/mach-keystone/cmd_mon.c
@@ -11,6 +11,7 @@
#include <image.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <mach/mon.h>
asm(".arch_extension sec\n\t");
diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
index a8d0254d5766..cdae5f987708 100644
--- a/arch/arm/mach-meson/board-common.c
+++ b/arch/arm/mach-meson/board-common.c
@@ -14,6 +14,7 @@
#include <asm/global_data.h>
#include <asm/ptrace.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/err.h>
#include <asm/arch/mem.h>
diff --git a/arch/arm/mach-meson/board-g12a.c b/arch/arm/mach-meson/board-g12a.c
index b698298e13e6..cdaed763b426 100644
--- a/arch/arm/mach-meson/board-g12a.c
+++ b/arch/arm/mach-meson/board-g12a.c
@@ -17,6 +17,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/armv8/mmu.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <usb.h>
#include <linux/usb/otg.h>
diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c
index ec2f1c07314f..b38811fb9510 100644
--- a/arch/arm/mach-meson/board-gx.c
+++ b/arch/arm/mach-meson/board-gx.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/armv8/mmu.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/sizes.h>
#include <usb.h>
diff --git a/arch/arm/mach-meson/sm.c b/arch/arm/mach-meson/sm.c
index f4f54fafce96..62feaccfce05 100644
--- a/arch/arm/mach-meson/sm.c
+++ b/arch/arm/mach-meson/sm.c
@@ -17,6 +17,7 @@
#include <asm/ptrace.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <dm.h>
#include <linux/bitfield.h>
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index fa687d8abbbd..aecdbb86a9d7 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -10,6 +10,7 @@
#include <asm/cache.h>
#include <asm/global_data.h>
#include <asm/ptrace.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
#include <pci.h>
diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c
index 2551c69d1959..b98f78fde3b7 100644
--- a/arch/arm/mach-mvebu/armada3700/cpu.c
+++ b/arch/arm/mach-mvebu/armada3700/cpu.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/io.h>
#include <asm/system.h>
diff --git a/arch/arm/mach-mvebu/efuse.c b/arch/arm/mach-mvebu/efuse.c
index c79eee98fe98..8ada3cf93e72 100644
--- a/arch/arm/mach-mvebu/efuse.c
+++ b/arch/arm/mach-mvebu/efuse.c
@@ -12,6 +12,7 @@
#include <asm/arch/soc.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mbus.h>
#if defined(CONFIG_MVEBU_EFUSE_FAKE)
diff --git a/arch/arm/mach-nexell/clock.c b/arch/arm/mach-nexell/clock.c
index 0fac5efc2a72..38f6b1fc9010 100644
--- a/arch/arm/mach-nexell/clock.c
+++ b/arch/arm/mach-nexell/clock.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/arch/nexell.h>
#include <asm/arch/clk.h>
+#include <linux/errno.h>
/*
* clock generator macros
diff --git a/arch/arm/mach-omap2/sec-common.c b/arch/arm/mach-omap2/sec-common.c
index f96d1379bb3b..f24e0ad6366d 100644
--- a/arch/arm/mach-omap2/sec-common.c
+++ b/arch/arm/mach-omap2/sec-common.c
@@ -21,6 +21,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c
index fa7adacd5953..aaa7127d1abd 100644
--- a/arch/arm/mach-rockchip/board.c
+++ b/arch/arm/mach-rockchip/board.c
@@ -18,6 +18,7 @@
#include <asm/arch-rockchip/clock.h>
#include <asm/arch-rockchip/periph.h>
#include <asm/arch-rockchip/misc.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/arch/arm/mach-rockchip/boot_mode.c b/arch/arm/mach-rockchip/boot_mode.c
index fefffc71ffaf..20d44d424be7 100644
--- a/arch/arm/mach-rockchip/boot_mode.c
+++ b/arch/arm/mach-rockchip/boot_mode.c
@@ -13,6 +13,7 @@
#include <asm/arch-rockchip/boot_mode.h>
#include <dm/device.h>
#include <dm/uclass.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index ddc4081dbb47..57ea84a9346e 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -9,6 +9,7 @@
#include <mmc.h>
#include <spl.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#if CONFIG_IS_ENABLED(OF_LIBFDT)
diff --git a/arch/arm/mach-snapdragon/clock-snapdragon.c b/arch/arm/mach-snapdragon/clock-snapdragon.c
index 69d65c82e3ec..78e30ea5bab6 100644
--- a/arch/arm/mach-snapdragon/clock-snapdragon.c
+++ b/arch/arm/mach-snapdragon/clock-snapdragon.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "clock-snapdragon.h"
/* CBCR register fields */
diff --git a/arch/arm/mach-snapdragon/dram.c b/arch/arm/mach-snapdragon/dram.c
index c3e61007417a..df7148fee11e 100644
--- a/arch/arm/mach-snapdragon/dram.c
+++ b/arch/arm/mach-snapdragon/dram.c
@@ -14,6 +14,7 @@
#include <fdt_support.h>
#include <stdio.h>
#include <asm/arch/dram.h>
+#include <linux/errno.h>
#define SMEM_USABLE_RAM_PARTITION_TABLE 402
#define RAM_PART_NAME_LENGTH 16
diff --git a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
index 4c2af213082b..b1c075a44ac7 100644
--- a/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
+++ b/arch/arm/mach-snapdragon/pinctrl-snapdragon.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-snapdragon.h"
struct msm_pinctrl_priv {
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index a3733207d6ab..d8cfe2ce66d4 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -15,6 +15,7 @@
#include <asm/arch/misc.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <usb.h>
#include <usb/dwc2_udc.h>
diff --git a/arch/arm/mach-socfpga/clock_manager_agilex.c b/arch/arm/mach-socfpga/clock_manager_agilex.c
index 0582b0b08573..9c229de4b92f 100644
--- a/arch/arm/mach-socfpga/clock_manager_agilex.c
+++ b/arch/arm/mach-socfpga/clock_manager_agilex.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dt-bindings/clock/agilex-clock.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-socfpga/clock_manager_arria10.c b/arch/arm/mach-socfpga/clock_manager_arria10.c
index 9379005444dc..82c90fb526c1 100644
--- a/arch/arm/mach-socfpga/clock_manager_arria10.c
+++ b/arch/arm/mach-socfpga/clock_manager_arria10.c
@@ -13,6 +13,7 @@
#include <dm/device-internal.h>
#include <asm/arch/clock_manager.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef CONFIG_SPL_BUILD
diff --git a/arch/arm/mach-socfpga/mailbox_s10.c b/arch/arm/mach-socfpga/mailbox_s10.c
index 58d94694b7ed..85df32968d85 100644
--- a/arch/arm/mach-socfpga/mailbox_s10.c
+++ b/arch/arm/mach-socfpga/mailbox_s10.c
@@ -13,6 +13,7 @@
#include <asm/arch/mailbox_s10.h>
#include <asm/arch/system_manager.h>
#include <asm/secure.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-socfpga/misc.c b/arch/arm/mach-socfpga/misc.c
index ae84d2a22579..8bb924b6b5dd 100644
--- a/arch/arm/mach-socfpga/misc.c
+++ b/arch/arm/mach-socfpga/misc.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <errno.h>
#include <fdtdec.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <altera.h>
#include <miiphy.h>
diff --git a/arch/arm/mach-socfpga/misc_gen5.c b/arch/arm/mach-socfpga/misc_gen5.c
index eed510d66e7d..22f113048149 100644
--- a/arch/arm/mach-socfpga/misc_gen5.c
+++ b/arch/arm/mach-socfpga/misc_gen5.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <altera.h>
#include <miiphy.h>
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index cf5c918fe54a..0addd436c2ba 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -21,6 +21,7 @@
#include <asm/arch/system_manager.h>
#include <asm/arch/misc.h>
#include <asm/pl310.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/arch/mailbox_s10.h>
#include <linux/string.h>
diff --git a/arch/arm/mach-socfpga/pinmux_arria10.c b/arch/arm/mach-socfpga/pinmux_arria10.c
index a38b19c395e2..aee51c039c9c 100644
--- a/arch/arm/mach-socfpga/pinmux_arria10.c
+++ b/arch/arm/mach-socfpga/pinmux_arria10.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <common.h>
#include <fdtdec.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int do_pinctr_pin(const void *blob, int child, const char *node_name)
diff --git a/arch/arm/mach-socfpga/scan_manager.c b/arch/arm/mach-socfpga/scan_manager.c
index 36d6880141ea..d5601739ef68 100644
--- a/arch/arm/mach-socfpga/scan_manager.c
+++ b/arch/arm/mach-socfpga/scan_manager.c
@@ -10,6 +10,7 @@
#include <asm/arch/scan_manager.h>
#include <asm/arch/system_manager.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/*
* Maximum polling loop to wait for IO scan chain engine becomes idle
diff --git a/arch/arm/mach-socfpga/wrap_iocsr_config.c b/arch/arm/mach-socfpga/wrap_iocsr_config.c
index f810fade92a9..01864be5edbb 100644
--- a/arch/arm/mach-socfpga/wrap_iocsr_config.c
+++ b/arch/arm/mach-socfpga/wrap_iocsr_config.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
#include <asm/arch/clock_manager.h>
+#include <linux/errno.h>
/* Board-specific header. */
#include <qts/iocsr_config.h>
diff --git a/arch/arm/mach-stm32mp/bsec.c b/arch/arm/mach-stm32mp/bsec.c
index 566961ae3914..d41382409c30 100644
--- a/arch/arm/mach-stm32mp/bsec.c
+++ b/arch/arm/mach-stm32mp/bsec.c
@@ -11,6 +11,7 @@
#include <asm/arch/bsec.h>
#include <asm/arch/stm32mp1_smc.h>
#include <linux/arm-smccc.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
index c2cbfe7e48b6..0589cfcb31c7 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <dm/uclass.h>
#include <jffs2/load_kernel.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <linux/list_sort.h>
#include <linux/mtd/mtd.h>
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
index 14bd4cc27d6e..be3eb230f1e9 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_serial.c
@@ -16,6 +16,7 @@
#include <dm/lists.h>
#include <dm/device-internal.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "stm32prog.h"
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
index 616f556ab90c..15ca72043a33 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
@@ -11,6 +11,7 @@
#include <vsprintf.h>
#include <asm/arch/stm32prog.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "stm32prog.h"
diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c
index 80d7d5790a85..8dcf4d4f8531 100644
--- a/arch/arm/mach-stm32mp/cpu.c
+++ b/arch/arm/mach-stm32mp/cpu.c
@@ -21,6 +21,7 @@
#include <dm/device.h>
#include <dm/uclass.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/* RCC register */
diff --git a/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h b/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h
index 1b2bba3d34c2..fbc082703dc2 100644
--- a/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h
+++ b/arch/arm/mach-stm32mp/include/mach/stm32mp1_smc.h
@@ -7,6 +7,7 @@
#define __STM32MP1_SMC_H__
#include <linux/arm-smccc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/*
diff --git a/arch/arm/mach-stm32mp/pwr_regulator.c b/arch/arm/mach-stm32mp/pwr_regulator.c
index eb024b85116b..954603f67455 100644
--- a/arch/arm/mach-stm32mp/pwr_regulator.c
+++ b/arch/arm/mach-stm32mp/pwr_regulator.c
@@ -12,6 +12,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/arch/arm/mach-stm32mp/spl.c b/arch/arm/mach-stm32mp/spl.c
index 9d951ce15f96..fdaaeb27abaf 100644
--- a/arch/arm/mach-stm32mp/spl.c
+++ b/arch/arm/mach-stm32mp/spl.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
u32 spl_boot_device(void)
diff --git a/arch/arm/mach-sunxi/cpu_info.c b/arch/arm/mach-sunxi/cpu_info.c
index 5198fb555a9c..5a7d03dce898 100644
--- a/arch/arm/mach-sunxi/cpu_info.c
+++ b/arch/arm/mach-sunxi/cpu_info.c
@@ -13,6 +13,7 @@
#include <asm/arch/clock.h>
#include <axp_pmic.h>
#include <errno.h>
+#include <linux/errno.h>
#ifdef CONFIG_MACH_SUN6I
int sunxi_get_ss_bonding_id(void)
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a33.c b/arch/arm/mach-sunxi/dram_sun8i_a33.c
index d99a38b10aa6..d5d324860e3f 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a33.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a33.c
@@ -15,6 +15,7 @@
#include <asm/arch/dram.h>
#include <asm/arch/prcm.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/* PLL runs at 2x dram-clk, controller runs at PLL / 4 (dram-clk / 2) */
#define DRAM_CLK_MUL 2
diff --git a/arch/arm/mach-sunxi/dram_sun8i_a83t.c b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
index a3f833dd341b..8a32ea4f0a17 100644
--- a/arch/arm/mach-sunxi/dram_sun8i_a83t.c
+++ b/arch/arm/mach-sunxi/dram_sun8i_a83t.c
@@ -15,6 +15,7 @@
#include <asm/arch/dram.h>
#include <asm/arch/prcm.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define DRAM_CLK_MUL 2
#define DRAM_CLK_DIV 1
diff --git a/arch/arm/mach-sunxi/p2wi.c b/arch/arm/mach-sunxi/p2wi.c
index 7c5c12254ea1..550b37b36635 100644
--- a/arch/arm/mach-sunxi/p2wi.c
+++ b/arch/arm/mach-sunxi/p2wi.c
@@ -23,6 +23,7 @@
#include <asm/arch/prcm.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
void p2wi_init(void)
{
diff --git a/arch/arm/mach-sunxi/rsb.c b/arch/arm/mach-sunxi/rsb.c
index 01bb09b7478e..2ec63f5a5689 100644
--- a/arch/arm/mach-sunxi/rsb.c
+++ b/arch/arm/mach-sunxi/rsb.c
@@ -15,6 +15,7 @@
#include <asm/arch/gpio.h>
#include <asm/arch/prcm.h>
#include <asm/arch/rsb.h>
+#include <linux/errno.h>
static int rsb_set_device_mode(void);
diff --git a/arch/arm/mach-tegra/cboot.c b/arch/arm/mach-tegra/cboot.c
index 384e81bac073..832a0ba1ca08 100644
--- a/arch/arm/mach-tegra/cboot.c
+++ b/arch/arm/mach-tegra/cboot.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <string.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 6b587209c1c6..9056fe0dd31c 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -20,6 +20,7 @@
#include <asm/arch-tegra/pmc.h>
#include <asm/arch-tegra/timer.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/*
* This is our record of the current clock rate of each clock. We don't
diff --git a/arch/arm/mach-tegra/ivc.c b/arch/arm/mach-tegra/ivc.c
index 66c1276f4b87..216673e43673 100644
--- a/arch/arm/mach-tegra/ivc.c
+++ b/arch/arm/mach-tegra/ivc.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch-tegra/ivc.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define TEGRA_IVC_ALIGN 64
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index c5ced7e3f389..5b3e3d8f56e8 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -7,6 +7,7 @@
#include <errno.h>
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <asm/types.h>
diff --git a/arch/arm/mach-tegra/tegra124/xusb-padctl.c b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
index a1136f1558b8..6985515499f1 100644
--- a/arch/arm/mach-tegra/tegra124/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra124/xusb-padctl.c
@@ -13,6 +13,7 @@
#include <dm/of_access.h>
#include <dm/ofnode.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "../xusb-padctl-common.h"
diff --git a/arch/arm/mach-tegra/tegra20/clock.c b/arch/arm/mach-tegra/tegra20/clock.c
index fc197a050c54..c8db06cf66c7 100644
--- a/arch/arm/mach-tegra/tegra20/clock.c
+++ b/arch/arm/mach-tegra/tegra20/clock.c
@@ -20,6 +20,7 @@
#include <div64.h>
#include <fdtdec.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/*
diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c
index 7f8c3c3a7c7b..48f7e354108b 100644
--- a/arch/arm/mach-tegra/tegra210/clock.c
+++ b/arch/arm/mach-tegra/tegra210/clock.c
@@ -23,6 +23,7 @@
#include <fdtdec.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/*
* Clock types that we can use as a source. The Tegra210 has muxes for the
diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
index 0af6e256ad18..572ba95d5b07 100644
--- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c
+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c
@@ -13,6 +13,7 @@
#include <dm/of_access.h>
#include <dm/ofnode.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "../xusb-padctl-common.h"
diff --git a/arch/arm/mach-tegra/tegra30/clock.c b/arch/arm/mach-tegra/tegra30/clock.c
index 38b53cbbe480..b35f02eedd4c 100644
--- a/arch/arm/mach-tegra/tegra30/clock.c
+++ b/arch/arm/mach-tegra/tegra30/clock.c
@@ -19,6 +19,7 @@
#include <div64.h>
#include <fdtdec.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/*
diff --git a/arch/arm/mach-tegra/xusb-padctl-common.c b/arch/arm/mach-tegra/xusb-padctl-common.c
index 42d64cf2c755..94a271311ce3 100644
--- a/arch/arm/mach-tegra/xusb-padctl-common.c
+++ b/arch/arm/mach-tegra/xusb-padctl-common.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <errno.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/arch/arm/mach-tegra/xusb-padctl-dummy.c b/arch/arm/mach-tegra/xusb-padctl-dummy.c
index f2d90302f6d2..b3c5c9453b24 100644
--- a/arch/arm/mach-tegra/xusb-padctl-dummy.c
+++ b/arch/arm/mach-tegra/xusb-padctl-dummy.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <errno.h>
+#include <linux/errno.h>
#include <asm/arch-tegra/xusb-padctl.h>
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 4ef3f39f0523..04d6607f591a 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <asm/arch/clk.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index a193e5c5b607..0c214f71fae4 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -14,6 +14,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/ps7_init_gpl.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
#define ZYNQ_SILICON_VER_MASK 0xF0000000
#define ZYNQ_SILICON_VER_SHIFT 28
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 943b601ef8e4..b17145155eaa 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <zynqmp_firmware.h>
#include <asm/cache.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define ZYNQ_SILICON_VER_MASK 0xF000
diff --git a/arch/m68k/lib/fec.c b/arch/m68k/lib/fec.c
index 3b76d1392bf9..4f0132389288 100644
--- a/arch/m68k/lib/fec.c
+++ b/arch/m68k/lib/fec.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index 0203348df010..f13e61b6a983 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -16,6 +16,7 @@
#include <asm/cache.h>
#include <asm/global_data.h>
#include <asm/system.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
index 35bc146a38be..5504ded9e059 100644
--- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c
+++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c
@@ -33,6 +33,7 @@
#include <config.h>
#include <net.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
diff --git a/arch/riscv/lib/andes_plic.c b/arch/riscv/lib/andes_plic.c
index 3fa92277639c..445a39798b91 100644
--- a/arch/riscv/lib/andes_plic.c
+++ b/arch/riscv/lib/andes_plic.c
@@ -19,6 +19,7 @@
#include <asm/syscon.h>
#include <cpu.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* pending register */
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c
index 636b6597c062..88563331b33b 100644
--- a/arch/riscv/lib/image.c
+++ b/arch/riscv/lib/image.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/stddef.h>
diff --git a/arch/riscv/lib/sbi.c b/arch/riscv/lib/sbi.c
index 8fbc23839dda..984499960a1a 100644
--- a/arch/riscv/lib/sbi.c
+++ b/arch/riscv/lib/sbi.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <asm/encoding.h>
#include <asm/sbi.h>
+#include <linux/errno.h>
struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
unsigned long arg1, unsigned long arg2,
diff --git a/arch/riscv/lib/smp.c b/arch/riscv/lib/smp.c
index 879b7ab9a788..09dd439b59aa 100644
--- a/arch/riscv/lib/smp.c
+++ b/arch/riscv/lib/smp.c
@@ -10,6 +10,7 @@
#include <asm/barrier.h>
#include <asm/global_data.h>
#include <asm/smp.h>
+#include <linux/errno.h>
#include <linux/printk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index c58a5ef7d1f7..e606d56f0121 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <os.h>
#include <asm/io.h>
diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c
index 8ef8f65ebaf6..00b3785bad9a 100644
--- a/arch/sandbox/cpu/eth-raw-os.c
+++ b/arch/sandbox/cpu/eth-raw-os.c
@@ -7,6 +7,7 @@
#include <asm/eth-raw-os.h>
#include <errno.h>
#include <fcntl.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/if.h>
#include <netinet/in.h>
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index f0721d3f7c50..581a48ea9edb 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -17,6 +17,7 @@
#include <time.h>
#include <unistd.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <sys/mman.h>
#include <sys/stat.h>
diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
index 8673e601e5e2..c1c9bb68e0a9 100644
--- a/arch/sandbox/cpu/sdl.c
+++ b/arch/sandbox/cpu/sdl.c
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
+#include <linux/errno.h>
#include <linux/input.h>
#include <SDL2/SDL.h>
#include <asm/state.h>
diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c
index 41591d6528cb..52cabd7ff12b 100644
--- a/arch/sandbox/cpu/spl.c
+++ b/arch/sandbox/cpu/spl.c
@@ -14,6 +14,7 @@
#include <asm/global_data.h>
#include <asm/spl.h>
#include <asm/state.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index b3365c78b4b9..4cacd23d0cd8 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -19,6 +19,7 @@
#include <asm/sections.h>
#include <asm/state.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index bfc4f0b8defb..35bc7586fa57 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <asm/malloc.h>
#include <asm/state.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* Main state record for the sandbox */
diff --git a/arch/sandbox/include/asm/sdl.h b/arch/sandbox/include/asm/sdl.h
index 47fc4889d207..2a98a7f49b2a 100644
--- a/arch/sandbox/include/asm/sdl.h
+++ b/arch/sandbox/include/asm/sdl.h
@@ -7,6 +7,7 @@
#define __SANDBOX_SDL_H
#include <errno.h>
+#include <linux/errno.h>
#ifdef CONFIG_SANDBOX_SDL
diff --git a/arch/sandbox/lib/pci_io.c b/arch/sandbox/lib/pci_io.c
index 2038141947ab..cfc5291ab7b6 100644
--- a/arch/sandbox/lib/pci_io.c
+++ b/arch/sandbox/lib/pci_io.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <log.h>
#include <asm/io.h>
+#include <linux/errno.h>
int pci_map_physmem(phys_addr_t paddr, unsigned long *lenp,
struct udevice **devp, void **ptrp)
diff --git a/arch/x86/cpu/acpi_gpe.c b/arch/x86/cpu/acpi_gpe.c
index 47ee817eb7ac..5610d5437236 100644
--- a/arch/x86/cpu/acpi_gpe.c
+++ b/arch/x86/cpu/acpi_gpe.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/x86-irq.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/arch/x86/cpu/apollolake/fsp_bindings.c b/arch/x86/cpu/apollolake/fsp_bindings.c
index a76855e3e287..b9880b56a8b3 100644
--- a/arch/x86/cpu/apollolake/fsp_bindings.c
+++ b/arch/x86/cpu/apollolake/fsp_bindings.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <log.h>
#include <asm/arch/fsp_bindings.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/arch/x86/cpu/apollolake/fsp_m.c b/arch/x86/cpu/apollolake/fsp_m.c
index cef937573b0c..83f94d20f581 100644
--- a/arch/x86/cpu/apollolake/fsp_m.c
+++ b/arch/x86/cpu/apollolake/fsp_m.c
@@ -11,6 +11,7 @@
#include <asm/arch/fsp_bindings.h>
#include <asm/fsp2/fsp_internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
int fspm_update_config(struct udevice *dev, struct fspm_upd *upd)
{
diff --git a/arch/x86/cpu/apollolake/fsp_s.c b/arch/x86/cpu/apollolake/fsp_s.c
index a4e1c511614a..c6da4bbfce64 100644
--- a/arch/x86/cpu/apollolake/fsp_s.c
+++ b/arch/x86/cpu/apollolake/fsp_s.c
@@ -28,6 +28,7 @@
#include <asm/arch/fsp/fsp_s_upd.h>
#include <dm/uclass-internal.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define PCH_P2SB_E0 0xe0
#define HIDE_BIT BIT(0)
diff --git a/arch/x86/cpu/apollolake/lpc.c b/arch/x86/cpu/apollolake/lpc.c
index b81a458f2ebf..1de8c4a98044 100644
--- a/arch/x86/cpu/apollolake/lpc.c
+++ b/arch/x86/cpu/apollolake/lpc.c
@@ -13,6 +13,7 @@
#include <asm/pci.h>
#include <asm/arch/iomap.h>
#include <asm/arch/lpc.h>
+#include <linux/errno.h>
#include <linux/log2.h>
void lpc_enable_fixed_io_ranges(uint io_enables)
diff --git a/arch/x86/cpu/apollolake/punit.c b/arch/x86/cpu/apollolake/punit.c
index 3514ba215914..632309f69015 100644
--- a/arch/x86/cpu/apollolake/punit.c
+++ b/arch/x86/cpu/apollolake/punit.c
@@ -15,6 +15,7 @@
#include <asm/pci.h>
#include <asm/arch/systemagent.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/*
* Punit Initialisation code. This all isn't documented, but
diff --git a/arch/x86/cpu/apollolake/spl.c b/arch/x86/cpu/apollolake/spl.c
index a318bca5a62b..44cbe4590a71 100644
--- a/arch/x86/cpu/apollolake/spl.c
+++ b/arch/x86/cpu/apollolake/spl.c
@@ -19,6 +19,7 @@
#include <asm/arch/iomap.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* This reads the next phase from mapped SPI flash */
diff --git a/arch/x86/cpu/apollolake/uart.c b/arch/x86/cpu/apollolake/uart.c
index f368f7d2db4e..2a2010229455 100644
--- a/arch/x86/cpu/apollolake/uart.c
+++ b/arch/x86/cpu/apollolake/uart.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/pci.h>
#include <asm/lpss.h>
+#include <linux/errno.h>
/* Low-power Subsystem (LPSS) clock register */
enum {
diff --git a/arch/x86/cpu/broadwell/adsp.c b/arch/x86/cpu/broadwell/adsp.c
index 41f7d5d4d1a9..f5ae97c88ce0 100644
--- a/arch/x86/cpu/broadwell/adsp.c
+++ b/arch/x86/cpu/broadwell/adsp.c
@@ -19,6 +19,7 @@
#include <asm/arch/adsp.h>
#include <asm/arch/pch.h>
#include <asm/arch/rcb.h>
+#include <linux/errno.h>
enum pci_type_t {
LYNX_POINT,
diff --git a/arch/x86/cpu/broadwell/cpu.c b/arch/x86/cpu/broadwell/cpu.c
index ec9592c5aa7a..9fb35bad3131 100644
--- a/arch/x86/cpu/broadwell/cpu.c
+++ b/arch/x86/cpu/broadwell/cpu.c
@@ -24,6 +24,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/pch.h>
#include <asm/arch/rcb.h>
+#include <linux/errno.h>
int arch_cpu_init_dm(void)
{
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c
index 6cede74a8299..4ca4fdcabb7f 100644
--- a/arch/x86/cpu/broadwell/cpu_from_spl.c
+++ b/arch/x86/cpu/broadwell/cpu_from_spl.c
@@ -13,6 +13,7 @@
#include <log.h>
#include <asm/global_data.h>
#include <asm/mtrr.h>
+#include <linux/errno.h>
int misc_init_r(void)
{
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index 4debddce8ada..5fb6af3a3872 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -22,6 +22,7 @@
#include <asm/arch/pch.h>
#include <asm/arch/rcb.h>
#include <linux/delay.h>
+#include <linux/errno.h>
struct cpu_broadwell_priv {
bool ht_disabled;
diff --git a/arch/x86/cpu/broadwell/iobp.c b/arch/x86/cpu/broadwell/iobp.c
index 16c840690bcc..9805f8dbed48 100644
--- a/arch/x86/cpu/broadwell/iobp.c
+++ b/arch/x86/cpu/broadwell/iobp.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <asm/arch/pch.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define IOBP_RETRY 1000
diff --git a/arch/x86/cpu/broadwell/me.c b/arch/x86/cpu/broadwell/me.c
index 4ae084bf4529..89b7bd15082b 100644
--- a/arch/x86/cpu/broadwell/me.c
+++ b/arch/x86/cpu/broadwell/me.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <asm/arch/me.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
static inline void me_read_dword_ptr(struct udevice *dev, void *ptr, int offset)
diff --git a/arch/x86/cpu/broadwell/pch.c b/arch/x86/cpu/broadwell/pch.c
index f012db9debe8..6a5d9dc345e9 100644
--- a/arch/x86/cpu/broadwell/pch.c
+++ b/arch/x86/cpu/broadwell/pch.c
@@ -26,6 +26,7 @@
#include <asm/arch/spi.h>
#include <dm/uclass-internal.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define BIOS_CTRL 0xdc
diff --git a/arch/x86/cpu/broadwell/pinctrl_broadwell.c b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
index 2bc3ef97214c..332d45fd088a 100644
--- a/arch/x86/cpu/broadwell/pinctrl_broadwell.c
+++ b/arch/x86/cpu/broadwell/pinctrl_broadwell.c
@@ -19,6 +19,7 @@
#include <dt-bindings/gpio/x86-gpio.h>
#include <dm/pinctrl.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/broadwell/refcode.c b/arch/x86/cpu/broadwell/refcode.c
index ee045a348335..ba4a23ac58ff 100644
--- a/arch/x86/cpu/broadwell/refcode.c
+++ b/arch/x86/cpu/broadwell/refcode.c
@@ -12,6 +12,7 @@
#include <init.h>
#include <log.h>
#include <asm/arch/pei_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define RMODULE_MAGIC 0xf8fe
diff --git a/arch/x86/cpu/broadwell/sdram.c b/arch/x86/cpu/broadwell/sdram.c
index b118116e3e66..1d48741f473a 100644
--- a/arch/x86/cpu/broadwell/sdram.c
+++ b/arch/x86/cpu/broadwell/sdram.c
@@ -25,6 +25,7 @@
#include <asm/arch/pch.h>
#include <asm/arch/pei_data.h>
#include <asm/arch/pm.h>
+#include <linux/errno.h>
#include <linux/string.h>
ulong board_get_usable_ram_top(ulong total_size)
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c
index c52741ac9da6..f0c350605e19 100644
--- a/arch/x86/cpu/coreboot/tables.c
+++ b/arch/x86/cpu/coreboot/tables.c
@@ -10,6 +10,7 @@
#include <net.h>
#include <asm/arch/sysinfo.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 4c8c586fc8b6..cd1a6832cb2d 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -49,6 +49,7 @@
#include <asm/interrupt.h>
#include <asm/tables.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/cpu_x86.c b/arch/x86/cpu/cpu_x86.c
index 8b3a9e75d1d4..fc76839cc7d3 100644
--- a/arch/x86/cpu/cpu_x86.c
+++ b/arch/x86/cpu/cpu_x86.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <asm/cpu.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c
index 66a122c9d427..9b87cf02418a 100644
--- a/arch/x86/cpu/efi/payload.c
+++ b/arch/x86/cpu/efi/payload.c
@@ -17,6 +17,7 @@
#include <asm/e820.h>
#include <asm/global_data.h>
#include <asm/post.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
index 2f61ea8e5bb2..6ac70c9ec9a8 100644
--- a/arch/x86/cpu/i386/cpu.c
+++ b/arch/x86/cpu/i386/cpu.c
@@ -33,6 +33,7 @@
#include <asm/msr.h>
#include <asm/mtrr.h>
#include <asm/processor-flags.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c
index 5ade3712e7ca..c7d3570a986b 100644
--- a/arch/x86/cpu/i386/interrupt.c
+++ b/arch/x86/cpu/i386/interrupt.c
@@ -26,6 +26,7 @@
#include <asm/lapic.h>
#include <asm/processor-flags.h>
#include <asm/ptrace.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/intel_common/cpu.c b/arch/x86/cpu/intel_common/cpu.c
index 87da5feaf616..a292dd72a888 100644
--- a/arch/x86/cpu/intel_common/cpu.c
+++ b/arch/x86/cpu/intel_common/cpu.c
@@ -23,6 +23,7 @@
#include <asm/mtrr.h>
#include <asm/post.h>
#include <asm/microcode.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index d6bc051397b8..cc9111d7fc5a 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -19,6 +19,7 @@
#include <spl.h>
#include <asm/global_data.h>
#include <asm/itss.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct itss_platdata {
diff --git a/arch/x86/cpu/intel_common/lpc.c b/arch/x86/cpu/intel_common/lpc.c
index 23befbef15ff..eda4e58d608f 100644
--- a/arch/x86/cpu/intel_common/lpc.c
+++ b/arch/x86/cpu/intel_common/lpc.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/lpc_common.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/intel_common/microcode.c b/arch/x86/cpu/intel_common/microcode.c
index 919d146940af..157350a89491 100644
--- a/arch/x86/cpu/intel_common/microcode.c
+++ b/arch/x86/cpu/intel_common/microcode.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/cpu.h>
#include <asm/microcode.h>
diff --git a/arch/x86/cpu/intel_common/mrc.c b/arch/x86/cpu/intel_common/mrc.c
index 7369ffa19d75..f9380015139b 100644
--- a/arch/x86/cpu/intel_common/mrc.c
+++ b/arch/x86/cpu/intel_common/mrc.c
@@ -20,6 +20,7 @@
#include <asm/post.h>
#include <asm/arch/me.h>
#include <asm/report_platform.h>
+#include <linux/errno.h>
static const char *const ecc_decoder[] = {
"inactive",
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index 361d4c90cb91..8b62cc5d7be0 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -15,6 +15,7 @@
#include <spl.h>
#include <asm/pci.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define PCH_P2SB_E0 0xe0
#define HIDE_BIT BIT(0)
diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index 0775c5cddac2..547eedfbb859 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -17,6 +17,7 @@
#include <asm/pci.h>
#include <asm/pirq_routing.h>
#include <asm/tables.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/bd82x6x.c b/arch/x86/cpu/ivybridge/bd82x6x.c
index 84d719e6c4ef..fefea448ade0 100644
--- a/arch/x86/cpu/ivybridge/bd82x6x.c
+++ b/arch/x86/cpu/ivybridge/bd82x6x.c
@@ -22,6 +22,7 @@
#include <asm/arch/sandybridge.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/cpu.c b/arch/x86/cpu/ivybridge/cpu.c
index f5d0993bf214..209be6877be5 100644
--- a/arch/x86/cpu/ivybridge/cpu.c
+++ b/arch/x86/cpu/ivybridge/cpu.c
@@ -35,6 +35,7 @@
#include <asm/arch/model_206ax.h>
#include <asm/arch/pch.h>
#include <asm/arch/sandybridge.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/early_me.c b/arch/x86/cpu/ivybridge/early_me.c
index 4f43986926ac..9758c9a653dc 100644
--- a/arch/x86/cpu/ivybridge/early_me.c
+++ b/arch/x86/cpu/ivybridge/early_me.c
@@ -18,6 +18,7 @@
#include <asm/arch/pch.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
static const char *const me_ack_values[] = {
[ME_HFS_ACK_NO_DID] = "No DID Ack received",
diff --git a/arch/x86/cpu/ivybridge/lpc.c b/arch/x86/cpu/ivybridge/lpc.c
index 2d82984dbdf1..a579eb3b38e2 100644
--- a/arch/x86/cpu/ivybridge/lpc.c
+++ b/arch/x86/cpu/ivybridge/lpc.c
@@ -21,6 +21,7 @@
#include <asm/lpc_common.h>
#include <asm/pci.h>
#include <asm/arch/pch.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/model_206ax.c b/arch/x86/cpu/ivybridge/model_206ax.c
index 788e589b26d7..e11aa0001c48 100644
--- a/arch/x86/cpu/ivybridge/model_206ax.c
+++ b/arch/x86/cpu/ivybridge/model_206ax.c
@@ -23,6 +23,7 @@
#include <asm/speedstep.h>
#include <asm/turbo.h>
#include <asm/arch/model_206ax.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c
index de0f0071fc0c..4c1ec37c6005 100644
--- a/arch/x86/cpu/ivybridge/sdram.c
+++ b/arch/x86/cpu/ivybridge/sdram.c
@@ -38,6 +38,7 @@
#include <asm/arch/pch.h>
#include <asm/post.h>
#include <asm/arch/sandybridge.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/mp_init.c b/arch/x86/cpu/mp_init.c
index a32283a7e8a2..1a34c2f03756 100644
--- a/arch/x86/cpu/mp_init.c
+++ b/arch/x86/cpu/mp_init.c
@@ -31,6 +31,7 @@
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/linkage.h>
#include <linux/string.h>
diff --git a/arch/x86/cpu/mtrr.c b/arch/x86/cpu/mtrr.c
index 44a6f5c8124e..fd86a4e105b2 100644
--- a/arch/x86/cpu/mtrr.c
+++ b/arch/x86/cpu/mtrr.c
@@ -25,6 +25,7 @@
#include <asm/mp.h>
#include <asm/msr.h>
#include <asm/mtrr.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/qemu/cpu.c b/arch/x86/cpu/qemu/cpu.c
index 9ce86b379c4d..a8451fa066f0 100644
--- a/arch/x86/cpu/qemu/cpu.c
+++ b/arch/x86/cpu/qemu/cpu.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <qfw.h>
#include <asm/cpu.h>
+#include <linux/errno.h>
int cpu_qemu_get_desc(const struct udevice *dev, char *buf, int size)
{
diff --git a/arch/x86/cpu/qfw_cpu.c b/arch/x86/cpu/qfw_cpu.c
index 3db95256015d..5f13984278bc 100644
--- a/arch/x86/cpu/qfw_cpu.c
+++ b/arch/x86/cpu/qfw_cpu.c
@@ -13,6 +13,7 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
#include <dm/root.h>
+#include <linux/errno.h>
#include <linux/string.h>
int qemu_cpu_fixup(void)
diff --git a/arch/x86/cpu/quark/dram.c b/arch/x86/cpu/quark/dram.c
index d38c3d0809a7..e2a36ceffd41 100644
--- a/arch/x86/cpu/quark/dram.c
+++ b/arch/x86/cpu/quark/dram.c
@@ -18,6 +18,7 @@
#include <asm/arch/mrc.h>
#include <asm/arch/msg_port.h>
#include <asm/arch/quark.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/cpu/slimbootloader/serial.c b/arch/x86/cpu/slimbootloader/serial.c
index 10e4e9300ece..cb5029667418 100644
--- a/arch/x86/cpu/slimbootloader/serial.c
+++ b/arch/x86/cpu/slimbootloader/serial.c
@@ -11,6 +11,7 @@
#include <vsprintf.h>
#include <asm/arch/slimbootloader.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
/**
* The serial port info hob is generated by Slim Bootloader, so eligible for
diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c
index 596c2c177ce3..aba74a083d7f 100644
--- a/arch/x86/cpu/tangier/pinmux.c
+++ b/arch/x86/cpu/tangier/pinmux.c
@@ -12,6 +12,7 @@
#include <syscon.h>
#include <asm/cpu.h>
#include <asm/scu.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/printk.h>
diff --git a/arch/x86/cpu/tangier/sdram.c b/arch/x86/cpu/tangier/sdram.c
index e1531385fb89..a8760263cf4b 100644
--- a/arch/x86/cpu/tangier/sdram.c
+++ b/arch/x86/cpu/tangier/sdram.c
@@ -9,6 +9,7 @@
#include <asm/e820.h>
#include <asm/global_data.h>
#include <asm/sfi.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/arch/x86/cpu/tangier/sysreset.c b/arch/x86/cpu/tangier/sysreset.c
index b03bc28f9353..c0246dfdf963 100644
--- a/arch/x86/cpu/tangier/sysreset.c
+++ b/arch/x86/cpu/tangier/sysreset.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <sysreset.h>
#include <asm/scu.h>
+#include <linux/errno.h>
static int tangier_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
diff --git a/arch/x86/include/asm/mp.h b/arch/x86/include/asm/mp.h
index 25edabbdd399..f93426ed7846 100644
--- a/arch/x86/include/asm/mp.h
+++ b/arch/x86/include/asm/mp.h
@@ -10,6 +10,7 @@
#include <asm/atomic.h>
#include <asm/cache.h>
+#include <linux/errno.h>
struct udevice;
diff --git a/arch/x86/lib/acpi_nhlt.c b/arch/x86/lib/acpi_nhlt.c
index 8df5ddd4a7af..83f110ebba80 100644
--- a/arch/x86/lib/acpi_nhlt.c
+++ b/arch/x86/lib/acpi_nhlt.c
@@ -17,6 +17,7 @@
#include <asm/acpi_nhlt.h>
#include <asm/unaligned.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define NHLT_RID 1
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 0d0b8edfcaf2..2de8ad0d6f45 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -26,6 +26,7 @@
#include <asm/arch/global_nvs.h>
#include <dm/acpi.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
index a4bd65d3b7b3..66fc8a69aaa4 100644
--- a/arch/x86/lib/bootm.c
+++ b/arch/x86/lib/bootm.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <fdt_support.h>
#include <image.h>
+#include <linux/errno.h>
#include <u-boot/zlib.h>
#include <asm/bootparam.h>
#include <asm/cpu.h>
diff --git a/arch/x86/lib/fsp/fsp_common.c b/arch/x86/lib/fsp/fsp_common.c
index 82f7d3ab5f0d..0f81d54f52c0 100644
--- a/arch/x86/lib/fsp/fsp_common.c
+++ b/arch/x86/lib/fsp/fsp_common.c
@@ -19,6 +19,7 @@
#include <asm/post.h>
#include <asm/processor.h>
#include <asm/fsp/fsp_support.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index c5129ff1f304..6e4368d4184d 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -13,6 +13,7 @@
#include <asm/fsp/fsp_support.h>
#include <asm/global_data.h>
#include <asm/mtrr.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/fsp2/fsp_dram.c b/arch/x86/lib/fsp2/fsp_dram.c
index c31e2a11b7a2..e81b35d8d72e 100644
--- a/arch/x86/lib/fsp2/fsp_dram.c
+++ b/arch/x86/lib/fsp2/fsp_dram.c
@@ -15,6 +15,7 @@
#include <asm/fsp2/fsp_api.h>
#include <asm/fsp2/fsp_internal.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
int dram_init(void)
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index 85cae54a0cad..31702b90fd74 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -17,6 +17,7 @@
#include <asm/intel_pinctrl.h>
#include <dm/uclass-internal.h>
#include <asm/fsp2/fsp_internal.h>
+#include <linux/errno.h>
int arch_cpu_init_dm(void)
{
diff --git a/arch/x86/lib/fsp2/fsp_meminit.c b/arch/x86/lib/fsp2/fsp_meminit.c
index 70d0070e6b58..5dfaf73b12a8 100644
--- a/arch/x86/lib/fsp2/fsp_meminit.c
+++ b/arch/x86/lib/fsp2/fsp_meminit.c
@@ -19,6 +19,7 @@
#include <asm/fsp2/fsp_internal.h>
#include <asm/arch/fsp/fsp_configs.h>
#include <asm/arch/fsp/fsp_m_upd.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int prepare_mrc_cache_type(enum mrc_type_t type,
diff --git a/arch/x86/lib/fsp2/fsp_silicon_init.c b/arch/x86/lib/fsp2/fsp_silicon_init.c
index ca064eaf7165..7d83ae2a1cb7 100644
--- a/arch/x86/lib/fsp2/fsp_silicon_init.c
+++ b/arch/x86/lib/fsp2/fsp_silicon_init.c
@@ -18,6 +18,7 @@
#include <asm/fsp/fsp_infoheader.h>
#include <asm/fsp2/fsp_internal.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
int fsp_silicon_init(bool s3wake, bool use_spi_flash)
diff --git a/arch/x86/lib/fsp2/fsp_support.c b/arch/x86/lib/fsp2/fsp_support.c
index 1f68479ec586..b962487418b9 100644
--- a/arch/x86/lib/fsp2/fsp_support.c
+++ b/arch/x86/lib/fsp2/fsp_support.c
@@ -11,6 +11,7 @@
#include <asm/fsp/fsp_support.h>
#include <asm/fsp2/fsp_internal.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* The amount of the FSP header to probe to obtain what we need */
diff --git a/arch/x86/lib/i8254.c b/arch/x86/lib/i8254.c
index 0f975389103d..7aa41ede74b7 100644
--- a/arch/x86/lib/i8254.c
+++ b/arch/x86/lib/i8254.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/i8254.h>
+#include <linux/errno.h>
#define TIMER1_VALUE 18 /* 15.6us */
#define BEEP_FREQUENCY_HZ 440
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index 78724564605a..bda9b7f1a112 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -19,6 +19,7 @@
#include <asm/mpspec.h>
#include <asm/tables.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index 3582f42733f1..0488a261c654 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -20,6 +20,7 @@
#include <asm/mrccache.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/pinctrl_ich6.c b/arch/x86/lib/pinctrl_ich6.c
index fd5e311b2916..82de4cbdc431 100644
--- a/arch/x86/lib/pinctrl_ich6.c
+++ b/arch/x86/lib/pinctrl_ich6.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/pci.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/sfi.c b/arch/x86/lib/sfi.c
index 2e68504d886c..13029fc08cbd 100644
--- a/arch/x86/lib/sfi.c
+++ b/arch/x86/lib/sfi.c
@@ -20,6 +20,7 @@
#include <asm/sfi.h>
#include <asm/tables.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct table_info {
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index ad167be31c47..36c92b7b1489 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -25,6 +25,7 @@
#include <asm/processor.h>
#include <asm/spl.h>
#include <asm-generic/sections.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/tpl.c b/arch/x86/lib/tpl.c
index 0e2558ce944c..140e36f037a8 100644
--- a/arch/x86/lib/tpl.c
+++ b/arch/x86/lib/tpl.c
@@ -18,6 +18,7 @@
#include <asm/mtrr.h>
#include <asm/processor.h>
#include <asm-generic/sections.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 219e70607bf8..a13eb78e2224 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -30,6 +30,7 @@
#include <asm/arch/timestamp.h>
#endif
#include <linux/compiler.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/board/AndesTech/ax25-ae350/ax25-ae350.c b/board/AndesTech/ax25-ae350/ax25-ae350.c
index bb0dfb5e95d3..4e546adfc68a 100644
--- a/board/AndesTech/ax25-ae350/ax25-ae350.c
+++ b/board/AndesTech/ax25-ae350/ax25-ae350.c
@@ -14,6 +14,7 @@
#endif
#include <asm/global_data.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <faraday/ftsmc020.h>
#include <fdtdec.h>
diff --git a/board/CZ.NIC/turris_mox/mox_sp.c b/board/CZ.NIC/turris_mox/mox_sp.c
index 2c0c4956cd4f..c15f8ee5b512 100644
--- a/board/CZ.NIC/turris_mox/mox_sp.c
+++ b/board/CZ.NIC/turris_mox/mox_sp.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define RWTM_BASE (MVEBU_REGISTER(0xb0000))
#define RWTM_CMD_PARAM(i) (size_t)(RWTM_BASE + (i) * 4)
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 32dabe99598d..9429806b673e 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -20,6 +20,7 @@
#include <init.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <miiphy.h>
diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index fdce33e157d0..a466c8e9f86f 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -24,6 +24,7 @@
#include <fdt_support.h>
#include <time.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
# include <atsha204a-i2c.h>
diff --git a/board/Marvell/mvebu_armada-37xx/board.c b/board/Marvell/mvebu_armada-37xx/board.c
index 89b0973389f7..1ae867e5816d 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -14,6 +14,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/Marvell/mvebu_armada-8k/board.c b/board/Marvell/mvebu_armada-8k/board.c
index 41fe47defa91..00c0d21782ae 100644
--- a/board/Marvell/mvebu_armada-8k/board.c
+++ b/board/Marvell/mvebu_armada-8k/board.c
@@ -13,6 +13,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/alliedtelesis/common/gpio_hog.c b/board/alliedtelesis/common/gpio_hog.c
index 4aecf7e2cef7..7d26ccbd4628 100644
--- a/board/alliedtelesis/common/gpio_hog.c
+++ b/board/alliedtelesis/common/gpio_hog.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <asm/global_data.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/alliedtelesis/x530/x530.c b/board/alliedtelesis/x530/x530.c
index 6618cbdc0ad0..dff8a6b886c3 100644
--- a/board/alliedtelesis/x530/x530.c
+++ b/board/alliedtelesis/x530/x530.c
@@ -14,6 +14,7 @@
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/mbus.h>
#include <linux/io.h>
#include <asm/arch/cpu.h>
diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
index 5e0d7464dd84..ee9f61f2b7ac 100644
--- a/board/armltd/vexpress/vexpress_common.c
+++ b/board/armltd/vexpress/vexpress_common.c
@@ -31,6 +31,7 @@
#include <asm/arch/sysctrl.h>
#include <asm/arch/wdt.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "../drivers/mmc/arm_pl180_mmci.h"
diff --git a/board/atmel/common/mac-spi-nor.c b/board/atmel/common/mac-spi-nor.c
index 3b150dac7d86..67bfd3785b70 100644
--- a/board/atmel/common/mac-spi-nor.c
+++ b/board/atmel/common/mac-spi-nor.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <env.h>
#include <net.h>
+#include <linux/errno.h>
#include <linux/mtd/spi-nor.h>
#include <netdev.h>
#include <linux/string.h>
diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index 6872af6dcd23..ac9eba85180c 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -30,6 +30,7 @@
#include <asm/gpio.h>
#include <phy.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
index c343de510232..4b31d8ff57cd 100644
--- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c
+++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
@@ -7,6 +7,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/arch/rcar-mstp.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/beacon/imx8mm/spl.c b/board/beacon/imx8mm/spl.c
index f2525c20b7b3..6307d689ab58 100644
--- a/board/beacon/imx8mm/spl.c
+++ b/board/beacon/imx8mm/spl.c
@@ -15,6 +15,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/mach-imx/boot_mode.h>
#include <asm/arch/ddr.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <dm/uclass.h>
diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c
index ca44e5aba962..2d4437fbfe0f 100644
--- a/board/bluegiga/apx4devkit/apx4devkit.c
+++ b/board/bluegiga/apx4devkit/apx4devkit.c
@@ -28,6 +28,7 @@
#include <asm/arch/sys_proto.h>
#include <env.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <miiphy.h>
#include <netdev.h>
diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 5e58ddf3e3d9..4f8d73bf9b37 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -21,6 +21,7 @@
#include <panel.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
#include <spl.h>
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index 243a810c4207..ac8665fc77b8 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -39,6 +39,7 @@
#include <cpsw.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/tps65217.h>
#include <env_internal.h>
#include <watchdog.h>
diff --git a/board/broadcom/bcmns3/ns3.c b/board/broadcom/bcmns3/ns3.c
index 40eda6d465df..ac9ca20f8adc 100644
--- a/board/broadcom/bcmns3/ns3.c
+++ b/board/broadcom/bcmns3/ns3.c
@@ -13,6 +13,7 @@
#include <asm/armv8/mmu.h>
#include <asm/arch-bcmns3/bl33_info.h>
#include <dt-bindings/memory/bcm-ns3-mc.h>
+#include <linux/errno.h>
/* Default reset-level = 3 and strap-val = 0 */
#define L3_RESET 30
diff --git a/board/broadcom/bcmstb/bcmstb.c b/board/broadcom/bcmstb/bcmstb.c
index f6bdf1f5f400..ca86511b1c9e 100644
--- a/board/broadcom/bcmstb/bcmstb.c
+++ b/board/broadcom/bcmstb/bcmstb.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <time.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include <common.h>
#include <env.h>
diff --git a/board/ccv/xpress/xpress.c b/board/ccv/xpress/xpress.c
index 1edec6158efc..c7476ba197c7 100644
--- a/board/ccv/xpress/xpress.c
+++ b/board/ccv/xpress/xpress.c
@@ -29,6 +29,7 @@
#include <usb.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <usb/ehci-ci.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/compulab/cl-som-imx7/cl-som-imx7.c b/board/compulab/cl-som-imx7/cl-som-imx7.c
index edb37225e743..28f4859f6491 100644
--- a/board/compulab/cl-som-imx7/cl-som-imx7.c
+++ b/board/compulab/cl-som-imx7/cl-som-imx7.c
@@ -19,6 +19,7 @@
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pfuze3000_pmic.h>
#include <asm/mach-imx/mxc_i2c.h>
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index aeab97d7d207..e39768378f90 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -39,6 +39,7 @@
#include <dm/device-internal.h>
#include <jffs2/load_kernel.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "common.h"
#include "../common/eeprom.h"
diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
index 0ffa82dd6d38..cc190103c4cf 100644
--- a/board/compulab/common/eeprom.c
+++ b/board/compulab/common/eeprom.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/setup.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include "eeprom.h"
diff --git a/board/compulab/common/eeprom.h b/board/compulab/common/eeprom.h
index a9c0203b81a4..5e5aa41074dc 100644
--- a/board/compulab/common/eeprom.h
+++ b/board/compulab/common/eeprom.h
@@ -9,6 +9,7 @@
#ifndef _EEPROM_
#define _EEPROM_
#include <errno.h>
+#include <linux/errno.h>
#ifdef CONFIG_SYS_I2C
int cl_eeprom_read_mac_addr(uchar *buf, uint eeprom_bus);
diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
index c4b3772e8355..c857a73df742 100644
--- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c
+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c
@@ -31,6 +31,7 @@
#include <input.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
diff --git a/board/creative/xfi3/xfi3.c b/board/creative/xfi3/xfi3.c
index cbaa5e59eac8..3e7f7e6e1735 100644
--- a/board/creative/xfi3/xfi3.c
+++ b/board/creative/xfi3/xfi3.c
@@ -22,6 +22,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index 960c1adec98d..8badac1d682e 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -36,6 +36,7 @@
#include <mmc.h>
#include <usb.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb/ehci-ci.h>
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c
index e875d5410c59..571168570e1a 100644
--- a/board/dhelectronics/dh_stm32mp1/board.c
+++ b/board/dhelectronics/dh_stm32mp1/board.c
@@ -38,6 +38,7 @@
#include <phy.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index f18f2ed7da3a..e6b8776bfafc 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <virtio_types.h>
#include <virtio.h>
+#include <linux/errno.h>
#ifdef CONFIG_ARM64
#include <asm/armv8/mmu.h>
diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c
index f752ac95ec1e..174266397048 100644
--- a/board/engicam/common/board.c
+++ b/board/engicam/common/board.c
@@ -18,6 +18,7 @@
#include <asm/arch/sys_proto.h>
#include <watchdog.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "board.h"
diff --git a/board/esd/vme8349/vme8349.c b/board/esd/vme8349/vme8349.c
index bc56284655c7..014578673656 100644
--- a/board/esd/vme8349/vme8349.c
+++ b/board/esd/vme8349/vme8349.c
@@ -31,6 +31,7 @@
#include <i2c.h>
#include <netdev.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/common/fsl_validate.c b/board/freescale/common/fsl_validate.c
index f12dcb3cf143..a228c82bc8e0 100644
--- a/board/freescale/common/fsl_validate.c
+++ b/board/freescale/common/fsl_validate.c
@@ -15,6 +15,7 @@
#include <malloc.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/rsa-mod-exp.h>
#include <hash.h>
diff --git a/board/freescale/common/mc34vr500.c b/board/freescale/common/mc34vr500.c
index 6f485ea233ed..d96d1e2293f2 100644
--- a/board/freescale/common/mc34vr500.c
+++ b/board/freescale/common/mc34vr500.c
@@ -9,6 +9,7 @@
#include <i2c.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/mc34vr500_pmic.h>
diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c
index af1ee044bb3c..2011738fe215 100644
--- a/board/freescale/common/pfuze.c
+++ b/board/freescale/common/pfuze.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <errno.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 63257eabb6f8..c3224c66192b 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -20,6 +20,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/mach-imx/boot_mode.h>
#include <asm/arch/ddr.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <dm/uclass.h>
diff --git a/board/freescale/imx8mq_evk/spl.c b/board/freescale/imx8mq_evk/spl.c
index 7316c762a2b7..6a37467314cc 100644
--- a/board/freescale/imx8mq_evk/spl.c
+++ b/board/freescale/imx8mq_evk/spl.c
@@ -26,6 +26,7 @@
#include <mmc.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
diff --git a/board/freescale/ls1012ardb/ls1012ardb.c b/board/freescale/ls1012ardb/ls1012ardb.c
index 278dc2221e40..1ca23aef0ebf 100644
--- a/board/freescale/ls1012ardb/ls1012ardb.c
+++ b/board/freescale/ls1012ardb/ls1012ardb.c
@@ -30,6 +30,7 @@
#include <netdev.h>
#include <fsl_sec.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc8308rdb/sdram.c b/board/freescale/mpc8308rdb/sdram.c
index 33feed16e05c..d0c359f639d8 100644
--- a/board/freescale/mpc8308rdb/sdram.c
+++ b/board/freescale/mpc8308rdb/sdram.c
@@ -15,6 +15,7 @@
#include <init.h>
#include <mpc83xx.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <asm/bitops.h>
#include <asm/io.h>
diff --git a/board/freescale/mpc8313erdb/sdram.c b/board/freescale/mpc8313erdb/sdram.c
index 3d03da024099..80b24cb7d168 100644
--- a/board/freescale/mpc8313erdb/sdram.c
+++ b/board/freescale/mpc8313erdb/sdram.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <asm/bitops.h>
#include <asm/io.h>
diff --git a/board/freescale/mpc8315erdb/sdram.c b/board/freescale/mpc8315erdb/sdram.c
index 84f8cd926ed4..bda9421977b8 100644
--- a/board/freescale/mpc8315erdb/sdram.c
+++ b/board/freescale/mpc8315erdb/sdram.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <asm/bitops.h>
#include <asm/io.h>
diff --git a/board/freescale/mpc8323erdb/mpc8323erdb.c b/board/freescale/mpc8323erdb/mpc8323erdb.c
index 16f3f49b6cb9..a96f4ecca205 100644
--- a/board/freescale/mpc8323erdb/mpc8323erdb.c
+++ b/board/freescale/mpc8323erdb/mpc8323erdb.c
@@ -25,6 +25,7 @@
#include <asm/ppc.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/board/freescale/mpc832xemds/mpc832xemds.c b/board/freescale/mpc832xemds/mpc832xemds.c
index f8b81ee3cc31..0ed0d8e137d7 100644
--- a/board/freescale/mpc832xemds/mpc832xemds.c
+++ b/board/freescale/mpc832xemds/mpc832xemds.c
@@ -28,6 +28,7 @@
#endif
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mpc8349emds/mpc8349emds.c b/board/freescale/mpc8349emds/mpc8349emds.c
index cec8b77de960..1b10fea9c6d6 100644
--- a/board/freescale/mpc8349emds/mpc8349emds.c
+++ b/board/freescale/mpc8349emds/mpc8349emds.c
@@ -24,6 +24,7 @@
#endif
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#if defined(CONFIG_OF_LIBFDT)
#include <linux/libfdt.h>
diff --git a/board/freescale/mpc8349itx/mpc8349itx.c b/board/freescale/mpc8349itx/mpc8349itx.c
index c1ae8c5b9884..d21bd4aa16b4 100644
--- a/board/freescale/mpc8349itx/mpc8349itx.c
+++ b/board/freescale/mpc8349itx/mpc8349itx.c
@@ -27,6 +27,7 @@
#endif
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "../../../arch/powerpc/cpu/mpc83xx/hrcw/hrcw.h"
diff --git a/board/freescale/mpc837xemds/mpc837xemds.c b/board/freescale/mpc837xemds/mpc837xemds.c
index e45bc0d516c0..bd283076b1e2 100644
--- a/board/freescale/mpc837xemds/mpc837xemds.c
+++ b/board/freescale/mpc837xemds/mpc837xemds.c
@@ -19,6 +19,7 @@
#include <tsec.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <fsl_esdhc.h>
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index 448bc9b937a9..5679f932c903 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -22,6 +22,7 @@
#include <fsl_esdhc.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c
index 8e0edb45c3ef..f20087328b3e 100644
--- a/board/freescale/mx25pdk/mx25pdk.c
+++ b/board/freescale/mx25pdk/mx25pdk.c
@@ -19,6 +19,7 @@
#include <i2c.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <fsl_pmic.h>
#include <mc34704.h>
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 8ff35fbd02b8..d6cbdaf406fb 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -24,6 +24,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <miiphy.h>
#include <netdev.h>
diff --git a/board/freescale/mx6slevk/mx6slevk.c b/board/freescale/mx6slevk/mx6slevk.c
index 5e6072dd424d..9e7a81d4bb52 100644
--- a/board/freescale/mx6slevk/mx6slevk.c
+++ b/board/freescale/mx6slevk/mx6slevk.c
@@ -21,6 +21,7 @@
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/io.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <fsl_esdhc_imx.h>
diff --git a/board/freescale/mx6sllevk/mx6sllevk.c b/board/freescale/mx6sllevk/mx6sllevk.c
index f5aeaa41e746..3887ec62848e 100644
--- a/board/freescale/mx6sllevk/mx6sllevk.c
+++ b/board/freescale/mx6sllevk/mx6sllevk.c
@@ -17,6 +17,7 @@
#include <asm/mach-imx/boot_mode.h>
#include <asm/io.h>
#include <common.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <mmc.h>
#include <power/pmic.h>
diff --git a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
index d5621c5e0422..aefc1ab2bd86 100644
--- a/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
+++ b/board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
@@ -21,6 +21,7 @@
#include <asm/io.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <fsl_esdhc_imx.h>
diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 361c3c2c517d..ad3461c6661f 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -22,6 +22,7 @@
#include <env.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <fsl_esdhc_imx.h>
diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index bb6c2474abd6..cb903798df54 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -26,6 +26,7 @@
#include <miiphy.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <mmc.h>
#include <netdev.h>
diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 8bf430670c55..d0f2e5f99184 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -15,6 +15,7 @@
#include <asm/mach-imx/iomux-v3.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <fsl_esdhc_imx.h>
diff --git a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
index f4bf325e0d3c..7fec510c8caa 100644
--- a/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
+++ b/board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
@@ -29,6 +29,7 @@
#include <miiphy.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <fsl_mdio.h>
diff --git a/board/freescale/p2041rdb/ddr.c b/board/freescale/p2041rdb/ddr.c
index 496d3a4f3088..f539002e3e1b 100644
--- a/board/freescale/p2041rdb/ddr.c
+++ b/board/freescale/p2041rdb/ddr.c
@@ -16,6 +16,7 @@
#include <fsl_ddr_sdram.h>
#include <fsl_ddr_dimm_params.h>
#include <asm/fsl_law.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 00c83d664385..5c84b404e0e4 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -20,6 +20,7 @@
#include <asm/fsl_pci.h>
#include <asm/io.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <netdev.h>
diff --git a/board/friendlyarm/nanopi2/onewire.c b/board/friendlyarm/nanopi2/onewire.c
index 994befb1ec99..be0f0c79efe3 100644
--- a/board/friendlyarm/nanopi2/onewire.c
+++ b/board/friendlyarm/nanopi2/onewire.c
@@ -11,6 +11,7 @@
#include <asm/arch/clk.h>
#include <i2c.h>
#include <pwm.h>
+#include <linux/errno.h>
#include <irq_func.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index 4932fc2d1173..800d9e76d38c 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -40,6 +40,7 @@
#include <netdev.h>
#include <pci.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <power/pmic.h>
diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index feeae37cd700..c4017a25af35 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -6,6 +6,7 @@
#include <asm-generic/gpio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "ihs_phys.h"
diff --git a/board/gdsys/mpc8308/hrcon.c b/board/gdsys/mpc8308/hrcon.c
index 961bf0af72e7..ad231cace750 100644
--- a/board/gdsys/mpc8308/hrcon.c
+++ b/board/gdsys/mpc8308/hrcon.c
@@ -15,6 +15,7 @@
#include <asm/u-boot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <pci.h>
diff --git a/board/gdsys/mpc8308/sdram.c b/board/gdsys/mpc8308/sdram.c
index 64979828adbc..593f59265884 100644
--- a/board/gdsys/mpc8308/sdram.c
+++ b/board/gdsys/mpc8308/sdram.c
@@ -23,6 +23,7 @@
#include <asm/io.h>
#include <asm/ppc.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/gdsys/mpc8308/strider.c b/board/gdsys/mpc8308/strider.c
index a9025cd55cfb..9fedf79eaa94 100644
--- a/board/gdsys/mpc8308/strider.c
+++ b/board/gdsys/mpc8308/strider.c
@@ -15,6 +15,7 @@
#include <asm/u-boot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdt_support.h>
#include <pci.h>
diff --git a/board/ge/common/ge_common.c b/board/ge/common/ge_common.c
index 48c3778046f1..4885c9979294 100644
--- a/board/ge/common/ge_common.c
+++ b/board/ge/common/ge_common.c
@@ -7,6 +7,7 @@
#include <env.h>
#include <dm/uclass.h>
#include <rtc.h>
+#include <linux/errno.h>
void check_time(void)
{
diff --git a/board/ge/common/vpd_reader.c b/board/ge/common/vpd_reader.c
index d42b00da2fe6..cdf96802d9e5 100644
--- a/board/ge/common/vpd_reader.c
+++ b/board/ge/common/vpd_reader.c
@@ -3,15 +3,16 @@
* Copyright 2016 General Electric Company
*/
-#include "vpd_reader.h"
-#include <malloc.h>
-
+#include <common.h>
+#include <hexdump.h>
#include <i2c.h>
-#include <linux/bch.h>
+#include <i2c_eeprom.h>
+#include <malloc.h>
#include <stdlib.h>
#include <dm/uclass.h>
-#include <i2c_eeprom.h>
-#include <hexdump.h>
+#include <linux/bch.h>
+#include <linux/errno.h>
+#include "vpd_reader.h"
/* BCH configuration */
diff --git a/board/ge/common/vpd_reader.h b/board/ge/common/vpd_reader.h
index 3045b7e21e22..2c1028bfbe28 100644
--- a/board/ge/common/vpd_reader.h
+++ b/board/ge/common/vpd_reader.h
@@ -3,8 +3,6 @@
* Copyright 2016 General Electric Company
*/
-#include "common.h"
-
struct vpd_cache;
/*
diff --git a/board/google/imx8mq_phanbell/spl.c b/board/google/imx8mq_phanbell/spl.c
index 0e822d01c4c2..38045791f131 100644
--- a/board/google/imx8mq_phanbell/spl.c
+++ b/board/google/imx8mq_phanbell/spl.c
@@ -26,6 +26,7 @@
#include <fsl_esdhc_imx.h>
#include <mmc.h>
#include <spl.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/ids/ids8313/ids8313.c b/board/ids/ids8313/ids8313.c
index da78f60d05b2..0aec6e6ca853 100644
--- a/board/ids/ids8313/ids8313.c
+++ b/board/ids/ids8313/ids8313.c
@@ -22,6 +22,7 @@
#include <asm/ppc.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/intel/cougarcanyon2/cougarcanyon2.c b/board/intel/cougarcanyon2/cougarcanyon2.c
index ce11eae59d50..412660bd414c 100644
--- a/board/intel/cougarcanyon2/cougarcanyon2.c
+++ b/board/intel/cougarcanyon2/cougarcanyon2.c
@@ -13,6 +13,7 @@
#include <asm/lpc_common.h>
#include <asm/pci.h>
#include <asm/arch/pch.h>
+#include <linux/errno.h>
#define SIO1007_RUNTIME_IOPORT 0x180
diff --git a/board/intel/edison/edison.c b/board/intel/edison/edison.c
index 42ebb831f577..755162070cd6 100644
--- a/board/intel/edison/edison.c
+++ b/board/intel/edison/edison.c
@@ -9,6 +9,7 @@
#include <mmc.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <u-boot/md5.h>
#include <usb.h>
#include <watchdog.h>
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 3bd9a1263fc2..54a6787c13d7 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -30,6 +30,7 @@
#include <pci.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <post.h>
diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c
index 3225ca0197b2..1580b8d3cf98 100644
--- a/board/liebherr/display5/spl.c
+++ b/board/liebherr/display5/spl.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c
index 6eacd60ddca5..1da59eb0668c 100644
--- a/board/liebherr/mccmon6/spl.c
+++ b/board/liebherr/mccmon6/spl.c
@@ -25,6 +25,7 @@
#include <spl.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <asm/arch/mx6-ddr.h>
diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index ae1c76b133d3..06a8b390a0bf 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/board/ppcag/bg0900/bg0900.c b/board/ppcag/bg0900/bg0900.c
index 9d2ad0b20140..4f2ab859f303 100644
--- a/board/ppcag/bg0900/bg0900.c
+++ b/board/ppcag/bg0900/bg0900.c
@@ -18,6 +18,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <miiphy.h>
#include <netdev.h>
diff --git a/board/renesas/grpeach/grpeach.c b/board/renesas/grpeach/grpeach.c
index ac989eb29c2f..d60a496c958f 100644
--- a/board/renesas/grpeach/grpeach.c
+++ b/board/renesas/grpeach/grpeach.c
@@ -10,6 +10,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
#define RZA1_WDT_BASE 0xfcfe0000
#define WTCSR 0x00
diff --git a/board/renesas/ulcb/cpld.c b/board/renesas/ulcb/cpld.c
index 7a52eaa9d399..30f96966b574 100644
--- a/board/renesas/ulcb/cpld.c
+++ b/board/renesas/ulcb/cpld.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <linux/err.h>
#include <sysreset.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define CPLD_ADDR_MODE 0x00 /* RW */
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 4fcc0bf6f770..e79f5ddd2c9f 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -37,6 +37,7 @@
#include <dwc3-uboot.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <samsung/misc.h>
#include <dm/pinctrl.h>
#include <dm.h>
diff --git a/board/samsung/common/exynos5-dt.c b/board/samsung/common/exynos5-dt.c
index 4463f64dbc20..1783983ab115 100644
--- a/board/samsung/common/exynos5-dt.c
+++ b/board/samsung/common/exynos5-dt.c
@@ -27,6 +27,7 @@
#include <asm/arch/pinmux.h>
#include <asm/arch/power.h>
#include <asm/arch/sromc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/max77686_pmic.h>
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 9476a437113e..183579c4e3e1 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -15,6 +15,7 @@
#include <dm.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <usb/dwc2_udc.h>
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index f21cfe40d53c..18f311da9794 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -21,6 +21,7 @@
#include <asm/arch/watchdog.h>
#include <asm/arch/power.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <usb/dwc2_udc.h>
#include <power/max8997_pmic.h>
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index fcbead5c127c..6b008943da17 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -15,6 +15,7 @@
#include <asm/arch/power.h>
#include <asm/arch/mipi_dsim.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max77686_pmic.h>
#include <power/battery.h>
diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c
index fce8dfcc2344..dddf8d279bc7 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -19,6 +19,7 @@
#include <asm/arch/watchdog.h>
#include <ld9040.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <usb.h>
#include <usb/dwc2_udc.h>
diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c
index 2e4c72f97810..deee7b147df9 100644
--- a/board/sandbox/sandbox.c
+++ b/board/sandbox/sandbox.c
@@ -18,6 +18,7 @@
#include <asm/test.h>
#include <asm/u-boot-sandbox.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
/*
* Pointer to initial global data area
diff --git a/board/sandisk/sansa_fuze_plus/sfp.c b/board/sandisk/sansa_fuze_plus/sfp.c
index c6cce3b3fa63..b5052deb7acb 100644
--- a/board/sandisk/sansa_fuze_plus/sfp.c
+++ b/board/sandisk/sansa_fuze_plus/sfp.c
@@ -22,6 +22,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/siemens/draco/board.c b/board/siemens/draco/board.c
index 83cc14421dcb..7fa7d632ae2d 100644
--- a/board/siemens/draco/board.c
+++ b/board/siemens/draco/board.c
@@ -38,6 +38,7 @@
#include <watchdog.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "board.h"
#include "../common/factoryset.h"
#include <nand.h>
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index 102e7e82cd9d..dd37a64792a4 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -31,6 +31,7 @@
#include <asm/arch/clk.h>
#include <asm/gpio.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/mtd/rawnand.h>
#include <atmel_mci.h>
#include <asm/arch/at91_spi.h>
diff --git a/board/sipeed/maix/maix.c b/board/sipeed/maix/maix.c
index cbcb23cf5c28..a859b086075c 100644
--- a/board/sipeed/maix/maix.c
+++ b/board/sipeed/maix/maix.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <fdt_support.h>
#include <asm/io.h>
+#include <linux/errno.h>
phys_size_t get_effective_memsize(void)
{
diff --git a/board/softing/vining_2000/vining_2000.c b/board/softing/vining_2000/vining_2000.c
index 7c9c8d78b339..1c84539c1205 100644
--- a/board/softing/vining_2000/vining_2000.c
+++ b/board/softing/vining_2000/vining_2000.c
@@ -24,6 +24,7 @@
#include <asm/u-boot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <fsl_esdhc_imx.h>
diff --git a/board/st/common/stm32mp_dfu.c b/board/st/common/stm32mp_dfu.c
index a02cc29f7f24..2a0e9334e82d 100644
--- a/board/st/common/stm32mp_dfu.c
+++ b/board/st/common/stm32mp_dfu.c
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/arch/stm32prog.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/board/st/stm32f429-discovery/stm32f429-discovery.c b/board/st/stm32f429-discovery/stm32f429-discovery.c
index 3cbf5916ae95..c0e8c7575e2b 100644
--- a/board/st/stm32f429-discovery/stm32f429-discovery.c
+++ b/board/st/stm32f429-discovery/stm32f429-discovery.c
@@ -17,6 +17,7 @@
#include <log.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
diff --git a/board/st/stm32f429-evaluation/stm32f429-evaluation.c b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
index 4e503825dfaf..af34d9cea3cb 100644
--- a/board/st/stm32f429-evaluation/stm32f429-evaluation.c
+++ b/board/st/stm32f429-evaluation/stm32f429-evaluation.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
diff --git a/board/st/stm32f469-discovery/stm32f469-discovery.c b/board/st/stm32f469-discovery/stm32f469-discovery.c
index c9ce68f679bd..18da5ed2bcdf 100644
--- a/board/st/stm32f469-discovery/stm32f469-discovery.c
+++ b/board/st/stm32f469-discovery/stm32f469-discovery.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch/stm32.h>
diff --git a/board/st/stm32h743-disco/stm32h743-disco.c b/board/st/stm32h743-disco/stm32h743-disco.c
index 53bf09221972..f1a72e1d22e2 100644
--- a/board/st/stm32h743-disco/stm32h743-disco.c
+++ b/board/st/stm32h743-disco/stm32h743-disco.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/st/stm32h743-eval/stm32h743-eval.c b/board/st/stm32h743-eval/stm32h743-eval.c
index 53bf09221972..f1a72e1d22e2 100644
--- a/board/st/stm32h743-eval/stm32h743-eval.c
+++ b/board/st/stm32h743-eval/stm32h743-eval.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 61a86df37b4e..6669b4813058 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -41,6 +41,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index b2ee68d9c21f..f49984238f1c 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -33,6 +33,7 @@
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/board/synopsys/hsdk/clk-lib.c b/board/synopsys/hsdk/clk-lib.c
index 93f3dca9afd3..295e80afe722 100644
--- a/board/synopsys/hsdk/clk-lib.c
+++ b/board/synopsys/hsdk/clk-lib.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <stdio.h>
#include <dm/device.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "clk-lib.h"
diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c
index 6b1fff98a45c..ae55c0ab138e 100644
--- a/board/synopsys/hsdk/env-lib.c
+++ b/board/synopsys/hsdk/env-lib.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <log.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define MAX_CMD_LEN 25
diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c
index 4fe6219514de..0812126a98d4 100644
--- a/board/synopsys/hsdk/hsdk.c
+++ b/board/synopsys/hsdk/hsdk.c
@@ -19,6 +19,7 @@
#include <asm/global_data.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/kernel.h>
#include <linux/io.h>
diff --git a/board/synopsys/iot_devkit/iot_devkit.c b/board/synopsys/iot_devkit/iot_devkit.c
index 151ade5fb7c9..50af75fb7e27 100644
--- a/board/synopsys/iot_devkit/iot_devkit.c
+++ b/board/synopsys/iot_devkit/iot_devkit.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <fdtdec.h>
diff --git a/board/technexion/pico-imx6ul/pico-imx6ul.c b/board/technexion/pico-imx6ul/pico-imx6ul.c
index 11ae82b6bf2c..fb3d9ee726a6 100644
--- a/board/technexion/pico-imx6ul/pico-imx6ul.c
+++ b/board/technexion/pico-imx6ul/pico-imx6ul.c
@@ -23,6 +23,7 @@
#include <netdev.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <usb.h>
#include <power/pmic.h>
diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c
index 4af38f223cf0..5b59862be8a5 100644
--- a/board/technexion/pico-imx7d/pico-imx7d.c
+++ b/board/technexion/pico-imx7d/pico-imx7d.c
@@ -19,6 +19,7 @@
#include <common.h>
#include <i2c.h>
#include <miiphy.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pfuze3000_pmic.h>
#include "../../freescale/common/pfuze.h"
diff --git a/board/theadorable/fpga.c b/board/theadorable/fpga.c
index 4cfc4bbf0acd..904af3ed2e98 100644
--- a/board/theadorable/fpga.c
+++ b/board/theadorable/fpga.c
@@ -13,6 +13,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <asm/arch-mvebu/spi.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "theadorable.h"
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 67695ca61f55..17096159442a 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -42,6 +42,7 @@
#include <asm/u-boot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/tps65217.h>
#include <power/tps65910.h>
diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c
index 869131a08f95..808b99937031 100644
--- a/board/ti/am57xx/board.c
+++ b/board/ti/am57xx/board.c
@@ -36,6 +36,7 @@
#include <asm/arch/omap.h>
#include <usb.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/usb/gadget.h>
#include <dwc3-uboot.h>
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index 83067eb56638..5c2e8845057d 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -24,6 +24,7 @@
#include <spl.h>
#include <asm/arch/sys_proto.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index 862398e53a2b..5519d2d7e612 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -21,6 +21,7 @@
#include <mmc.h>
#include <errno.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 5872ce4648c9..bddffa049329 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -26,6 +26,7 @@
#include <dm.h>
#include <asm/u-boot.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
index e47da78fb773..dd9217f0fba5 100644
--- a/board/ti/omap5_uevm/evm.c
+++ b/board/ti/omap5_uevm/evm.c
@@ -19,6 +19,7 @@
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/usb/gadget.h>
#include <dwc3-uboot.h>
#include <dwc3-omap-uboot.h>
diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index 052a16bb7b3d..adc9bef31e7e 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -18,6 +18,7 @@
#include <pci_tegra.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/as3722.h>
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index 45cb4f9b9e23..9d091f05501e 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -25,6 +25,7 @@
#include <fsl_esdhc_imx.h>
#include <jffs2/load_kernel.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <mmc.h>
#include <miiphy.h>
diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c
index b0057b585c12..b0656501985e 100644
--- a/board/toradex/common/tdx-cfg-block.c
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "tdx-cfg-block.h"
#include "tdx-eeprom.h"
diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c
index c21419b3d543..19e4bc02a3bd 100644
--- a/board/toradex/verdin-imx8mm/spl.c
+++ b/board/toradex/verdin-imx8mm/spl.c
@@ -23,6 +23,7 @@
#include <dm/uclass.h>
#include <dm/uclass-internal.h>
#include <hang.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/bd71837.h>
#include <power/pmic.h>
diff --git a/board/udoo/neo/neo.c b/board/udoo/neo/neo.c
index 0a8f0fec9ce6..1853330e2ce3 100644
--- a/board/udoo/neo/neo.c
+++ b/board/udoo/neo/neo.c
@@ -29,6 +29,7 @@
#include <spl.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <i2c.h>
diff --git a/board/vscom/baltos/board.c b/board/vscom/baltos/board.c
index 434aadd8763b..a7ba5393183e 100644
--- a/board/vscom/baltos/board.c
+++ b/board/vscom/baltos/board.c
@@ -17,6 +17,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <spl.h>
#include <asm/arch/cpu.h>
diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c
index aa444959a06a..8c44d6d18998 100644
--- a/board/wandboard/wandboard.c
+++ b/board/wandboard/wandboard.c
@@ -28,6 +28,7 @@
#include <asm/io.h>
#include <env.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <miiphy.h>
diff --git a/board/warp/warp.c b/board/warp/warp.c
index 73d7aca7aadd..a99e74b0c953 100644
--- a/board/warp/warp.c
+++ b/board/warp/warp.c
@@ -20,6 +20,7 @@
#include <asm/mach-imx/mxc_i2c.h>
#include <asm/io.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <common.h>
#include <watchdog.h>
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 7272dc2bb2e8..db255f36788f 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -22,6 +22,7 @@
#include <asm/arch/crm_regs.h>
#include <netdev.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pfuze3000_pmic.h>
#include "../freescale/common/pfuze.h"
diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
index 458eef45adfb..83ff23dacdc1 100644
--- a/board/xilinx/common/board.c
+++ b/board/xilinx/common/board.c
@@ -11,6 +11,7 @@
#include <asm/sections.h>
#include <dm/uclass.h>
#include <i2c.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include "board.h"
diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 49478b05bea1..385f5c752a57 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -19,6 +19,7 @@
#include <asm/global_data.h>
#include <dm/lists.h>
#include <fdtdec.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 68c6f4827732..f310f0e56930 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -22,6 +22,7 @@
#include <dm/device.h>
#include <dm/uclass.h>
#include <versalpl.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "../common/board.h"
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index b3c486ab1b39..d9f3f15905a2 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -19,6 +19,7 @@
#include <zynqpl.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "../common/board.h"
diff --git a/board/xilinx/zynqmp/cmds.c b/board/xilinx/zynqmp/cmds.c
index 15a059896133..fe4ffba7fb63 100644
--- a/board/xilinx/zynqmp/cmds.c
+++ b/board/xilinx/zynqmp/cmds.c
@@ -15,6 +15,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
+#include <linux/errno.h>
static int do_zynqmp_verify_secure(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 58067c213a84..f185b17fc1b4 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -36,6 +36,7 @@
#include <g_dnl.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/string.h>
#include "../common/board.h"
diff --git a/board/xilinx/zynqmp_r5/board.c b/board/xilinx/zynqmp_r5/board.c
index 5c5a2e93863f..b6e2ad87de8e 100644
--- a/board/xilinx/zynqmp_r5/board.c
+++ b/board/xilinx/zynqmp_r5/board.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <fdtdec.h>
#include <init.h>
+#include <linux/errno.h>
int board_init(void)
{
diff --git a/cmd/acpi.c b/cmd/acpi.c
index a6df5785f5fb..a11cf5c29ac1 100644
--- a/cmd/acpi.c
+++ b/cmd/acpi.c
@@ -13,6 +13,7 @@
#include <asm/acpi_table.h>
#include <asm/global_data.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/cmd/axi.c b/cmd/axi.c
index 858fddee1318..68e8a06ae9ea 100644
--- a/cmd/axi.c
+++ b/cmd/axi.c
@@ -18,6 +18,7 @@
#include <log.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
/* Currently selected AXI bus device */
static struct udevice *axi_cur_bus;
diff --git a/cmd/bcb.c b/cmd/bcb.c
index 46737101f658..d145856d14f2 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -13,6 +13,7 @@
#include <part.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
enum bcb_cmd {
diff --git a/cmd/bind.c b/cmd/bind.c
index b008d4a6e8cc..91202fbd4a96 100644
--- a/cmd/bind.c
+++ b/cmd/bind.c
@@ -11,6 +11,7 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
static int bind_by_class_index(const char *uclass, int index,
const char *drv_name)
diff --git a/cmd/booti.c b/cmd/booti.c
index 52ce6bbc031e..405152c80ebe 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sizes.h>
#include <linux/string.h>
diff --git a/cmd/bootm.c b/cmd/bootm.c
index b6a2a75e8bf2..47272bf2cdc6 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -21,6 +21,7 @@
#include <asm/global_data.h>
#include <linux/ctype.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/zlib.h>
#include <mapmem.h>
diff --git a/cmd/button.c b/cmd/button.c
index 84ad1653c7b5..0371ae8774d7 100644
--- a/cmd/button.c
+++ b/cmd/button.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <button.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
static const char *const state_label[] = {
[BUTTON_OFF] = "off",
diff --git a/cmd/cpu.c b/cmd/cpu.c
index 27b0919709a8..4066f764292b 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <errno.h>
#include <stdio.h>
+#include <linux/errno.h>
static const char *cpu_feature_name[CPU_FEAT_COUNT] = {
"L1 cache",
diff --git a/cmd/efi.c b/cmd/efi.c
index 7b7a019e1af8..762d4c1c3807 100644
--- a/cmd/efi.c
+++ b/cmd/efi.c
@@ -13,6 +13,7 @@
#include <sort.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
static const char *const type_name[] = {
diff --git a/cmd/elf.c b/cmd/elf.c
index 37267ccacaee..3eaf1fe137dd 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -21,6 +21,7 @@
#include <asm/e820.h>
#include <linux/linkage.h>
#endif
+#include <linux/errno.h>
#include <linux/string.h>
/* Allow ports to override the default behavior */
diff --git a/cmd/ethsw.c b/cmd/ethsw.c
index fe93d2a8b173..83a229720deb 100644
--- a/cmd/ethsw.c
+++ b/cmd/ethsw.c
@@ -14,6 +14,7 @@
#include <net.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
static const char *ethsw_name;
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 3171556bb286..570c17d5bac4 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -16,6 +16,7 @@
#include <vsprintf.h>
#include <asm/gpio.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
__weak int name_to_gpio(const char *name)
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 086a91ab5776..11ad5f7de462 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -27,6 +27,7 @@
#include <memalign.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <stdlib.h>
#include <linux/string.h>
diff --git a/cmd/i2c.c b/cmd/i2c.c
index 2f442f0e8110..b8f587a26faf 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -80,6 +80,7 @@
#include <asm/byteorder.h>
#include <linux/compiler.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/cmd/led.c b/cmd/led.c
index 5ba868068523..8d0abd048eca 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define LED_TOGGLE LEDST_COUNT
diff --git a/cmd/mtd.c b/cmd/mtd.c
index 5c7493549953..70ba0d01c71e 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -18,6 +18,7 @@
#include <vsprintf.h>
#include <dm/devres.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/ctype.h>
diff --git a/cmd/mvebu/bubt.c b/cmd/mvebu/bubt.c
index 598a61be1fff..43d0a5bb409f 100644
--- a/cmd/mvebu/bubt.c
+++ b/cmd/mvebu/bubt.c
@@ -15,6 +15,7 @@
#include <vsprintf.h>
#include <errno.h>
#include <dm.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <spi_flash.h>
diff --git a/cmd/nand.c b/cmd/nand.c
index 286d5ee1df51..f52343c42cdc 100644
--- a/cmd/nand.c
+++ b/cmd/nand.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/cache.h>
+#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <command.h>
#include <console.h>
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index 84af5f05e976..e450bb14a54b 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -39,6 +39,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/cmd/osd.c b/cmd/osd.c
index 9ad0407521ac..6cccd8968c19 100644
--- a/cmd/osd.c
+++ b/cmd/osd.c
@@ -17,6 +17,7 @@
#include <video_osd.h>
#include <malloc.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* Container for selected OSD device */
diff --git a/cmd/pci.c b/cmd/pci.c
index 48a945e30f05..ead55d46c21b 100644
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -24,6 +24,7 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <pci.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct pci_reg_info {
diff --git a/cmd/pinmux.c b/cmd/pinmux.c
index 60856cdc3c4f..84cbf564e8ad 100644
--- a/cmd/pinmux.c
+++ b/cmd/pinmux.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <dm/pinctrl.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define LIMIT_DEVNAME 30
diff --git a/cmd/pmic.c b/cmd/pmic.c
index 3ac12938c8ac..8e7956724f67 100644
--- a/cmd/pmic.c
+++ b/cmd/pmic.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#define LIMIT_DEV 32
diff --git a/cmd/pxe.c b/cmd/pxe.c
index 7673469d39f0..8804faa170a9 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -10,6 +10,7 @@
#include <net.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include "pxe_utils.h"
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index 748c314fa077..af6071ed68a6 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -15,6 +15,7 @@
#include <net.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <errno.h>
diff --git a/cmd/regulator.c b/cmd/regulator.c
index cdf8940fa9e3..e492da4f03c4 100644
--- a/cmd/regulator.c
+++ b/cmd/regulator.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/cmd/spi.c b/cmd/spi.c
index 72662f0e0b11..2079ed0e1bea 100644
--- a/cmd/spi.c
+++ b/cmd/spi.c
@@ -15,6 +15,7 @@
#include <spi.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*-----------------------------------------------------------------------
diff --git a/cmd/sysboot.c b/cmd/sysboot.c
index 9090b8ee4415..8a965eaf12d3 100644
--- a/cmd/sysboot.c
+++ b/cmd/sysboot.c
@@ -6,6 +6,7 @@
#include <fs.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "pxe_utils.h"
diff --git a/cmd/tlv_eeprom.c b/cmd/tlv_eeprom.c
index 98104fb7f2d1..ca315dad0cc7 100644
--- a/cmd/tlv_eeprom.c
+++ b/cmd/tlv_eeprom.c
@@ -21,6 +21,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c
index 1a6e80a38666..56c5aca12c8a 100644
--- a/cmd/tpm-v2.c
+++ b/cmd/tpm-v2.c
@@ -13,6 +13,7 @@
#include <tpm-common.h>
#include <tpm-v2.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "tpm-user-utils.h"
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index 84d919d4467c..36a905cd7716 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -20,6 +20,7 @@
#include <vsprintf.h>
#include <watchdog.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/cmd/wdt.c b/cmd/wdt.c
index 422be75a0db3..c9c7a610efd3 100644
--- a/cmd/wdt.c
+++ b/cmd/wdt.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <wdt.h>
+#include <linux/errno.h>
static struct udevice *currdev;
diff --git a/common/android_ab.c b/common/android_ab.c
index 794df3fde7ad..4c58f7a75c85 100644
--- a/common/android_ab.c
+++ b/common/android_ab.c
@@ -11,6 +11,7 @@
#include <part.h>
#include <memalign.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
#include <u-boot/crc.h>
diff --git a/common/avb_verify.c b/common/avb_verify.c
index 7a7a50968525..230d576835d7 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -13,6 +13,7 @@
#include <part.h>
#include <stdio.h>
#include <tee.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <tee/optee_ta_avb.h>
diff --git a/common/bloblist.c b/common/bloblist.c
index 9abd360db8db..20a29c82bb51 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -10,6 +10,7 @@
#include <mapmem.h>
#include <spl.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/common/board_r.c b/common/board_r.c
index 7ddf7c78835e..f272e1e46688 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -26,6 +26,7 @@
#include <asm/cache.h>
#include <asm/global_data.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <u-boot/crc.h>
/* TODO: can we just include all these headers whether needed or not? */
#if defined(CONFIG_CMD_BEDBUG)
diff --git a/common/boot_fit.c b/common/boot_fit.c
index dfc2a3117d15..d1e298baf5bb 100644
--- a/common/boot_fit.c
+++ b/common/boot_fit.c
@@ -11,6 +11,7 @@
#include <errno.h>
#include <image.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
static int fdt_offset(const void *fit)
diff --git a/common/bootm.c b/common/bootm.c
index 901e2a1e253e..8398054ab5c5 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -25,6 +25,7 @@
#if defined(CONFIG_CMD_USB)
#include <usb.h>
#endif
+#include <linux/errno.h>
#include <linux/string.h>
#else
#include "mkimage.h"
diff --git a/common/bootretry.c b/common/bootretry.c
index 5417389a9a39..41d52a7b9c14 100644
--- a/common/bootretry.c
+++ b/common/bootretry.c
@@ -13,6 +13,7 @@
#include <time.h>
#include <vsprintf.h>
#include <watchdog.h>
+#include <linux/errno.h>
#ifndef CONFIG_BOOT_RETRY_MIN
#define CONFIG_BOOT_RETRY_MIN CONFIG_BOOT_RETRY_TIME
diff --git a/common/bootstage.c b/common/bootstage.c
index 190379f8ac07..9eaa65b009f5 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -20,6 +20,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/common/bouncebuf.c b/common/bouncebuf.c
index bcca7838bcc7..519ca264992b 100644
--- a/common/bouncebuf.c
+++ b/common/bouncebuf.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <bouncebuf.h>
#include <asm/cache.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int addr_aligned(struct bounce_buffer *state)
diff --git a/common/cli_hush.c b/common/cli_hush.c
index 7a66d337148e..34facc8397eb 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -89,6 +89,7 @@
#endif
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#ifndef __U_BOOT__
diff --git a/common/common_fit.c b/common/common_fit.c
index 50b165016d2d..8872b83646af 100644
--- a/common/common_fit.c
+++ b/common/common_fit.c
@@ -9,6 +9,7 @@
#include <image.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/common/edid.c b/common/edid.c
index d539c5215070..b047c7246300 100644
--- a/common/edid.c
+++ b/common/edid.c
@@ -16,6 +16,7 @@
#include <log.h>
#include <stdio.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
int edid_check_info(struct edid1_info *edid_info)
diff --git a/common/image-android.c b/common/image-android.c
index 1e79f6b144c7..1615f2c415d5 100644
--- a/common/image-android.c
+++ b/common/image-android.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <asm/unaligned.h>
#include <mapmem.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/common/image-fdt.c b/common/image-fdt.c
index e01e88b989a1..c05495ee36c2 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <mapmem.h>
#include <asm/io.h>
diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c
index 1247d0280e2f..e65e27f5109f 100644
--- a/common/image-fit-sig.c
+++ b/common/image-fit-sig.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
#endif /* !USE_HOSTCC*/
diff --git a/common/image-fit.c b/common/image-fit.c
index 01353f0157d4..bc12b3fe0e6c 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
#include <linux/kconfig.h>
#include <common.h>
#include <errno.h>
diff --git a/common/lcd_simplefb.c b/common/lcd_simplefb.c
index 6dd7972f7093..7a2f0056fd4e 100644
--- a/common/lcd_simplefb.c
+++ b/common/lcd_simplefb.c
@@ -11,6 +11,7 @@
#include <lcd.h>
#include <fdt_support.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <video.h>
diff --git a/common/log.c b/common/log.c
index c4eaed2c91ed..79e23aacece5 100644
--- a/common/log.c
+++ b/common/log.c
@@ -13,6 +13,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <dm/uclass.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/menu.c b/common/menu.c
index d61c274eedf2..b7ee3cb8e494 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <errno.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <linux/string.h>
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 5fd0119cb59d..671bda67ed7e 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -24,6 +24,7 @@
#include <asm/u-boot.h>
#include <nand.h>
#include <fat.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
#include <version.h>
diff --git a/common/spl/spl_dfu.c b/common/spl/spl_dfu.c
index 8a779da8fa1e..4709ffaff94c 100644
--- a/common/spl/spl_dfu.c
+++ b/common/spl/spl_dfu.c
@@ -15,6 +15,7 @@
#include <g_dnl.h>
#include <usb.h>
#include <dfu.h>
+#include <linux/errno.h>
#include <linux/printk.h>
static int run_dfu(int usb_index, char *interface, char *devstring)
diff --git a/common/spl/spl_ext.c b/common/spl/spl_ext.c
index 50f0f5f4ca77..4f152270da77 100644
--- a/common/spl/spl_ext.c
+++ b/common/spl/spl_ext.c
@@ -9,6 +9,7 @@
#include <ext4fs.h>
#include <errno.h>
#include <image.h>
+#include <linux/errno.h>
int spl_load_image_ext(struct spl_image_info *spl_image,
struct blk_desc *block_dev, int partition,
diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 20b440906500..f31fdee02bac 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -17,6 +17,7 @@
#include <fat.h>
#include <errno.h>
#include <image.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
static int fat_registered;
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 87d482695583..4d588a85c8fe 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <asm/cache.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c
index 6813759aa4e2..d8ca3e9873bd 100644
--- a/common/spl/spl_legacy.c
+++ b/common/spl/spl_legacy.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <spl.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <lzma/LzmaTypes.h>
#include <lzma/LzmaDec.h>
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 1cfe4b2b442d..897ea3fbfa6f 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -17,6 +17,7 @@
#include <errno.h>
#include <mmc.h>
#include <image.h>
+#include <linux/errno.h>
static int mmc_load_legacy(struct spl_image_info *spl_image, struct mmc *mmc,
ulong sector, struct image_header *header)
diff --git a/common/spl/spl_net.c b/common/spl/spl_net.c
index ac7be6360bbc..b4a0a56b7016 100644
--- a/common/spl/spl_net.c
+++ b/common/spl/spl_net.c
@@ -14,6 +14,7 @@
#include <spl.h>
#include <net.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/common/spl/spl_opensbi.c b/common/spl/spl_opensbi.c
index 4bde3bb46874..086759d63f2d 100644
--- a/common/spl/spl_opensbi.c
+++ b/common/spl/spl_opensbi.c
@@ -14,6 +14,7 @@
#include <asm/global_data.h>
#include <asm/smp.h>
#include <opensbi.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/printk.h>
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 3ac3b743d992..599243f1823f 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -17,6 +17,7 @@
#include <errno.h>
#include <fat.h>
#include <image.h>
+#include <linux/errno.h>
#ifndef CONFIG_SYS_SATA_FAT_BOOT_PARTITION
#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1
diff --git a/common/spl/spl_sdp.c b/common/spl/spl_sdp.c
index 78ecc962551e..c406d2ce0389 100644
--- a/common/spl/spl_sdp.c
+++ b/common/spl/spl_sdp.c
@@ -10,6 +10,7 @@
#include <usb.h>
#include <g_dnl.h>
#include <sdp.h>
+#include <linux/errno.h>
#include <linux/printk.h>
static int spl_sdp_load_image(struct spl_image_info *spl_image,
diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c
index caa5ed10e1a8..1121813abf05 100644
--- a/common/spl/spl_spi.c
+++ b/common/spl/spl_spi.c
@@ -17,6 +17,7 @@
#include <spl.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index 33bdc3617486..4ad5dfe9c720 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <usb.h>
#include <fat.h>
+#include <linux/errno.h>
static int usb_stor_curr_dev = -1; /* current device */
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 7124f604b0ab..f9c7c2b04fc9 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <xyzModem.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/common/splash.c b/common/splash.c
index 1f92d791df8a..174f82486eb7 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -27,6 +27,7 @@
#include <lcd.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
static struct splash_location default_splash_locations[] = {
diff --git a/common/splash_source.c b/common/splash_source.c
index 99dce118a8f2..9c5c285b76ed 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -23,6 +23,7 @@
#include <usb.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/common/stdio.c b/common/stdio.c
index eea1507754db..634ab9203af2 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -21,6 +21,7 @@
#include <splash.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#if defined(CONFIG_SYS_I2C)
diff --git a/common/update.c b/common/update.c
index 5cf02ddec2db..ab92824c70f4 100644
--- a/common/update.c
+++ b/common/update.c
@@ -11,6 +11,7 @@
#include <image.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/common/usb.c b/common/usb.c
index 5a3193930251..16b51e8f4c7c 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -40,6 +40,7 @@
#include <errno.h>
#include <usb.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define USB_BUFSIZ 512
diff --git a/common/usb_hub.c b/common/usb_hub.c
index a846fc5dff9a..46d074f0b55d 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -36,6 +36,7 @@
#include <asm/unaligned.h>
#include <linux/ctype.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <asm/byteorder.h>
#ifdef CONFIG_SANDBOX
diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 0d3a34ea5c11..3fafbda40fd4 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -19,6 +19,7 @@
#include <time.h>
#include <watchdog.h>
#include <asm/byteorder.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb.h>
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 9fc002bcf67a..d46e9288c05f 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -48,6 +48,7 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <part.h>
diff --git a/disk/part.c b/disk/part.c
index fdde4d61eba9..aa10ed3134b3 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <ubifs_uboot.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#undef PART_DEBUG
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 659373791995..f062bc383ea8 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -27,6 +27,7 @@
#include <part_efi.h>
#include <linux/compiler.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
index c1dd1f0599dc..fa88040126f7 100644
--- a/drivers/adc/adc-uclass.c
+++ b/drivers/adc/adc-uclass.c
@@ -14,6 +14,7 @@
#include <dm/uclass-internal.h>
#include <adc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
diff --git a/drivers/adc/exynos-adc.c b/drivers/adc/exynos-adc.c
index 973533d261a9..7e9ad41ec26d 100644
--- a/drivers/adc/exynos-adc.c
+++ b/drivers/adc/exynos-adc.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <adc.h>
#include <asm/arch/adc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct exynos_adc_priv {
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c
index d7c02f1aa3f4..785d37c238f5 100644
--- a/drivers/adc/meson-saradc.c
+++ b/drivers/adc/meson-saradc.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/math64.h>
#include <linux/bitfield.h>
#include <linux/printk.h>
diff --git a/drivers/adc/rockchip-saradc.c b/drivers/adc/rockchip-saradc.c
index 61e3f2cef903..26e037509cdc 100644
--- a/drivers/adc/rockchip-saradc.c
+++ b/drivers/adc/rockchip-saradc.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define SARADC_CTRL_CHN_MASK GENMASK(2, 0)
diff --git a/drivers/adc/sandbox.c b/drivers/adc/sandbox.c
index fa1174bbaa3f..0bbb8efccbd7 100644
--- a/drivers/adc/sandbox.c
+++ b/drivers/adc/sandbox.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <adc.h>
#include <sandbox-adc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/**
diff --git a/drivers/adc/stm32-adc-core.c b/drivers/adc/stm32-adc-core.c
index f20c46fb36cf..a3d255d786c4 100644
--- a/drivers/adc/stm32-adc-core.c
+++ b/drivers/adc/stm32-adc-core.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include "stm32-adc-core.h"
diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c
index 3f0ed48846c7..8c90bb711ca8 100644
--- a/drivers/adc/stm32-adc.c
+++ b/drivers/adc/stm32-adc.c
@@ -13,6 +13,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include "stm32-adc-core.h"
diff --git a/drivers/ata/ahci_sunxi.c b/drivers/ata/ahci_sunxi.c
index 162e7de5194b..f584317ab23b 100644
--- a/drivers/ata/ahci_sunxi.c
+++ b/drivers/ata/ahci_sunxi.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define AHCI_PHYCS0R 0x00c0
#define AHCI_PHYCS1R 0x00c4
diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c
index f2109c80ce2c..884ce4449d4d 100644
--- a/drivers/ata/fsl_sata.c
+++ b/drivers/ata/fsl_sata.c
@@ -21,6 +21,7 @@
#include <fis.h>
#include <sata.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "fsl_sata.h"
diff --git a/drivers/ata/sata.c b/drivers/ata/sata.c
index b70de83df2cd..453338e944b7 100644
--- a/drivers/ata/sata.c
+++ b/drivers/ata/sata.c
@@ -16,6 +16,7 @@
#include <part.h>
#include <sata.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifndef CONFIG_AHCI
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index 77508aa5bc76..cd10d228964a 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <scsi.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/ioport.h>
/* Vendor Specific Register Offsets */
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index b55b9daab744..54a9141808b5 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -20,6 +20,7 @@
#include <libata.h>
#include <sata.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#if CONFIG_IS_ENABLED(BLK)
diff --git a/drivers/axi/axi-emul-uclass.c b/drivers/axi/axi-emul-uclass.c
index b28351f1adb0..fb56b824513f 100644
--- a/drivers/axi/axi-emul-uclass.c
+++ b/drivers/axi/axi-emul-uclass.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <dm/device-internal.h>
#include <asm/axi.h>
+#include <linux/errno.h>
int axi_sandbox_get_emul(struct udevice *bus, ulong address,
enum axi_size_t size, struct udevice **emulp)
diff --git a/drivers/axi/axi-uclass.c b/drivers/axi/axi-uclass.c
index af8acd9f88ba..3d642e710784 100644
--- a/drivers/axi/axi-uclass.c
+++ b/drivers/axi/axi-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <axi.h>
+#include <linux/errno.h>
int axi_read(struct udevice *dev, ulong address, void *data,
enum axi_size_t size)
diff --git a/drivers/axi/axi_sandbox.c b/drivers/axi/axi_sandbox.c
index b91c91f6b3b6..41f62065e8ed 100644
--- a/drivers/axi/axi_sandbox.c
+++ b/drivers/axi/axi_sandbox.c
@@ -8,6 +8,7 @@
#include <axi.h>
#include <dm.h>
#include <asm/axi.h>
+#include <linux/errno.h>
/*
* This driver implements a AXI bus for the sandbox architecture for testing
diff --git a/drivers/axi/ihs_axi.c b/drivers/axi/ihs_axi.c
index 394551109070..0e4cbab9762c 100644
--- a/drivers/axi/ihs_axi.c
+++ b/drivers/axi/ihs_axi.c
@@ -14,6 +14,7 @@
#include <regmap.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/**
* struct ihs_axi_regs - Structure for the register map of a IHS AXI device
diff --git a/drivers/axi/sandbox_store.c b/drivers/axi/sandbox_store.c
index 42bcae6af26b..72a4191946e3 100644
--- a/drivers/axi/sandbox_store.c
+++ b/drivers/axi/sandbox_store.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <log.h>
#include <malloc.h>
+#include <linux/errno.h>
/**
* struct sandbox_store_priv - Private data structure of a AXI store device
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index dbf74a45eed0..d49839542a55 100644
--- a/drivers/bios_emulator/atibios.c
+++ b/drivers/bios_emulator/atibios.c
@@ -54,6 +54,7 @@
#include <stdio.h>
#include <vbe.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "biosemui.h"
diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index e830a9b6f9cc..10fffb096757 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -16,6 +16,7 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
static const char *if_typename_str[IF_TYPE_COUNT] = {
diff --git a/drivers/block/blk_legacy.c b/drivers/block/blk_legacy.c
index 2b02e4d3b1c0..c1a78f72a368 100644
--- a/drivers/block/blk_legacy.c
+++ b/drivers/block/blk_legacy.c
@@ -9,6 +9,7 @@
#include <part.h>
#include <stdio.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct blk_driver *blk_driver_lookup_type(int if_type)
diff --git a/drivers/board/board-uclass.c b/drivers/board/board-uclass.c
index b5485e9895b8..57a28f065bfc 100644
--- a/drivers/board/board-uclass.c
+++ b/drivers/board/board-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <board.h>
+#include <linux/errno.h>
int board_get(struct udevice **devp)
{
diff --git a/drivers/board/gazerbeam.c b/drivers/board/gazerbeam.c
index ed50fc530cb4..7be676fff58c 100644
--- a/drivers/board/gazerbeam.c
+++ b/drivers/board/gazerbeam.c
@@ -10,6 +10,7 @@
#include <i2c.h>
#include <log.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include "gazerbeam.h"
diff --git a/drivers/board/sandbox.c b/drivers/board/sandbox.c
index 22aaad102838..5de827504188 100644
--- a/drivers/board/sandbox.c
+++ b/drivers/board/sandbox.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <board.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include "sandbox.h"
diff --git a/drivers/bootcount/bootcount-uclass.c b/drivers/bootcount/bootcount-uclass.c
index 2a492c87ebdf..81ca0027ebd8 100644
--- a/drivers/bootcount/bootcount-uclass.c
+++ b/drivers/bootcount/bootcount-uclass.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <bootcount.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
int dm_bootcount_get(struct udevice *dev, u32 *bootcount)
diff --git a/drivers/bootcount/bootcount.c b/drivers/bootcount/bootcount.c
index e8db8542f934..0a2fb50efeae 100644
--- a/drivers/bootcount/bootcount.c
+++ b/drivers/bootcount/bootcount.c
@@ -8,6 +8,7 @@
#include <cpu_func.h>
#include <asm/cache.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
#if !defined(CONFIG_DM_BOOTCOUNT)
/* Now implement the generic default functions */
diff --git a/drivers/bootcount/i2c-eeprom.c b/drivers/bootcount/i2c-eeprom.c
index a3aa0cf55957..141713c3d526 100644
--- a/drivers/bootcount/i2c-eeprom.c
+++ b/drivers/bootcount/i2c-eeprom.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <i2c_eeprom.h>
#include <log.h>
+#include <linux/errno.h>
static const u8 bootcount_magic = 0xbc;
diff --git a/drivers/bootcount/rtc.c b/drivers/bootcount/rtc.c
index 076a8bb2be8d..c6b30cd1483e 100644
--- a/drivers/bootcount/rtc.c
+++ b/drivers/bootcount/rtc.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <log.h>
#include <rtc.h>
+#include <linux/errno.h>
static const u8 bootcount_magic = 0xbc;
diff --git a/drivers/button/button-gpio.c b/drivers/button/button-gpio.c
index 985ae7f5a768..3e6f11f74d09 100644
--- a/drivers/button/button-gpio.c
+++ b/drivers/button/button-gpio.c
@@ -10,6 +10,7 @@
#include <dm/uclass-internal.h>
#include <log.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
struct button_gpio_priv {
struct gpio_desc gpio;
diff --git a/drivers/button/button-uclass.c b/drivers/button/button-uclass.c
index 1c742c265cfd..c2c3960d7b18 100644
--- a/drivers/button/button-uclass.c
+++ b/drivers/button/button-uclass.c
@@ -9,6 +9,7 @@
#include <button.h>
#include <dm.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
int button_get_by_label(const char *label, struct udevice **devp)
{
diff --git a/drivers/cache/cache-ncore.c b/drivers/cache/cache-ncore.c
index efef05613781..279e3c2801bf 100644
--- a/drivers/cache/cache-ncore.c
+++ b/drivers/cache/cache-ncore.c
@@ -7,6 +7,7 @@
#include <hang.h>
#include <stdio.h>
#include <wait_bit.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <linux/bitops.h>
diff --git a/drivers/cache/cache-uclass.c b/drivers/cache/cache-uclass.c
index 3b20a10f087d..10497b37eda0 100644
--- a/drivers/cache/cache-uclass.c
+++ b/drivers/cache/cache-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <cache.h>
#include <dm.h>
+#include <linux/errno.h>
int cache_get_info(struct udevice *dev, struct cache_info *info)
{
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index 7adc69d514c1..298eadb4af12 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <dm/ofnode.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
struct l2cache {
volatile u64 configure;
diff --git a/drivers/clk/altera/clk-agilex.c b/drivers/clk/altera/clk-agilex.c
index 8254ce68e4d5..e6c01dd7b32f 100644
--- a/drivers/clk/altera/clk-agilex.c
+++ b/drivers/clk/altera/clk-agilex.c
@@ -13,6 +13,7 @@
#include <dm/util.h>
#include <dt-bindings/clock/agilex-clock.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <asm/arch/clock_manager.h>
diff --git a/drivers/clk/altera/clk-arria10.c b/drivers/clk/altera/clk-arria10.c
index b05648e8a545..85300e611785 100644
--- a/drivers/clk/altera/clk-arria10.c
+++ b/drivers/clk/altera/clk-arria10.c
@@ -14,6 +14,7 @@
#include <dm/lists.h>
#include <dm/util.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <asm/arch/clock_manager.h>
diff --git a/drivers/clk/analogbits/wrpll-cln28hpc.c b/drivers/clk/analogbits/wrpll-cln28hpc.c
index a3cb109d3575..291a23d93f70 100644
--- a/drivers/clk/analogbits/wrpll-cln28hpc.c
+++ b/drivers/clk/analogbits/wrpll-cln28hpc.c
@@ -23,6 +23,7 @@
#include <linux/bug.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/math64.h>
#include <linux/clk/analogbits-wrpll-cln28hpc.h>
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index d83e6590d6c3..e837e0cd19a7 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -14,6 +14,7 @@
#include <dt-bindings/clock/ast2500-scu.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
/*
* MAC Clock Delay settings, taken from Aspeed SDK
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c
index c1ca09c21099..85ec506de128 100644
--- a/drivers/clk/at91/clk-main.c
+++ b/drivers/clk/at91/clk-main.c
@@ -8,6 +8,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include "pmc.h"
diff --git a/drivers/clk/at91/clk-plla.c b/drivers/clk/at91/clk-plla.c
index 4f246afa18ae..ae7df40f20d0 100644
--- a/drivers/clk/at91/clk-plla.c
+++ b/drivers/clk/at91/clk-plla.c
@@ -8,6 +8,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include "pmc.h"
diff --git a/drivers/clk/at91/clk-plladiv.c b/drivers/clk/at91/clk-plladiv.c
index ca6158ef6ab2..7c074327e27c 100644
--- a/drivers/clk/at91/clk-plladiv.c
+++ b/drivers/clk/at91/clk-plladiv.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk-uclass.h>
#include <dm/device.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include "pmc.h"
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c
index 76b1958670d6..8e1a5f757742 100644
--- a/drivers/clk/at91/clk-system.c
+++ b/drivers/clk/at91/clk-system.c
@@ -8,6 +8,7 @@
#include <clk-uclass.h>
#include <dm.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include "pmc.h"
diff --git a/drivers/clk/at91/clk-utmi.c b/drivers/clk/at91/clk-utmi.c
index 72b97af1bcb2..99a1ae865353 100644
--- a/drivers/clk/at91/clk-utmi.c
+++ b/drivers/clk/at91/clk-utmi.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <stdio.h>
#include <syscon.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <mach/at91_pmc.h>
#include <mach/at91_sfr.h>
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index 11859db32654..91e57b387770 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -11,6 +11,7 @@
#include <asm/global_data.h>
#include <dm/lists.h>
#include <dm/util.h>
+#include <linux/errno.h>
#include "pmc.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c
index fd47872ab992..a6e49a7765e4 100644
--- a/drivers/clk/clk-cdce9xx.c
+++ b/drivers/clk/clk-cdce9xx.c
@@ -15,6 +15,7 @@
#include <i2c.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define MAX_NUMBER_OF_PLLS 4
#define MAX_NUMER_OF_OUTPUTS 9
diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c
index 819bfca2fcf9..62d404d791db 100644
--- a/drivers/clk/clk-composite.c
+++ b/drivers/clk/clk-composite.c
@@ -13,6 +13,7 @@
#include <linux/clk-provider.h>
#include <clk.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c
index 0e0c2d48b741..d2039512b216 100644
--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -21,6 +21,7 @@
#include <linux/bug.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <div64.h>
#include <clk.h>
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index 0eb24b87fc39..c181c0b6ea5f 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -13,6 +13,7 @@
#include <linux/clk-provider.h>
#include <div64.h>
#include <clk.h>
+#include <linux/errno.h>
#include "clk.h"
#include <linux/err.h>
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c
index cdca3e38d0d5..221db043abcc 100644
--- a/drivers/clk/clk-gate.c
+++ b/drivers/clk/clk-gate.c
@@ -16,6 +16,7 @@
#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <clk.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "clk.h"
#include <linux/err.h>
diff --git a/drivers/clk/clk-hsdk-cgu.c b/drivers/clk/clk-hsdk-cgu.c
index 2067316e672f..6f4cd1ecf2ab 100644
--- a/drivers/clk/clk-hsdk-cgu.c
+++ b/drivers/clk/clk-hsdk-cgu.c
@@ -17,6 +17,7 @@
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <asm/arcregs.h>
#include <linux/printk.h>
diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index 446c0c7b52de..cba7113f3b63 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -31,6 +31,7 @@
#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <clk.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "clk.h"
diff --git a/drivers/clk/clk-ti-sci.c b/drivers/clk/clk-ti-sci.c
index 7a9a6451374d..0f31ee73d9e3 100644
--- a/drivers/clk/clk-ti-sci.c
+++ b/drivers/clk/clk-ti-sci.c
@@ -16,6 +16,7 @@
#include <malloc.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <k3-avs.h>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 8ebfecd347a8..d11edf6058fd 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -21,6 +21,7 @@
#include <linux/bug.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
+#include <linux/errno.h>
static inline const struct clk_ops *clk_dev_ops(struct udevice *dev)
{
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index f55d57a95e65..5dac14c185e5 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -13,6 +13,7 @@
#include <dm/lists.h>
#include <dm/device-internal.h>
#include <clk.h>
+#include <linux/errno.h>
int clk_register(struct clk *clk, const char *drv_name,
const char *name, const char *parent_name)
diff --git a/drivers/clk/clk_bcm6345.c b/drivers/clk/clk_bcm6345.c
index b850b9fc069b..a03cee546c72 100644
--- a/drivers/clk/clk_bcm6345.c
+++ b/drivers/clk/clk_bcm6345.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define MAX_CLKS 32
diff --git a/drivers/clk/clk_boston.c b/drivers/clk/clk_boston.c
index 47424d8f5333..c97d457062c6 100644
--- a/drivers/clk/clk_boston.c
+++ b/drivers/clk/clk_boston.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct clk_boston {
diff --git a/drivers/clk/clk_pic32.c b/drivers/clk/clk_pic32.c
index 664d8f986150..c9b047914a4b 100644
--- a/drivers/clk/clk_pic32.c
+++ b/drivers/clk/clk_pic32.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <mach/pic32.h>
#include <dt-bindings/clock/microchip,clock.h>
diff --git a/drivers/clk/clk_sandbox.c b/drivers/clk/clk_sandbox.c
index 768fbb7c5203..d1e2c0dab316 100644
--- a/drivers/clk/clk_sandbox.c
+++ b/drivers/clk/clk_sandbox.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <malloc.h>
#include <asm/clk.h>
+#include <linux/errno.h>
struct sandbox_clk_priv {
bool probed;
diff --git a/drivers/clk/clk_sandbox_ccf.c b/drivers/clk/clk_sandbox_ccf.c
index 0619d04f0ece..b282735c1d6e 100644
--- a/drivers/clk/clk_sandbox_ccf.c
+++ b/drivers/clk/clk_sandbox_ccf.c
@@ -17,6 +17,7 @@
#include <linux/clk-provider.h>
#include <sandbox-clk.h>
#include <linux/err.h>
+#include <linux/errno.h>
/*
* Sandbox implementation of CCF primitives necessary for clk-uclass testing
diff --git a/drivers/clk/clk_sandbox_test.c b/drivers/clk/clk_sandbox_test.c
index 873383856f92..6eef29f9dc3b 100644
--- a/drivers/clk/clk_sandbox_test.c
+++ b/drivers/clk/clk_sandbox_test.c
@@ -10,6 +10,7 @@
#include <asm/clk.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
struct sandbox_clk_test {
struct clk clks[SANDBOX_CLK_TEST_NON_DEVM_COUNT];
diff --git a/drivers/clk/clk_stm32f.c b/drivers/clk/clk_stm32f.c
index 45f5f567f8d5..4d0eadf7e4f5 100644
--- a/drivers/clk/clk_stm32f.c
+++ b/drivers/clk/clk_stm32f.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <stm32_rcc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/clk/clk_stm32h7.c b/drivers/clk/clk_stm32h7.c
index c1856d8678b5..d97a211423c3 100644
--- a/drivers/clk/clk_stm32h7.c
+++ b/drivers/clk/clk_stm32h7.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dm/root.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <dt-bindings/clock/stm32h7-clks.h>
diff --git a/drivers/clk/clk_stm32mp1.c b/drivers/clk/clk_stm32mp1.c
index b2e0c8ca00d0..e7e57ad73a95 100644
--- a/drivers/clk/clk_stm32mp1.c
+++ b/drivers/clk/clk_stm32mp1.c
@@ -17,6 +17,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <asm/arch/sys_proto.h>
diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
index 19db23159f02..b73dcc2980d6 100644
--- a/drivers/clk/clk_versal.c
+++ b/drivers/clk/clk_versal.c
@@ -19,6 +19,7 @@
#include <asm/arch/sys_proto.h>
#include <zynqmp_firmware.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define MAX_PARENT 100
diff --git a/drivers/clk/clk_vexpress_osc.c b/drivers/clk/clk_vexpress_osc.c
index b48319bba67f..950c72d573a7 100644
--- a/drivers/clk/clk_vexpress_osc.c
+++ b/drivers/clk/clk_vexpress_osc.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <misc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define CLK_FUNCTION BIT(20)
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c
index f590ad8dfa9a..2c8b851295cf 100644
--- a/drivers/clk/clk_zynq.c
+++ b/drivers/clk/clk_zynq.c
@@ -20,6 +20,7 @@
#include <asm/arch/clk.h>
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
+#include <linux/errno.h>
/* Register bitfield defines */
#define PLLCTRL_FBDIV_MASK 0x7f000
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index 8c62b63ea2b4..3ebf6223c06d 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -16,6 +16,7 @@
#include <asm/arch/sys_proto.h>
#include <dm.h>
#include <linux/err.h>
+#include <linux/errno.h>
static const resource_size_t zynqmp_crf_apb_clkc_base = 0xfd1a0020;
static const resource_size_t zynqmp_crl_apb_clkc_base = 0xff5e0020;
diff --git a/drivers/clk/exynos/clk-exynos7420.c b/drivers/clk/exynos/clk-exynos7420.c
index 4a023ea736b4..d86f84acef11 100644
--- a/drivers/clk/exynos/clk-exynos7420.c
+++ b/drivers/clk/exynos/clk-exynos7420.c
@@ -11,6 +11,7 @@
#include <clk-uclass.h>
#include <asm/io.h>
#include <dt-bindings/clock/exynos7420-clk.h>
+#include <linux/errno.h>
#include "clk-pll.h"
#define DIVIDER(reg, shift, mask) \
diff --git a/drivers/clk/ics8n3qv01.c b/drivers/clk/ics8n3qv01.c
index 95f1c7641f2e..7d551b7c8d85 100644
--- a/drivers/clk/ics8n3qv01.c
+++ b/drivers/clk/ics8n3qv01.c
@@ -15,6 +15,7 @@
#include <i2c.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
const long long ICS8N3QV01_FREF = 114285000;
const long long ICS8N3QV01_FREF_LL = 114285000LL;
diff --git a/drivers/clk/imx/clk-composite-8m.c b/drivers/clk/imx/clk-composite-8m.c
index 494156751dae..64756ed9e642 100644
--- a/drivers/clk/imx/clk-composite-8m.c
+++ b/drivers/clk/imx/clk-composite-8m.c
@@ -12,6 +12,7 @@
#include <dm/devres.h>
#include <linux/clk-provider.h>
#include <clk.h>
+#include <linux/errno.h>
#include "clk.h"
#include <linux/err.h>
diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index 40b2d4caab49..0e3678acc639 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -22,6 +22,7 @@
#include <dm/devres.h>
#include <linux/clk-provider.h>
#include <clk.h>
+#include <linux/errno.h>
#include "clk.h"
#include <linux/err.h>
diff --git a/drivers/clk/imx/clk-imx6q.c b/drivers/clk/imx/clk-imx6q.c
index c8d826b0141d..709c2883da58 100644
--- a/drivers/clk/imx/clk-imx6q.c
+++ b/drivers/clk/imx/clk-imx6q.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx6qdl-clock.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx8.c b/drivers/clk/imx/clk-imx8.c
index 523ead82e971..63fd42a29461 100644
--- a/drivers/clk/imx/clk-imx8.c
+++ b/drivers/clk/imx/clk-imx8.c
@@ -15,6 +15,7 @@
#include <dt-bindings/clock/imx8qxp-clock.h>
#include <dt-bindings/soc/imx_rsrc.h>
#include <misc.h>
+#include <linux/errno.h>
#include "clk-imx8.h"
diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c
index d32ff8409aa4..081d8aee01bd 100644
--- a/drivers/clk/imx/clk-imx8mm.c
+++ b/drivers/clk/imx/clk-imx8mm.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx8mm-clock.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c
index e29d902544c3..c35689bdea4c 100644
--- a/drivers/clk/imx/clk-imx8mn.c
+++ b/drivers/clk/imx/clk-imx8mn.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx8mn-clock.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index c77500bcce0c..883a29a4f315 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imx8mp-clock.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imx8qm.c b/drivers/clk/imx/clk-imx8qm.c
index d781bcd8a93c..1a818694d252 100644
--- a/drivers/clk/imx/clk-imx8qm.c
+++ b/drivers/clk/imx/clk-imx8qm.c
@@ -14,6 +14,7 @@
#include <dt-bindings/clock/imx8qm-clock.h>
#include <dt-bindings/soc/imx_rsrc.h>
#include <misc.h>
+#include <linux/errno.h>
#include "clk-imx8.h"
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index 407613407394..755d8518f645 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -14,6 +14,7 @@
#include <dt-bindings/clock/imx8qxp-clock.h>
#include <dt-bindings/soc/imx_rsrc.h>
#include <misc.h>
+#include <linux/errno.h>
#include "clk-imx8.h"
diff --git a/drivers/clk/imx/clk-imxrt1020.c b/drivers/clk/imx/clk-imxrt1020.c
index 840f783940fd..6bf82fee4eb5 100644
--- a/drivers/clk/imx/clk-imxrt1020.c
+++ b/drivers/clk/imx/clk-imxrt1020.c
@@ -11,6 +11,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imxrt1020-clock.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-imxrt1050.c b/drivers/clk/imx/clk-imxrt1050.c
index 594093ee5fba..4127fa752364 100644
--- a/drivers/clk/imx/clk-imxrt1050.c
+++ b/drivers/clk/imx/clk-imxrt1050.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/imx-regs.h>
#include <dt-bindings/clock/imxrt1050-clock.h>
+#include <linux/errno.h>
#include "clk.h"
diff --git a/drivers/clk/imx/clk-pfd.c b/drivers/clk/imx/clk-pfd.c
index b8be3167c4cd..08f1234aab28 100644
--- a/drivers/clk/imx/clk-pfd.c
+++ b/drivers/clk/imx/clk-pfd.c
@@ -23,6 +23,7 @@
#include <linux/clk-provider.h>
#include <div64.h>
#include <clk.h>
+#include <linux/errno.h>
#include "clk.h"
#include <linux/err.h>
diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c
index ac2461948d27..a9b56b79027a 100644
--- a/drivers/clk/imx/clk-pll14xx.c
+++ b/drivers/clk/imx/clk-pll14xx.c
@@ -15,6 +15,7 @@
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <clk.h>
#include <div64.h>
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c
index b4a9d587e1b1..a0193e185195 100644
--- a/drivers/clk/imx/clk-pllv3.c
+++ b/drivers/clk/imx/clk-pllv3.c
@@ -13,6 +13,7 @@
#include <dm/devres.h>
#include <dm/uclass.h>
#include <clk.h>
+#include <linux/errno.h>
#include "clk.h"
#include <linux/err.h>
diff --git a/drivers/clk/intel/clk_intel.c b/drivers/clk/intel/clk_intel.c
index b633934d90a1..371898f27443 100644
--- a/drivers/clk/intel/clk_intel.c
+++ b/drivers/clk/intel/clk_intel.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <clk-uclass.h>
#include <dt-bindings/clock/intel-clock.h>
+#include <linux/errno.h>
static ulong intel_clk_get_rate(struct clk *clk)
{
diff --git a/drivers/clk/kendryte/bypass.c b/drivers/clk/kendryte/bypass.c
index 5f1986f2cb80..c48014c80e83 100644
--- a/drivers/clk/kendryte/bypass.c
+++ b/drivers/clk/kendryte/bypass.c
@@ -13,6 +13,7 @@
#include <kendryte/bypass.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define CLK_K210_BYPASS "k210_clk_bypass"
diff --git a/drivers/clk/kendryte/clk.c b/drivers/clk/kendryte/clk.c
index 981b3b7699b6..5128cca10607 100644
--- a/drivers/clk/kendryte/clk.c
+++ b/drivers/clk/kendryte/clk.c
@@ -3,6 +3,7 @@
* Copyright (C) 2019-20 Sean Anderson <seanga2 at gmail.com>
*/
#include <kendryte/clk.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <dt-bindings/clock/k210-sysctl.h>
diff --git a/drivers/clk/kendryte/pll.c b/drivers/clk/kendryte/pll.c
index ab6d75d585ab..68c93a5f965a 100644
--- a/drivers/clk/kendryte/pll.c
+++ b/drivers/clk/kendryte/pll.c
@@ -3,6 +3,8 @@
* Copyright (C) 2019-20 Sean Anderson <seanga2 at gmail.com>
*/
#define LOG_CATEGORY UCLASS_CLK
+#include <kendryte/pll.h>
+#include <linux/errno.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index dc0ba71f1092..3462b49c69df 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dt-bindings/clock/mt7622-clk.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mt7623.c b/drivers/clk/mediatek/clk-mt7623.c
index a15fb45e8e7a..042031dd70fd 100644
--- a/drivers/clk/mediatek/clk-mt7623.c
+++ b/drivers/clk/mediatek/clk-mt7623.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dt-bindings/clock/mt7623-clk.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mt7629.c b/drivers/clk/mediatek/clk-mt7629.c
index 5b2aa5f200ae..94b83a532818 100644
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dt-bindings/clock/mt7629-clk.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mtk.c
index 388471b03a90..e4217bd96271 100644
--- a/drivers/clk/mediatek/clk-mtk.c
+++ b/drivers/clk/mediatek/clk-mtk.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "clk-mtk.h"
diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c
index 6ef8b418d782..99b4da094174 100644
--- a/drivers/clk/meson/axg.c
+++ b/drivers/clk/meson/axg.c
@@ -16,6 +16,7 @@
#include <div64.h>
#include <dt-bindings/clock/axg-clkc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "clk_meson.h"
#include <linux/err.h>
diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c
index bf2f357435ab..ba9ec818de6d 100644
--- a/drivers/clk/meson/g12a.c
+++ b/drivers/clk/meson/g12a.c
@@ -18,6 +18,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "clk_meson.h"
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index b9353c053eb2..d66b23c2a90c 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -16,6 +16,7 @@
#include <syscon.h>
#include <dt-bindings/clock/gxbb-clkc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "clk_meson.h"
#include <linux/err.h>
diff --git a/drivers/clk/mpc83xx_clk.c b/drivers/clk/mpc83xx_clk.c
index 24bb06c2f2d3..a390fea85f64 100644
--- a/drivers/clk/mpc83xx_clk.c
+++ b/drivers/clk/mpc83xx_clk.c
@@ -18,6 +18,7 @@
#include <asm/arch/soc.h>
#include <asm/ppc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "mpc83xx_clk.h"
diff --git a/drivers/clk/mpc83xx_clk.h b/drivers/clk/mpc83xx_clk.h
index 8a31a4c868f1..b03b35a87842 100644
--- a/drivers/clk/mpc83xx_clk.h
+++ b/drivers/clk/mpc83xx_clk.h
@@ -18,6 +18,7 @@
* @RAT_3_TO_1: Ratio 3:1
*/
#include <linux/bitops.h>
+#include <linux/errno.h>
enum ratio {
RAT_UNK,
RAT_BYP,
diff --git a/drivers/clk/mtmips/clk-mt7628.c b/drivers/clk/mtmips/clk-mt7628.c
index 35780de8c496..f013c77df289 100644
--- a/drivers/clk/mtmips/clk-mt7628.c
+++ b/drivers/clk/mtmips/clk-mt7628.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <dt-bindings/clock/mt7628-clk.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
/* SYSCFG0 */
diff --git a/drivers/clk/mvebu/armada-37xx-periph.c b/drivers/clk/mvebu/armada-37xx-periph.c
index 2e2ac6fe8706..dd2b0b9914b6 100644
--- a/drivers/clk/mvebu/armada-37xx-periph.c
+++ b/drivers/clk/mvebu/armada-37xx-periph.c
@@ -18,6 +18,7 @@
#include <asm/arch/cpu.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define TBG_SEL 0x0
diff --git a/drivers/clk/mvebu/armada-37xx-tbg.c b/drivers/clk/mvebu/armada-37xx-tbg.c
index bb9438302665..512a1f5824f8 100644
--- a/drivers/clk/mvebu/armada-37xx-tbg.c
+++ b/drivers/clk/mvebu/armada-37xx-tbg.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#define NUM_TBG 4
diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c
index 1999c87a3360..d596c0cf1617 100644
--- a/drivers/clk/owl/clk_owl.c
+++ b/drivers/clk/owl/clk_owl.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <linux/errno.h>
#include "clk_owl.h"
#include <asm/io.h>
#if defined(CONFIG_MACH_S900)
diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index a859625b60bd..52d7bba0cff3 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index ad2c73998d4b..be230d1d923c 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -20,6 +20,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/renesas/renesas-cpg-mssr.c b/drivers/clk/renesas/renesas-cpg-mssr.c
index 7c1222f6c8ce..e3e5d9640c91 100644
--- a/drivers/clk/renesas/renesas-cpg-mssr.c
+++ b/drivers/clk/renesas/renesas-cpg-mssr.c
@@ -17,6 +17,7 @@
#include <wait_bit.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <dt-bindings/clock/renesas-cpg-mssr.h>
diff --git a/drivers/clk/rockchip/clk_pll.c b/drivers/clk/rockchip/clk_pll.c
index 3424a9a36a33..65da88b5109a 100644
--- a/drivers/clk/rockchip/clk_pll.c
+++ b/drivers/clk/rockchip/clk_pll.c
@@ -14,6 +14,7 @@
#include <asm/arch-rockchip/hardware.h>
#include <div64.h>
#include <linux/delay.h>
+#include <linux/errno.h>
static struct rockchip_pll_rate_table rockchip_auto_table;
diff --git a/drivers/clk/rockchip/clk_px30.c b/drivers/clk/rockchip/clk_px30.c
index 4178502bdff3..8fc3b6e572f7 100644
--- a/drivers/clk/rockchip/clk_px30.c
+++ b/drivers/clk/rockchip/clk_px30.c
@@ -21,6 +21,7 @@
#include <dt-bindings/clock/px30-cru.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 274572f70c14..80aa7c2f39a0 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -17,6 +17,7 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3036-cru.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk3128.c b/drivers/clk/rockchip/clk_rk3128.c
index 5a0079e0298b..b9c896460f0e 100644
--- a/drivers/clk/rockchip/clk_rk3128.c
+++ b/drivers/clk/rockchip/clk_rk3128.c
@@ -19,6 +19,7 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3128-cru.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/log2.h>
enum {
diff --git a/drivers/clk/rockchip/clk_rk3188.c b/drivers/clk/rockchip/clk_rk3188.c
index aacc8cf2d14f..b77b92e4c5b7 100644
--- a/drivers/clk/rockchip/clk_rk3188.c
+++ b/drivers/clk/rockchip/clk_rk3188.c
@@ -24,6 +24,7 @@
#include <dm/uclass-internal.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk322x.c b/drivers/clk/rockchip/clk_rk322x.c
index b63fb9b3cca9..780fd7e725b2 100644
--- a/drivers/clk/rockchip/clk_rk322x.c
+++ b/drivers/clk/rockchip/clk_rk322x.c
@@ -18,6 +18,7 @@
#include <dt-bindings/clock/rk3228-cru.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/string.h>
#include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c
index 6221515df206..da40f74d424d 100644
--- a/drivers/clk/rockchip/clk_rk3288.c
+++ b/drivers/clk/rockchip/clk_rk3288.c
@@ -28,6 +28,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/string.h>
#include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c
index c6270aa07e19..7106685bb50d 100644
--- a/drivers/clk/rockchip/clk_rk3308.c
+++ b/drivers/clk/rockchip/clk_rk3308.c
@@ -20,6 +20,7 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3308-cru.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/rockchip/clk_rk3328.c b/drivers/clk/rockchip/clk_rk3328.c
index 1050559cedfd..6c7626ab154a 100644
--- a/drivers/clk/rockchip/clk_rk3328.c
+++ b/drivers/clk/rockchip/clk_rk3328.c
@@ -21,6 +21,7 @@
#include <dt-bindings/clock/rk3328-cru.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct pll_div {
diff --git a/drivers/clk/rockchip/clk_rk3368.c b/drivers/clk/rockchip/clk_rk3368.c
index 586639344d09..0d677f55ee17 100644
--- a/drivers/clk/rockchip/clk_rk3368.c
+++ b/drivers/clk/rockchip/clk_rk3368.c
@@ -22,6 +22,7 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rk3368-cru.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/stringify.h>
diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c
index e6d74ab6b934..016633c13820 100644
--- a/drivers/clk/rockchip/clk_rk3399.c
+++ b/drivers/clk/rockchip/clk_rk3399.c
@@ -23,6 +23,7 @@
#include <dt-bindings/clock/rk3399-cru.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/clk/rockchip/clk_rv1108.c b/drivers/clk/rockchip/clk_rv1108.c
index 87a2847485ce..4297934b9810 100644
--- a/drivers/clk/rockchip/clk_rv1108.c
+++ b/drivers/clk/rockchip/clk_rv1108.c
@@ -21,6 +21,7 @@
#include <dm/lists.h>
#include <dt-bindings/clock/rv1108-cru.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/stringify.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/clk/sifive/fu540-prci.c b/drivers/clk/sifive/fu540-prci.c
index c8f73a1fa269..e7b03e2c6e8d 100644
--- a/drivers/clk/sifive/fu540-prci.c
+++ b/drivers/clk/sifive/fu540-prci.c
@@ -41,6 +41,7 @@
#include <dm/uclass.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/math64.h>
diff --git a/drivers/clk/sunxi/clk_sunxi.c b/drivers/clk/sunxi/clk_sunxi.c
index d440abc13944..1b70f15ab9a7 100644
--- a/drivers/clk/sunxi/clk_sunxi.c
+++ b/drivers/clk/sunxi/clk_sunxi.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/arch/ccu.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/log2.h>
static const struct ccu_clk_gate *priv_to_gate(struct ccu_priv *priv,
diff --git a/drivers/clk/tegra/tegra-car-clk.c b/drivers/clk/tegra/tegra-car-clk.c
index 09a7cf470ca2..d6abf0d6c11a 100644
--- a/drivers/clk/tegra/tegra-car-clk.c
+++ b/drivers/clk/tegra/tegra-car-clk.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <linux/errno.h>
static int tegra_car_clk_request(struct clk *clk)
{
diff --git a/drivers/clk/uniphier/clk-uniphier-core.c b/drivers/clk/uniphier/clk-uniphier-core.c
index 4e25db354e0c..13f2b76c890b 100644
--- a/drivers/clk/uniphier/clk-uniphier-core.c
+++ b/drivers/clk/uniphier/clk-uniphier-core.c
@@ -10,6 +10,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index 26f494f2aeb6..356cf0862a51 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -18,6 +18,7 @@
#include <dm/acpi.h>
#include <dm/device-internal.h>
#include <dm/root.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define MAX_ACPI_ITEMS 100
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 360cfa72bc14..3de629d24dfa 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -19,6 +19,7 @@
#include <dm/uclass-internal.h>
#include <dm/util.h>
#include <power-domain.h>
+#include <linux/errno.h>
int device_chld_unbind(struct udevice *dev, struct driver *drv)
{
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 29b71e240551..ac6ce92bc0f6 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -29,6 +29,7 @@
#include <dm/uclass-internal.h>
#include <dm/util.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <power-domain.h>
#include <linux/printk.h>
diff --git a/drivers/core/devres.c b/drivers/core/devres.c
index e2d4a80cefd9..9507ecb9a80e 100644
--- a/drivers/core/devres.c
+++ b/drivers/core/devres.c
@@ -14,6 +14,7 @@
#include <malloc.h>
#include <stdio.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <dm/device.h>
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 86a99abfaae3..dcc1e4a4f951 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -19,6 +19,7 @@
#include <dm/util.h>
#include <fdtdec.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct driver *lists_driver_lookup_name(const char *name)
diff --git a/drivers/core/of_access.c b/drivers/core/of_access.c
index 368cd023578e..ad9bd7dd5a2c 100644
--- a/drivers/core/of_access.c
+++ b/drivers/core/of_access.c
@@ -25,6 +25,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <linux/ctype.h>
diff --git a/drivers/core/of_addr.c b/drivers/core/of_addr.c
index 6316b6515349..4fd4ee0c8893 100644
--- a/drivers/core/of_addr.c
+++ b/drivers/core/of_addr.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <log.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
diff --git a/drivers/core/of_extra.c b/drivers/core/of_extra.c
index e04fc9d2687a..f2efc0c8ad9d 100644
--- a/drivers/core/of_extra.c
+++ b/drivers/core/of_extra.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <dm/of_extra.h>
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index fe94799b230d..d68be142e681 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
diff --git a/drivers/core/read.c b/drivers/core/read.c
index 8a31dc67c9b3..ecd812566ceb 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -11,6 +11,7 @@
#include <mapmem.h>
#include <asm/types.h>
#include <asm/io.h>
+#include <linux/errno.h>
int dev_read_u32(const struct udevice *dev, const char *propname, u32 *outp)
{
diff --git a/drivers/core/regmap.c b/drivers/core/regmap.c
index e3f2affd1cf0..37fff77dc09a 100644
--- a/drivers/core/regmap.c
+++ b/drivers/core/regmap.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <mapmem.h>
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 1e9d580c4940..2d0deea9f78c 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <malloc.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <dm/acpi.h>
#include <dm/device.h>
diff --git a/drivers/core/simple-pm-bus.c b/drivers/core/simple-pm-bus.c
index 51dc9b206fd6..96608bd95ede 100644
--- a/drivers/core/simple-pm-bus.c
+++ b/drivers/core/simple-pm-bus.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <linux/errno.h>
/*
* Power domains are taken care of by driver_probe, so we just have to enable
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index b5cd763b6bb9..11ac1b177334 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -15,6 +15,7 @@
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/err.h>
+#include <linux/errno.h>
/*
* Caution:
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 98fdb014222b..3fae359866fa 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -20,6 +20,7 @@
#include <dm/uclass.h>
#include <dm/uclass-internal.h>
#include <dm/util.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/core/util.c b/drivers/core/util.c
index cd15768970cc..242fb7010de5 100644
--- a/drivers/core/util.c
+++ b/drivers/core/util.c
@@ -10,6 +10,7 @@
#include <dm/ofnode.h>
#include <dm/read.h>
#include <dm/util.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <vsprintf.h>
diff --git a/drivers/cpu/bmips_cpu.c b/drivers/cpu/bmips_cpu.c
index 5a2fe894a5de..44110e1d8ecd 100644
--- a/drivers/cpu/bmips_cpu.c
+++ b/drivers/cpu/bmips_cpu.c
@@ -17,6 +17,7 @@
#include <vsprintf.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define REV_CHIPID_SHIFT 16
#define REV_CHIPID_MASK (0xffff << REV_CHIPID_SHIFT)
diff --git a/drivers/cpu/cpu-uclass.c b/drivers/cpu/cpu-uclass.c
index 58c8f833c6fa..7aac150b12c8 100644
--- a/drivers/cpu/cpu-uclass.c
+++ b/drivers/cpu/cpu-uclass.c
@@ -12,6 +12,7 @@
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
int cpu_probe_all(void)
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c
index 2ebb28194888..0c660f81227f 100644
--- a/drivers/cpu/imx8_cpu.c
+++ b/drivers/cpu/imx8_cpu.c
@@ -16,6 +16,7 @@
#include <asm/arch-imx/cpu.h>
#include <asm/armv8/cpu.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/cpu/mpc83xx_cpu.c b/drivers/cpu/mpc83xx_cpu.c
index 5089c9d09fb8..ced2213de10d 100644
--- a/drivers/cpu/mpc83xx_cpu.c
+++ b/drivers/cpu/mpc83xx_cpu.c
@@ -13,6 +13,7 @@
#include <vsprintf.h>
#include <asm/ppc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "mpc83xx_cpu.h"
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c
index fcf487d73d06..2fd18901dd4f 100644
--- a/drivers/cpu/riscv_cpu.c
+++ b/drivers/cpu/riscv_cpu.c
@@ -15,6 +15,7 @@
#include <dm/lists.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/crypto/fsl/fsl_rsa.c b/drivers/crypto/fsl/fsl_rsa.c
index ed2a54f6ec20..2658f8c04343 100644
--- a/drivers/crypto/fsl/fsl_rsa.c
+++ b/drivers/crypto/fsl/fsl_rsa.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <asm/types.h>
#include <malloc.h>
+#include <linux/errno.h>
#include "jobdesc.h"
#include "desc.h"
#include "jr.h"
diff --git a/drivers/crypto/fsl/jr.c b/drivers/crypto/fsl/jr.c
index 9e31e92024c9..9ac4817d4489 100644
--- a/drivers/crypto/fsl/jr.c
+++ b/drivers/crypto/fsl/jr.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <cpu_func.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <log.h>
#include <malloc.h>
diff --git a/drivers/crypto/fsl/rng.c b/drivers/crypto/fsl/rng.c
index e4a952caeec5..77f8e8a055f7 100644
--- a/drivers/crypto/fsl/rng.c
+++ b/drivers/crypto/fsl/rng.c
@@ -11,6 +11,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <rng.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include "desc_constr.h"
diff --git a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
index f5ae35e13254..8997980cacae 100644
--- a/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
+++ b/drivers/crypto/rsa_mod_exp/mod_exp_uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <u-boot/rsa-mod-exp.h>
#include <errno.h>
#include <fdtdec.h>
diff --git a/drivers/ddr/altera/sdram_agilex.c b/drivers/ddr/altera/sdram_agilex.c
index 771820941aac..8cc648bc98e6 100644
--- a/drivers/ddr/altera/sdram_agilex.c
+++ b/drivers/ddr/altera/sdram_agilex.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include "sdram_soc64.h"
#include <wait_bit.h>
#include <asm/arch/firewall.h>
diff --git a/drivers/ddr/altera/sdram_arria10.c b/drivers/ddr/altera/sdram_arria10.c
index 488f950dfcf0..7d51bfd83c50 100644
--- a/drivers/ddr/altera/sdram_arria10.c
+++ b/drivers/ddr/altera/sdram_arria10.c
@@ -23,6 +23,7 @@
#include <asm/arch/sdram.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/string.h>
diff --git a/drivers/ddr/altera/sdram_gen5.c b/drivers/ddr/altera/sdram_gen5.c
index 01857f292565..bc20fa096454 100644
--- a/drivers/ddr/altera/sdram_gen5.c
+++ b/drivers/ddr/altera/sdram_gen5.c
@@ -19,6 +19,7 @@
#include <asm/bitops.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "sequencer.h"
diff --git a/drivers/ddr/altera/sdram_soc64.c b/drivers/ddr/altera/sdram_soc64.c
index 03ca6b58cfc0..778528bf8631 100644
--- a/drivers/ddr/altera/sdram_soc64.c
+++ b/drivers/ddr/altera/sdram_soc64.c
@@ -19,6 +19,7 @@
#include <time.h>
#include <asm/global_data.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "sdram_soc64.h"
#include <wait_bit.h>
diff --git a/drivers/ddr/altera/sequencer.c b/drivers/ddr/altera/sequencer.c
index 7c54f0018251..8d62f02660d3 100644
--- a/drivers/ddr/altera/sequencer.c
+++ b/drivers/ddr/altera/sequencer.c
@@ -9,6 +9,7 @@
#include <asm/arch/sdram.h>
#include <errno.h>
#include <hang.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "sequencer.h"
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index 3e1f79aee50b..f35bc3e14922 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -14,6 +14,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/demo/demo-uclass.c b/drivers/demo/demo-uclass.c
index 5856a9891e81..cf85bf24a3f6 100644
--- a/drivers/demo/demo-uclass.c
+++ b/drivers/demo/demo-uclass.c
@@ -15,6 +15,7 @@
#include <malloc.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/list.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index dad6b5a1e361..4cc2be16bb3e 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -17,6 +17,7 @@
#include <hash.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <linux/compiler.h>
#include <linux/printk.h>
diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index d34456c82f26..94989c2ba239 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -18,6 +18,7 @@
#include <part.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/dfu/dfu_mtd.c b/drivers/dfu/dfu_mtd.c
index 679c7713fba9..b93d99873749 100644
--- a/drivers/dfu/dfu_mtd.c
+++ b/drivers/dfu/dfu_mtd.c
@@ -14,6 +14,7 @@
#include <vsprintf.h>
#include <jffs2/load_kernel.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
static bool mtd_is_aligned_with_block_size(struct mtd_info *mtd, u64 size)
diff --git a/drivers/dfu/dfu_ram.c b/drivers/dfu/dfu_ram.c
index 969468e7e412..55c3dc9eb193 100644
--- a/drivers/dfu/dfu_ram.c
+++ b/drivers/dfu/dfu_ram.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <dfu.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c
index c6c5328602e2..3d0a4f989715 100644
--- a/drivers/dfu/dfu_sf.c
+++ b/drivers/dfu/dfu_sf.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <jffs2/load_kernel.h>
+#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <linux/string.h>
diff --git a/drivers/dfu/dfu_tftp.c b/drivers/dfu/dfu_tftp.c
index efa25d86f22e..61efb11a5452 100644
--- a/drivers/dfu/dfu_tftp.c
+++ b/drivers/dfu/dfu_tftp.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <errno.h>
#include <dfu.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/dma/bcm6348-iudma.c b/drivers/dma/bcm6348-iudma.c
index ceb8de9b8af2..e1130f8f9fb8 100644
--- a/drivers/dma/bcm6348-iudma.c
+++ b/drivers/dma/bcm6348-iudma.c
@@ -28,6 +28,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define DMA_RX_DESC 6
diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
index 79fbfa87d12b..cc872831b5f7 100644
--- a/drivers/dma/dma-uclass.c
+++ b/drivers/dma/dma-uclass.c
@@ -19,6 +19,7 @@
#include <dma-uclass.h>
#include <dt-structs.h>
#include <errno.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#ifdef CONFIG_DMA_CHANNELS
diff --git a/drivers/dma/lpc32xx_dma.c b/drivers/dma/lpc32xx_dma.c
index 3fd56053faee..7078d3e7c6aa 100644
--- a/drivers/dma/lpc32xx_dma.c
+++ b/drivers/dma/lpc32xx_dma.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/* DMA controller channel register structure */
diff --git a/drivers/dma/sandbox-dma-test.c b/drivers/dma/sandbox-dma-test.c
index 6e02e8ff6e30..9a6904cd634f 100644
--- a/drivers/dma/sandbox-dma-test.c
+++ b/drivers/dma/sandbox-dma-test.c
@@ -16,6 +16,7 @@
#include <dma-uclass.h>
#include <dt-structs.h>
#include <errno.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/dma/ti/k3-psil.c b/drivers/dma/ti/k3-psil.c
index b5c92b282936..56da1e605c33 100644
--- a/drivers/dma/ti/k3-psil.c
+++ b/drivers/dma/ti/k3-psil.c
@@ -4,6 +4,7 @@
* Author: Peter Ujfalusi <peter.ujfalusi at ti.com>
*/
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/err.h>
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 15be04b0898f..0b6de5bbbcc5 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -26,6 +26,7 @@
#include <linux/delay.h>
#include <linux/bitmap.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/soc/ti/k3-navss-ringacc.h>
#include <linux/soc/ti/cppi5.h>
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index dfa383de57d1..74a5bce22f78 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -17,6 +17,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/fastboot.h>
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 448840ae4fe9..b8f4938f9d5b 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -13,6 +13,7 @@
#include <part.h>
#include <version.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 5dc58f00a75a..37cef1890f26 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <linux/compat.h>
#include <android_image.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
index 431580631168..074aa2aeb2ba 100644
--- a/drivers/fastboot/fb_nand.c
+++ b/drivers/fastboot/fb_nand.c
@@ -9,6 +9,7 @@
#include <blk.h>
#include <flash.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c
index b4f8dba9604c..01d5ac72f8fc 100644
--- a/drivers/firmware/firmware-zynqmp.c
+++ b/drivers/firmware/firmware-zynqmp.c
@@ -13,6 +13,7 @@
#include <zynqmp_firmware.h>
#include <asm/cache.h>
#include <asm/ptrace.h>
+#include <linux/errno.h>
#if defined(CONFIG_ZYNQMP_IPI)
#include <mailbox.h>
diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 1a38526d80a8..d2e1be9c9940 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -19,6 +19,7 @@
#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/soc/ti/k3-sec-proxy.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <linux/string.h>
diff --git a/drivers/fpga/altera.c b/drivers/fpga/altera.c
index 7f7d768c5cb9..9908630c2d40 100644
--- a/drivers/fpga/altera.c
+++ b/drivers/fpga/altera.c
@@ -16,6 +16,7 @@
#include <log.h>
#include <stdio.h>
#include <stratixII.h>
+#include <linux/errno.h>
/* Define FPGA_DEBUG to 1 to get debug printf's */
#define FPGA_DEBUG 0
diff --git a/drivers/fpga/socfpga_arria10.c b/drivers/fpga/socfpga_arria10.c
index f6ece13b06ca..0c26701e95d2 100644
--- a/drivers/fpga/socfpga_arria10.c
+++ b/drivers/fpga/socfpga_arria10.c
@@ -24,6 +24,7 @@
#include <watchdog.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define CFGWDTH_32 1
diff --git a/drivers/fpga/stratix10.c b/drivers/fpga/stratix10.c
index 81a3c35d9ebf..e4a513171eba 100644
--- a/drivers/fpga/stratix10.c
+++ b/drivers/fpga/stratix10.c
@@ -10,6 +10,7 @@
#include <time.h>
#include <asm/arch/mailbox_s10.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define RECONFIG_STATUS_POLL_RESP_TIMEOUT_MS 60000
diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c
index 81666c83a595..a6d360a04e1f 100644
--- a/drivers/gpio/74x164_gpio.c
+++ b/drivers/gpio/74x164_gpio.c
@@ -20,6 +20,7 @@
#include <dm/device_compat.h>
#include <dt-bindings/gpio/gpio.h>
#include <spi.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index b82fe74a62b1..9b291ae976ad 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <mach/gpio.h>
#include <mach/atmel_pio4.h>
diff --git a/drivers/gpio/axp_gpio.c b/drivers/gpio/axp_gpio.c
index 88993b643e25..76008670e0be 100644
--- a/drivers/gpio/axp_gpio.c
+++ b/drivers/gpio/axp_gpio.c
@@ -15,6 +15,7 @@
#include <dm/lists.h>
#include <dm/root.h>
#include <errno.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int axp_gpio_set_value(struct udevice *dev, unsigned pin, int val);
diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c
index 0dff9ac711d7..c7d120246fc0 100644
--- a/drivers/gpio/bcm2835_gpio.c
+++ b/drivers/gpio/bcm2835_gpio.c
@@ -11,6 +11,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <fdtdec.h>
+#include <linux/errno.h>
struct bcm2835_gpios {
struct bcm2835_gpio_regs *reg;
diff --git a/drivers/gpio/bcm6345_gpio.c b/drivers/gpio/bcm6345_gpio.c
index 5da11d988e08..5eaad77dcb64 100644
--- a/drivers/gpio/bcm6345_gpio.c
+++ b/drivers/gpio/bcm6345_gpio.c
@@ -13,6 +13,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
struct bcm6345_gpio_priv {
void __iomem *reg_dirout;
diff --git a/drivers/gpio/cortina_gpio.c b/drivers/gpio/cortina_gpio.c
index 055907c1a1d3..3b093c87568b 100644
--- a/drivers/gpio/cortina_gpio.c
+++ b/drivers/gpio/cortina_gpio.c
@@ -13,6 +13,7 @@
#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
/* GPIO Register Map */
#define CORTINA_GPIO_CFG 0x00
diff --git a/drivers/gpio/da8xx_gpio.c b/drivers/gpio/da8xx_gpio.c
index dd7506ff1772..d38a3f75bc5b 100644
--- a/drivers/gpio/da8xx_gpio.c
+++ b/drivers/gpio/da8xx_gpio.c
@@ -15,6 +15,7 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <dt-bindings/gpio/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "da8xx_gpio.h"
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index e5e35181940c..3ab3b399c6b7 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <reset.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define GPIO_SWPORT_DR(p) (0x00 + (p) * 0xc)
#define GPIO_SWPORT_DDR(p) (0x04 + (p) * 0xc)
diff --git a/drivers/gpio/gpio-rza1.c b/drivers/gpio/gpio-rza1.c
index aa600e483a6c..6407727b4533 100644
--- a/drivers/gpio/gpio-rza1.c
+++ b/drivers/gpio/gpio-rza1.c
@@ -11,6 +11,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define P(bank) (0x0000 + (bank) * 4)
#define PSR(bank) (0x0100 + (bank) * 4)
diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index b4501da67d16..44ba2ac2b3ce 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -22,6 +22,7 @@
#include <dm/device_compat.h>
#include <linux/bug.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/hi6220_gpio.c b/drivers/gpio/hi6220_gpio.c
index 49236c97722c..eb369195c8d7 100644
--- a/drivers/gpio/hi6220_gpio.c
+++ b/drivers/gpio/hi6220_gpio.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <errno.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int hi6220_gpio_direction_input(struct udevice *dev, unsigned int gpio)
diff --git a/drivers/gpio/hsdk-creg-gpio.c b/drivers/gpio/hsdk-creg-gpio.c
index d9df804f6390..82ce0a813ba4 100644
--- a/drivers/gpio/hsdk-creg-gpio.c
+++ b/drivers/gpio/hsdk-creg-gpio.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <errno.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define DRV_NAME "gpio_creg"
diff --git a/drivers/gpio/imx_rgpio2p.c b/drivers/gpio/imx_rgpio2p.c
index 60b8e8e25ac1..fe171af18c56 100644
--- a/drivers/gpio/imx_rgpio2p.c
+++ b/drivers/gpio/imx_rgpio2p.c
@@ -13,6 +13,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/string.h>
enum imx_rgpio2p_direction {
diff --git a/drivers/gpio/intel_broadwell_gpio.c b/drivers/gpio/intel_broadwell_gpio.c
index 4323f0ba7609..4fc345c755e7 100644
--- a/drivers/gpio/intel_broadwell_gpio.c
+++ b/drivers/gpio/intel_broadwell_gpio.c
@@ -18,6 +18,7 @@
#include <asm/pci.h>
#include <asm/arch/gpio.h>
#include <dt-bindings/gpio/x86-gpio.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/intel_gpio.c b/drivers/gpio/intel_gpio.c
index 975293ff3ab8..360ec685249e 100644
--- a/drivers/gpio/intel_gpio.c
+++ b/drivers/gpio/intel_gpio.c
@@ -22,6 +22,7 @@
#include <asm/arch/gpio.h>
#include <dm/acpi.h>
#include <dt-bindings/gpio/x86-gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int intel_gpio_direction_input(struct udevice *dev, uint offset)
diff --git a/drivers/gpio/intel_ich6_gpio.c b/drivers/gpio/intel_ich6_gpio.c
index 4a2757d1ac68..b3df925c7564 100644
--- a/drivers/gpio/intel_ich6_gpio.c
+++ b/drivers/gpio/intel_ich6_gpio.c
@@ -38,6 +38,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <asm/pci.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/iproc_gpio.c b/drivers/gpio/iproc_gpio.c
index cc26a1306b63..50eb95d25227 100644
--- a/drivers/gpio/iproc_gpio.c
+++ b/drivers/gpio/iproc_gpio.c
@@ -11,6 +11,7 @@
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
/*
* There are five GPIO bank register. Each bank can configure max of 32 gpios.
diff --git a/drivers/gpio/mpc83xx_spisel_boot.c b/drivers/gpio/mpc83xx_spisel_boot.c
index d818954ce29c..34705769cbf8 100644
--- a/drivers/gpio/mpc83xx_spisel_boot.c
+++ b/drivers/gpio/mpc83xx_spisel_boot.c
@@ -10,6 +10,7 @@
#include <mapmem.h>
#include <vsprintf.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct mpc83xx_spisel_boot {
diff --git a/drivers/gpio/mpc8xxx_gpio.c b/drivers/gpio/mpc8xxx_gpio.c
index 20ad373d023a..6959f1c5d62f 100644
--- a/drivers/gpio/mpc8xxx_gpio.c
+++ b/drivers/gpio/mpc8xxx_gpio.c
@@ -13,6 +13,7 @@
#include <mapmem.h>
#include <vsprintf.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct ccsr_gpio {
diff --git a/drivers/gpio/mscc_sgpio.c b/drivers/gpio/mscc_sgpio.c
index 780d77b2f86e..0133e14bb735 100644
--- a/drivers/gpio/mscc_sgpio.c
+++ b/drivers/gpio/mscc_sgpio.c
@@ -17,6 +17,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define MSCC_SGPIOS_PER_BANK 32
#define MSCC_SGPIO_BANK_DEPTH 4
diff --git a/drivers/gpio/msm_gpio.c b/drivers/gpio/msm_gpio.c
index 710994b4e127..d08774850852 100644
--- a/drivers/gpio/msm_gpio.c
+++ b/drivers/gpio/msm_gpio.c
@@ -11,6 +11,7 @@
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/mt7621_gpio.c b/drivers/gpio/mt7621_gpio.c
index 612413e17bca..e569c67a6150 100644
--- a/drivers/gpio/mt7621_gpio.c
+++ b/drivers/gpio/mt7621_gpio.c
@@ -13,6 +13,7 @@
#include <fdtdec.h>
#include <malloc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/drivers/gpio/pca953x_gpio.c b/drivers/gpio/pca953x_gpio.c
index e5fbd291377c..1f7563531e77 100644
--- a/drivers/gpio/pca953x_gpio.c
+++ b/drivers/gpio/pca953x_gpio.c
@@ -30,6 +30,7 @@
#include <dm/device_compat.h>
#include <dt-bindings/gpio/gpio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define PCA953X_INPUT 0
diff --git a/drivers/gpio/pic32_gpio.c b/drivers/gpio/pic32_gpio.c
index 7a98469de469..a4352ec8ba82 100644
--- a/drivers/gpio/pic32_gpio.c
+++ b/drivers/gpio/pic32_gpio.c
@@ -14,6 +14,7 @@
#include <asm/gpio.h>
#include <linux/bitops.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <mach/pic32.h>
diff --git a/drivers/gpio/pm8916_gpio.c b/drivers/gpio/pm8916_gpio.c
index 58f044678b7d..de150c44a54f 100644
--- a/drivers/gpio/pm8916_gpio.c
+++ b/drivers/gpio/pm8916_gpio.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <spmi/spmi.h>
#include <asm/io.h>
diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 14f262739d21..0d87c6be7f27 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/gpio.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index df4ca043ac1a..acbc6495c837 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -19,6 +19,7 @@
#include <dm/pinctrl.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/sandbox-gpio.h>
+#include <linux/errno.h>
struct gpio_state {
diff --git a/drivers/gpio/sifive-gpio.c b/drivers/gpio/sifive-gpio.c
index e7dbeea400d6..76e3c702e21f 100644
--- a/drivers/gpio/sifive-gpio.c
+++ b/drivers/gpio/sifive-gpio.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <asm/gpio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int sifive_gpio_probe(struct udevice *dev)
diff --git a/drivers/gpio/spear_gpio.c b/drivers/gpio/spear_gpio.c
index 4e4cd125457d..2aed08781d76 100644
--- a/drivers/gpio/spear_gpio.c
+++ b/drivers/gpio/spear_gpio.c
@@ -13,6 +13,7 @@
#include <asm/gpio.h>
#include <asm/io.h>
#include <errno.h>
+#include <linux/errno.h>
static int gpio_direction(unsigned gpio,
enum gpio_direction direction)
diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c
index 20a60fe8b07f..d7ba86cc1511 100644
--- a/drivers/gpio/sunxi_gpio.c
+++ b/drivers/gpio/sunxi_gpio.c
@@ -20,6 +20,7 @@
#include <asm/gpio.h>
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define SUNXI_GPIOS_PER_BANK SUNXI_GPIO_A_NR
diff --git a/drivers/gpio/tegra186_gpio.c b/drivers/gpio/tegra186_gpio.c
index 6626b5415a38..cf973e2d7f26 100644
--- a/drivers/gpio/tegra186_gpio.c
+++ b/drivers/gpio/tegra186_gpio.c
@@ -14,6 +14,7 @@
#include <asm/gpio.h>
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
+#include <linux/errno.h>
#include "tegra186_gpio_priv.h"
struct tegra186_gpio_port_data {
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index 912577a57191..c002e6864dd6 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -22,6 +22,7 @@
#include <asm/gpio.h>
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
+#include <linux/errno.h>
static const int CONFIG_SFIO = 0;
static const int CONFIG_GPIO = 1;
diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 82ae6d889411..99f5d07cca0d 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -13,6 +13,7 @@
#include <asm/mach-imx/iomux-v3.h>
#include <asm/io.h>
#include <malloc.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/gpio/xilinx_gpio.c b/drivers/gpio/xilinx_gpio.c
index 6ee0757e03c4..2fb39ca0382b 100644
--- a/drivers/gpio/xilinx_gpio.c
+++ b/drivers/gpio/xilinx_gpio.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <asm/io.h>
#include <asm/gpio.h>
diff --git a/drivers/hwspinlock/hwspinlock-uclass.c b/drivers/hwspinlock/hwspinlock-uclass.c
index 6100fdfd0a5c..14bfc6ae1b69 100644
--- a/drivers/hwspinlock/hwspinlock-uclass.c
+++ b/drivers/hwspinlock/hwspinlock-uclass.c
@@ -13,6 +13,7 @@
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#include <linux/compat.h>
+#include <linux/errno.h>
static inline const struct hwspinlock_ops *
hwspinlock_dev_ops(struct udevice *dev)
diff --git a/drivers/hwspinlock/stm32_hwspinlock.c b/drivers/hwspinlock/stm32_hwspinlock.c
index 8be585a0c866..ea54063c19b3 100644
--- a/drivers/hwspinlock/stm32_hwspinlock.c
+++ b/drivers/hwspinlock/stm32_hwspinlock.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define STM32_MUTEX_COREID BIT(8)
#define STM32_MUTEX_LOCK_BIT BIT(31)
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 214362d04bb3..f0d830e5636e 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -16,6 +16,7 @@
#include <asm/arch/scu_ast2500.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include "ast_i2c.h"
diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
index 57fbb0ce2620..b825599dba54 100644
--- a/drivers/i2c/at91_i2c.c
+++ b/drivers/i2c/at91_i2c.c
@@ -16,6 +16,7 @@
#include <fdtdec.h>
#include <i2c.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <mach/clk.h>
#include "at91_i2c.h"
diff --git a/drivers/i2c/cros_ec_ldo.c b/drivers/i2c/cros_ec_ldo.c
index c593540ac138..13b9973b543d 100644
--- a/drivers/i2c/cros_ec_ldo.c
+++ b/drivers/i2c/cros_ec_ldo.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <power/tps65090.h>
static int cros_ec_ldo_set_bus_speed(struct udevice *dev, unsigned int speed)
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index b4bd22fcc85a..694172106c1c 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -20,6 +20,7 @@
#include <asm/arch/i2c_defs.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "davinci_i2c.h"
#ifdef CONFIG_DM_I2C
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c
index 6ea5a31160be..e32bfbc2c290 100644
--- a/drivers/i2c/designware_i2c.c
+++ b/drivers/i2c/designware_i2c.c
@@ -16,6 +16,7 @@
#include <time.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "designware_i2c.h"
#include <dm/device_compat.h>
#include <linux/err.h>
diff --git a/drivers/i2c/designware_i2c_pci.c b/drivers/i2c/designware_i2c_pci.c
index 946506b89b28..50649710aae3 100644
--- a/drivers/i2c/designware_i2c_pci.c
+++ b/drivers/i2c/designware_i2c_pci.c
@@ -16,6 +16,7 @@
#include <dm/acpi.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include "designware_i2c.h"
enum {
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 34d10abde067..c334755a2764 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -15,6 +15,7 @@
#include <asm/arch/pinmux.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "s3c24x0_i2c.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index c2000104b51f..ad63c108a03d 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -18,6 +18,7 @@
#include <dm.h>
#include <mapmem.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* The maximum number of microseconds we will wait until another master has
diff --git a/drivers/i2c/i2c-cortina.c b/drivers/i2c/i2c-cortina.c
index 4575ab6c40ce..aa7f3a0264ec 100644
--- a/drivers/i2c/i2c-cortina.c
+++ b/drivers/i2c/i2c-cortina.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <dm.h>
#include <mapmem.h>
+#include <linux/errno.h>
#include "i2c-cortina.h"
static void set_speed(struct i2c_regs *regs, int i2c_spd)
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index fe90abd24a6d..c29e5d7def0f 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -13,6 +13,7 @@
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define DEFAULT_UDELAY 5
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index 3b7db392b677..9e2d5dd0b122 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -18,6 +18,7 @@
#include <asm/gpio.h>
#endif
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define I2C_MAX_OFFSET_LEN 4
diff --git a/drivers/i2c/i2c-versatile.c b/drivers/i2c/i2c-versatile.c
index 62831522bd33..f78b12a560c3 100644
--- a/drivers/i2c/i2c-versatile.c
+++ b/drivers/i2c/i2c-versatile.c
@@ -13,6 +13,7 @@
#include <clk.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#define I2C_CONTROL_REG 0x00
diff --git a/drivers/i2c/ihs_i2c.c b/drivers/i2c/ihs_i2c.c
index f6cd1222b876..31e8cc5d8eb2 100644
--- a/drivers/i2c/ihs_i2c.c
+++ b/drivers/i2c/ihs_i2c.c
@@ -17,6 +17,7 @@
#include <asm/unaligned.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef CONFIG_DM_I2C
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index eeb35e050b76..f7186639d185 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -17,6 +17,7 @@
#include <fdtdec.h>
#include <i2c.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#define LPI2C_FIFO_SIZE 4
#define LPI2C_NACK_TOUT_MS 1
diff --git a/drivers/i2c/intel_i2c.c b/drivers/i2c/intel_i2c.c
index 57ff9ec2a4a7..cbda069131ac 100644
--- a/drivers/i2c/intel_i2c.c
+++ b/drivers/i2c/intel_i2c.c
@@ -16,6 +16,7 @@
#include <time.h>
#include <vsprintf.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* PCI Configuration Space (D31:F3): SMBus */
diff --git a/drivers/i2c/iproc_i2c.c b/drivers/i2c/iproc_i2c.c
index 4231c0c617f0..b5d865d66ba6 100644
--- a/drivers/i2c/iproc_i2c.c
+++ b/drivers/i2c/iproc_i2c.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <config.h>
#include <dm.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "errno.h"
#include <i2c.h>
diff --git a/drivers/i2c/meson_i2c.c b/drivers/i2c/meson_i2c.c
index b133aa1175ea..051b238e1668 100644
--- a/drivers/i2c/meson_i2c.c
+++ b/drivers/i2c/meson_i2c.c
@@ -12,6 +12,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define I2C_TIMEOUT_MS 100
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
index 14ead6e27538..2b9e0ba585ae 100644
--- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
+++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/muxes/i2c-mux-uclass.c b/drivers/i2c/muxes/i2c-mux-uclass.c
index 8f6d1547f169..1af7b68e2052 100644
--- a/drivers/i2c/muxes/i2c-mux-uclass.c
+++ b/drivers/i2c/muxes/i2c-mux-uclass.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <dm/lists.h>
#include <dm/root.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 87e9f9cb21d7..3140a1abb6c6 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <malloc.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <asm-generic/gpio.h>
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 1850dc6a5678..37d04bf11e95 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "mv_i2c.h"
diff --git a/drivers/i2c/nx_i2c.c b/drivers/i2c/nx_i2c.c
index af58c2c76efa..738796788af8 100644
--- a/drivers/i2c/nx_i2c.c
+++ b/drivers/i2c/nx_i2c.c
@@ -9,6 +9,7 @@
#include <asm/arch/clk.h>
#include <asm/arch/nx_gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define I2C_WRITE 0
#define I2C_READ 1
diff --git a/drivers/i2c/octeon_i2c.c b/drivers/i2c/octeon_i2c.c
index ef04ae5698a2..19b7622b4181 100644
--- a/drivers/i2c/octeon_i2c.c
+++ b/drivers/i2c/octeon_i2c.c
@@ -13,6 +13,7 @@
#include <linux/bitfield.h>
#include <linux/compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define TWSI_SW_TWSI 0x00
#define TWSI_TWSI_SW 0x08
diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c
index db0812c17ec1..b8cfc69c6cc9 100644
--- a/drivers/i2c/omap24xx_i2c.c
+++ b/drivers/i2c/omap24xx_i2c.c
@@ -44,6 +44,7 @@
#include <log.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <asm/io.h>
diff --git a/drivers/i2c/rcar_i2c.c b/drivers/i2c/rcar_i2c.c
index 4267bbfa5a96..1fe207e7bc8f 100644
--- a/drivers/i2c/rcar_i2c.c
+++ b/drivers/i2c/rcar_i2c.c
@@ -20,6 +20,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define RCAR_I2C_ICSCR 0x00 /* slave ctrl */
#define RCAR_I2C_ICMCR 0x04 /* master ctrl */
diff --git a/drivers/i2c/rcar_iic.c b/drivers/i2c/rcar_iic.c
index cad0a623d363..dd0e921725be 100644
--- a/drivers/i2c/rcar_iic.c
+++ b/drivers/i2c/rcar_iic.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
struct rcar_iic_priv {
void __iomem *base;
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c
index 81d8e1eb11d4..98a0aee9b0ef 100644
--- a/drivers/i2c/rk_i2c.c
+++ b/drivers/i2c/rk_i2c.c
@@ -19,6 +19,7 @@
#include <asm/arch-rockchip/periph.h>
#include <dm/pinctrl.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
/* i2c timerout */
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 0fe92fe2357b..ae3084d549d8 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -20,6 +20,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <i2c.h>
+#include <linux/errno.h>
#include "s3c24x0_i2c.h"
#ifndef CONFIG_SYS_I2C_S3C24X0_SLAVE
diff --git a/drivers/i2c/sandbox_i2c.c b/drivers/i2c/sandbox_i2c.c
index 57b1c60fde6d..2afd17f92fc5 100644
--- a/drivers/i2c/sandbox_i2c.c
+++ b/drivers/i2c/sandbox_i2c.c
@@ -14,6 +14,7 @@
#include <dm/acpi.h>
#include <dm/lists.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
struct sandbox_i2c_priv {
bool test_mode;
diff --git a/drivers/i2c/stm32f7_i2c.c b/drivers/i2c/stm32f7_i2c.c
index 0f5c8446365e..a353f063ed96 100644
--- a/drivers/i2c/stm32f7_i2c.c
+++ b/drivers/i2c/stm32f7_i2c.c
@@ -14,6 +14,7 @@
#include <time.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index 897627a12360..188821bb8789 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -11,6 +11,7 @@
#include <asm/arch-tegra/bpmp_abi.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 2cb51473a6c5..03687b7532be 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -21,6 +21,7 @@
#include <asm/arch-tegra/tegra_i2c.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/i2c/xilinx_xiic.c b/drivers/i2c/xilinx_xiic.c
index 149bd327bdfe..aa86c6308855 100644
--- a/drivers/i2c/xilinx_xiic.c
+++ b/drivers/i2c/xilinx_xiic.c
@@ -16,6 +16,7 @@
#include <wait_bit.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
struct xilinx_xiic_priv {
void __iomem *base;
diff --git a/drivers/input/cros_ec_keyb.c b/drivers/input/cros_ec_keyb.c
index c09a66376af5..60f89562fadf 100644
--- a/drivers/input/cros_ec_keyb.c
+++ b/drivers/input/cros_ec_keyb.c
@@ -14,6 +14,7 @@
#include <key_matrix.h>
#include <log.h>
#include <stdio_dev.h>
+#include <linux/errno.h>
#include <linux/string.h>
enum {
diff --git a/drivers/input/i8042.c b/drivers/input/i8042.c
index b484cebfb4e7..b2320d648f3e 100644
--- a/drivers/input/i8042.c
+++ b/drivers/input/i8042.c
@@ -17,6 +17,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/input/keyboard-uclass.c b/drivers/input/keyboard-uclass.c
index 2007032e10cd..fe73cd7bfd0f 100644
--- a/drivers/input/keyboard-uclass.c
+++ b/drivers/input/keyboard-uclass.c
@@ -8,6 +8,7 @@
#include <keyboard.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int keyboard_start(struct stdio_dev *sdev)
diff --git a/drivers/input/tegra-kbc.c b/drivers/input/tegra-kbc.c
index 3654510858f1..af289c8badbc 100644
--- a/drivers/input/tegra-kbc.c
+++ b/drivers/input/tegra-kbc.c
@@ -19,6 +19,7 @@
#include <asm/arch/funcmux.h>
#include <asm/arch-tegra/timer.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/input.h>
#include <linux/string.h>
diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c
index ae9c3cbd7d3a..70a94a19cd72 100644
--- a/drivers/led/led-uclass.c
+++ b/drivers/led/led-uclass.c
@@ -11,6 +11,7 @@
#include <dm/device-internal.h>
#include <dm/root.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
int led_get_by_label(const char *label, struct udevice **devp)
diff --git a/drivers/led/led_bcm6328.c b/drivers/led/led_bcm6328.c
index 52946835de33..4a07bcc8a705 100644
--- a/drivers/led/led_bcm6328.c
+++ b/drivers/led/led_bcm6328.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <asm/io.h>
#include <dm/lists.h>
+#include <linux/errno.h>
#define LEDS_MAX 24
diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c
index 307d418a1789..019a84813ac5 100644
--- a/drivers/led/led_bcm6358.c
+++ b/drivers/led/led_bcm6358.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <dm/lists.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define LEDS_MAX 32
#define LEDS_WAIT 100
diff --git a/drivers/led/led_bcm6858.c b/drivers/led/led_bcm6858.c
index b415d8b2b404..c0f5a1a7bb65 100644
--- a/drivers/led/led_bcm6858.c
+++ b/drivers/led/led_bcm6858.c
@@ -15,6 +15,7 @@
#include <asm/io.h>
#include <dm/lists.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define LEDS_MAX 32
#define LEDS_WAIT 100
diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c
index ef9b61ee626b..c576c0eae526 100644
--- a/drivers/led/led_gpio.c
+++ b/drivers/led/led_gpio.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <asm/gpio.h>
#include <dm/lists.h>
+#include <linux/errno.h>
struct led_gpio_priv {
struct gpio_desc gpio;
diff --git a/drivers/mailbox/k3-sec-proxy.c b/drivers/mailbox/k3-sec-proxy.c
index 1edb7dfd56cc..d9516bd59e40 100644
--- a/drivers/mailbox/k3-sec-proxy.c
+++ b/drivers/mailbox/k3-sec-proxy.c
@@ -13,6 +13,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/soc/ti/k3-sec-proxy.h>
diff --git a/drivers/mailbox/mailbox-uclass.c b/drivers/mailbox/mailbox-uclass.c
index c972d8460891..233fa4f715fe 100644
--- a/drivers/mailbox/mailbox-uclass.c
+++ b/drivers/mailbox/mailbox-uclass.c
@@ -10,6 +10,7 @@
#include <mailbox-uclass.h>
#include <malloc.h>
#include <time.h>
+#include <linux/errno.h>
static inline struct mbox_ops *mbox_dev_ops(struct udevice *dev)
{
diff --git a/drivers/mailbox/sandbox-mbox.c b/drivers/mailbox/sandbox-mbox.c
index 19704dd5da9e..4dd5371fc198 100644
--- a/drivers/mailbox/sandbox-mbox.c
+++ b/drivers/mailbox/sandbox-mbox.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <asm/io.h>
#include <asm/mbox.h>
+#include <linux/errno.h>
#define SANDBOX_MBOX_CHANNELS 2
diff --git a/drivers/mailbox/stm32-ipcc.c b/drivers/mailbox/stm32-ipcc.c
index b8bf356b4ac2..0c72f5e7c3d8 100644
--- a/drivers/mailbox/stm32-ipcc.c
+++ b/drivers/mailbox/stm32-ipcc.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/*
* IPCC has one set of registers per CPU
diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index e91dac201d2a..4b71e3ca7efb 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -11,6 +11,7 @@
#include <mailbox-uclass.h>
#include <dt-bindings/mailbox/tegra186-hsp.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define TEGRA_HSP_INT_DIMENSIONING 0x380
#define TEGRA_HSP_INT_DIMENSIONING_NSI_SHIFT 16
diff --git a/drivers/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c
index f206a27a79e4..ef8c93fa4607 100644
--- a/drivers/mailbox/zynqmp-ipi.c
+++ b/drivers/mailbox/zynqmp-ipi.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <mailbox-uclass.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <mach/sys_proto.h>
#include <linux/ioport.h>
#include <linux/io.h>
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 779e1a17607a..5262c005a04e 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -18,6 +18,7 @@
#include <log.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/drivers/misc/cros_ec_i2c.c b/drivers/misc/cros_ec_i2c.c
index e3678d0213a0..782ee703eb60 100644
--- a/drivers/misc/cros_ec_i2c.c
+++ b/drivers/misc/cros_ec_i2c.c
@@ -18,6 +18,7 @@
#include <cros_ec.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef DEBUG_TRACE
diff --git a/drivers/misc/cros_ec_lpc.c b/drivers/misc/cros_ec_lpc.c
index caca59471f17..6c9c9593a7c0 100644
--- a/drivers/misc/cros_ec_lpc.c
+++ b/drivers/misc/cros_ec_lpc.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <time.h>
#include <asm/io.h>
+#include <linux/errno.h>
#ifdef DEBUG_TRACE
#define debug_trace(fmt, b...) debug(fmt, ##b)
diff --git a/drivers/misc/cros_ec_sandbox.c b/drivers/misc/cros_ec_sandbox.c
index 308b34e2f4bf..5a5af51eb39f 100644
--- a/drivers/misc/cros_ec_sandbox.c
+++ b/drivers/misc/cros_ec_sandbox.c
@@ -15,6 +15,7 @@
#include <os.h>
#include <stdio.h>
#include <time.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/sha256.h>
#include <spi.h>
diff --git a/drivers/misc/cros_ec_spi.c b/drivers/misc/cros_ec_spi.c
index a94e216cac7f..bb7b8c1b1de6 100644
--- a/drivers/misc/cros_ec_spi.c
+++ b/drivers/misc/cros_ec_spi.c
@@ -20,6 +20,7 @@
#include <spi.h>
#include <stdio.h>
#include <time.h>
+#include <linux/errno.h>
#include <linux/string.h>
int cros_ec_spi_packet(struct udevice *udev, int out_bytes, int in_bytes)
diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c
index f6383a023985..a4d048afd7f6 100644
--- a/drivers/misc/fs_loader.c
+++ b/drivers/misc/fs_loader.c
@@ -12,6 +12,7 @@
#include <fs_loader.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <mapmem.h>
#include <malloc.h>
diff --git a/drivers/misc/gdsys_ioep.c b/drivers/misc/gdsys_ioep.c
index 8c65f1473c3f..22afebd9ab07 100644
--- a/drivers/misc/gdsys_ioep.c
+++ b/drivers/misc/gdsys_ioep.c
@@ -16,6 +16,7 @@
#include <log.h>
#include <misc.h>
#include <regmap.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "gdsys_ioep.h"
diff --git a/drivers/misc/gdsys_soc.c b/drivers/misc/gdsys_soc.c
index b4c721c6fe63..09216f0e398e 100644
--- a/drivers/misc/gdsys_soc.c
+++ b/drivers/misc/gdsys_soc.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <log.h>
#include <dm/lists.h>
+#include <linux/errno.h>
#include "gdsys_soc.h"
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index 45c34d388c8a..0e1ba165f91d 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -7,6 +7,7 @@
#include <eeprom.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <dm.h>
#include <dm/device-internal.h>
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 925120ea0d58..9f0d89673d97 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <malloc.h>
#include <asm/test.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef DEBUG
diff --git a/drivers/misc/ihs_fpga.c b/drivers/misc/ihs_fpga.c
index 6a61a22c071f..9dbb857101d0 100644
--- a/drivers/misc/ihs_fpga.c
+++ b/drivers/misc/ihs_fpga.c
@@ -17,6 +17,7 @@
#include <asm/gpio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "ihs_fpga.h"
diff --git a/drivers/misc/imx8/fuse.c b/drivers/misc/imx8/fuse.c
index e25d68e6a2e8..c3a7d3a40b3b 100644
--- a/drivers/misc/imx8/fuse.c
+++ b/drivers/misc/imx8/fuse.c
@@ -12,6 +12,7 @@
#include <asm/arch/sys_proto.h>
#include <asm/global_data.h>
#include <linux/arm-smccc.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/misc/imx8/scu.c b/drivers/misc/imx8/scu.c
index ce1a35a552b3..74cab6294820 100644
--- a/drivers/misc/imx8/scu.c
+++ b/drivers/misc/imx8/scu.c
@@ -16,6 +16,7 @@
#include <dm/device-internal.h>
#include <asm/arch/sci/sci.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <misc.h>
diff --git a/drivers/misc/irq-uclass.c b/drivers/misc/irq-uclass.c
index 94fa233f193d..6b6813e1fc50 100644
--- a/drivers/misc/irq-uclass.c
+++ b/drivers/misc/irq-uclass.c
@@ -12,6 +12,7 @@
#include <irq.h>
#include <log.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
int irq_route_pmc_gpio_gpe(struct udevice *dev, uint pmc_gpe_num)
{
diff --git a/drivers/misc/irq_sandbox.c b/drivers/misc/irq_sandbox.c
index a2511b32fcd6..14366febd382 100644
--- a/drivers/misc/irq_sandbox.c
+++ b/drivers/misc/irq_sandbox.c
@@ -10,6 +10,7 @@
#include <irq.h>
#include <acpi/acpi_device.h>
#include <asm/test.h>
+#include <linux/errno.h>
/**
* struct sandbox_irq_priv - private data for this driver
diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index 5aabac793093..621ce8b28d9c 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -17,6 +17,7 @@
#include <k3-avs.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#define AM6_VTM_DEVINFO(i) (priv->base + 0x100 + 0x20 * (i))
diff --git a/drivers/misc/k3_esm.c b/drivers/misc/k3_esm.c
index cc2a23dd6638..82aa2545c084 100644
--- a/drivers/misc/k3_esm.c
+++ b/drivers/misc/k3_esm.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define ESM_SFT_RST 0x0c
#define ESM_SFT_RST_KEY 0x0f
diff --git a/drivers/misc/microchip_flexcom.c b/drivers/misc/microchip_flexcom.c
index 64cc4ae7b61e..0886fbdd8654 100644
--- a/drivers/misc/microchip_flexcom.c
+++ b/drivers/misc/microchip_flexcom.c
@@ -11,6 +11,7 @@
#include <misc.h>
#include <asm/io.h>
#include <linux/err.h>
+#include <linux/errno.h>
struct microchip_flexcom_regs {
u32 cr;
diff --git a/drivers/misc/misc-uclass.c b/drivers/misc/misc-uclass.c
index 55381edc9808..c0db58b89679 100644
--- a/drivers/misc/misc-uclass.c
+++ b/drivers/misc/misc-uclass.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <misc.h>
+#include <linux/errno.h>
/*
* Implement a miscellaneous uclass for those do not fit other more
diff --git a/drivers/misc/misc_sandbox.c b/drivers/misc/misc_sandbox.c
index 9ea2a35db604..4e3e8a4a3640 100644
--- a/drivers/misc/misc_sandbox.c
+++ b/drivers/misc/misc_sandbox.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <misc.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct misc_sandbox_priv {
diff --git a/drivers/misc/mpc83xx_serdes.c b/drivers/misc/mpc83xx_serdes.c
index b2f23e1343bf..925e6ec3ab83 100644
--- a/drivers/misc/mpc83xx_serdes.c
+++ b/drivers/misc/mpc83xx_serdes.c
@@ -15,6 +15,7 @@
#include <mapmem.h>
#include <misc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "mpc83xx_serdes.h"
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c
index b5219df46be2..149f3d28ebf2 100644
--- a/drivers/misc/p2sb-uclass.c
+++ b/drivers/misc/p2sb-uclass.c
@@ -15,6 +15,7 @@
#include <spl.h>
#include <asm/io.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#define PCR_COMMON_IOSF_1_0 1
diff --git a/drivers/misc/p2sb_emul.c b/drivers/misc/p2sb_emul.c
index a4b6dba51620..3c17f6de3f6a 100644
--- a/drivers/misc/p2sb_emul.c
+++ b/drivers/misc/p2sb_emul.c
@@ -16,6 +16,7 @@
#include <pci.h>
#include <asm/test.h>
#include <p2sb.h>
+#include <linux/errno.h>
/**
* struct p2sb_emul_platdata - platform data for this device
diff --git a/drivers/misc/pca9551_led.c b/drivers/misc/pca9551_led.c
index cdc4390f8155..312192fd62d3 100644
--- a/drivers/misc/pca9551_led.c
+++ b/drivers/misc/pca9551_led.c
@@ -7,6 +7,7 @@
#include <errno.h>
#include <i2c.h>
#include <status_led.h>
+#include <linux/errno.h>
#ifndef CONFIG_PCA9551_I2C_ADDR
#error "CONFIG_PCA9551_I2C_ADDR not defined!"
diff --git a/drivers/misc/pwrseq-uclass.c b/drivers/misc/pwrseq-uclass.c
index c8f6c46069b7..220567ee2798 100644
--- a/drivers/misc/pwrseq-uclass.c
+++ b/drivers/misc/pwrseq-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <pwrseq.h>
+#include <linux/errno.h>
int pwrseq_set_power(struct udevice *dev, bool enable)
{
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index 5c3ff8e52f67..c5629183f860 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -14,6 +14,7 @@
#ifdef CONFIG_GENERATE_ACPI_TABLE
#include <asm/tables.h>
#endif
+#include <linux/errno.h>
#include <linux/list.h>
#include <linux/string.h>
diff --git a/drivers/misc/rockchip-otp.c b/drivers/misc/rockchip-otp.c
index 482de69070da..a8563a305d0c 100644
--- a/drivers/misc/rockchip-otp.c
+++ b/drivers/misc/rockchip-otp.c
@@ -11,6 +11,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <misc.h>
+#include <linux/errno.h>
/* OTP Register Offsets */
#define OTPC_SBPI_CTRL 0x0020
diff --git a/drivers/misc/sifive-otp.c b/drivers/misc/sifive-otp.c
index 799d75b08738..97cb40b542ca 100644
--- a/drivers/misc/sifive-otp.c
+++ b/drivers/misc/sifive-otp.c
@@ -23,6 +23,7 @@
#include <dm/read.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <misc.h>
#include <linux/printk.h>
diff --git a/drivers/misc/smsc_sio1007.c b/drivers/misc/smsc_sio1007.c
index 3b7b1c8bcf2a..9fe6a18f59e8 100644
--- a/drivers/misc/smsc_sio1007.c
+++ b/drivers/misc/smsc_sio1007.c
@@ -7,6 +7,7 @@
#include <asm/io.h>
#include <errno.h>
#include <smsc_sio1007.h>
+#include <linux/errno.h>
static inline u8 sio1007_read(int port, int reg)
{
diff --git a/drivers/misc/stm32_rcc.c b/drivers/misc/stm32_rcc.c
index b82fe54c6009..9a03679d21ad 100644
--- a/drivers/misc/stm32_rcc.c
+++ b/drivers/misc/stm32_rcc.c
@@ -12,6 +12,7 @@
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#include <dm/lists.h>
+#include <linux/errno.h>
struct stm32_rcc_clk stm32_rcc_clk_f42x = {
.drv_name = "stm32fx_rcc_clock",
diff --git a/drivers/misc/stm32mp_fuse.c b/drivers/misc/stm32mp_fuse.c
index 530a7824e3ec..2d8c43b123fc 100644
--- a/drivers/misc/stm32mp_fuse.c
+++ b/drivers/misc/stm32mp_fuse.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <dm/device.h>
#include <dm/uclass.h>
+#include <linux/errno.h>
#include <power/stpmic1.h>
#define STM32MP_OTP_BANK 0
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 07c67577d546..64f29f86baa3 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -13,6 +13,7 @@
#include <pci.h>
#include <asm/test.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
/**
* struct swap_case_platdata - platform data for this device
diff --git a/drivers/misc/tegra186_bpmp.c b/drivers/misc/tegra186_bpmp.c
index c9079b86a7a0..24ff0cd120d0 100644
--- a/drivers/misc/tegra186_bpmp.c
+++ b/drivers/misc/tegra186_bpmp.c
@@ -17,6 +17,7 @@
#include <asm/arch-tegra/ivc.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/misc/vexpress_config.c b/drivers/misc/vexpress_config.c
index 9a9c5f75573e..2b1d19a14a7e 100644
--- a/drivers/misc/vexpress_config.c
+++ b/drivers/misc/vexpress_config.c
@@ -12,6 +12,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <misc.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define SYS_CFGDATA 0xa0
diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index d9e991355b7f..eea327ace76e 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -16,6 +16,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
/* CTL_CFG Registers */
#define CTL_CFG_2 0x14
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index 1781d7a3f914..cb838a398a63 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <asm/arch/clk.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#define ATMEL_SDHC_MIN_FREQ 400000
#define ATMEL_SDHC_GCK_RATE 240000000
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 7a410d1dd361..ac1a421cd3e9 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -45,6 +45,7 @@
#include <time.h>
#include <asm/arch/msg.h>
#include <asm/arch/mbox.h>
+#include <linux/errno.h>
#include <mach/sdhci.h>
#include <mach/timer.h>
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index cf362f620ae1..97ca2ce029af 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -43,6 +43,7 @@
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/bcmstb_sdhci.c b/drivers/mmc/bcmstb_sdhci.c
index 5269aa77cebd..5c4d227c6f00 100644
--- a/drivers/mmc/bcmstb_sdhci.c
+++ b/drivers/mmc/bcmstb_sdhci.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
+#include <linux/errno.h>
#include <mach/sdhci.h>
#include <malloc.h>
#include <sdhci.h>
diff --git a/drivers/mmc/ca_dw_mmc.c b/drivers/mmc/ca_dw_mmc.c
index 8ae5bd41454e..fcb2700a7a8f 100644
--- a/drivers/mmc/ca_dw_mmc.c
+++ b/drivers/mmc/ca_dw_mmc.c
@@ -8,6 +8,7 @@
#include <dwmmc.h>
#include <fdtdec.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <errno.h>
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index f4edff7566e7..f8dc47bc2398 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -19,6 +19,7 @@
#include <asm-generic/gpio.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define WATCHDOG_COUNT (100000)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index ce7cfb5930e5..8c690c3ce127 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -18,6 +18,7 @@
#include <wait_bit.h>
#include <asm/cache.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#define PAGE_SIZE 4096
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 55d3ad1692c5..f54413aa9e5c 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -9,6 +9,7 @@
#include <fdtdec.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <errno.h>
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 3aa8e943efb5..6ad270e7c2d8 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -34,6 +34,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index b8f89affc33e..ffd21684d3f6 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -29,6 +29,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/drivers/mmc/iproc_sdhci.c b/drivers/mmc/iproc_sdhci.c
index cd9d87be98b7..216538d435a8 100644
--- a/drivers/mmc/iproc_sdhci.c
+++ b/drivers/mmc/iproc_sdhci.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/jz_mmc.c b/drivers/mmc/jz_mmc.c
index eec432a0df65..608e56239764 100644
--- a/drivers/mmc/jz_mmc.c
+++ b/drivers/mmc/jz_mmc.c
@@ -16,6 +16,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <mach/jz4780.h>
#include <wait_bit.h>
diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c
index 2afc80ff0c5e..b804a0c83648 100644
--- a/drivers/mmc/meson_gx_mmc.c
+++ b/drivers/mmc/meson_gx_mmc.c
@@ -16,6 +16,7 @@
#include <asm/gpio.h>
#include <asm/arch/sd_emmc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/string.h>
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 9c30e01028b7..cdc93c756c0b 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -14,6 +14,7 @@
#include <dm/device_compat.h>
#include <dm/lists.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include "mmc_private.h"
int dm_mmc_get_b_max(struct udevice *dev, void *dst, lbaint_t blkcnt)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index a3fdc5d63cc8..932205968960 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -23,6 +23,7 @@
#include <part.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/drivers/mmc/mmc_legacy.c b/drivers/mmc/mmc_legacy.c
index da2941bada8b..42077f88652c 100644
--- a/drivers/mmc/mmc_legacy.c
+++ b/drivers/mmc/mmc_legacy.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <mmc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include "mmc_private.h"
static struct list_head mmc_devices;
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index f89433141738..0581adb08415 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <vsprintf.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
#include <linux/crc7.h>
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 6e61ef6b8585..0ac7529f01a2 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -17,6 +17,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* Non-standard registers needed for SDHCI startup */
diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c
index 2fe33e07c18b..2ec53e853a97 100644
--- a/drivers/mmc/mtk-sd.c
+++ b/drivers/mmc/mtk-sd.c
@@ -18,6 +18,7 @@
#include <dm/device_compat.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
diff --git a/drivers/mmc/mv_sdhci.c b/drivers/mmc/mv_sdhci.c
index 775f2041a1ac..f3e44f53cb41 100644
--- a/drivers/mmc/mv_sdhci.c
+++ b/drivers/mmc/mv_sdhci.c
@@ -9,6 +9,7 @@
#include <sdhci.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/mbus.h>
#include <linux/string.h>
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index d586342a58d8..3a967ac7720e 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -21,6 +21,7 @@
#include <asm/arch/soc.h>
#include <mvebu_mmc.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mmc/nexell_dw_mmc.c b/drivers/mmc/nexell_dw_mmc.c
index 046275944498..e5df2920242f 100644
--- a/drivers/mmc/nexell_dw_mmc.c
+++ b/drivers/mmc/nexell_dw_mmc.c
@@ -14,6 +14,7 @@
#include <syscon.h>
#include <asm/arch/reset.h>
#include <asm/arch/clk.h>
+#include <linux/errno.h>
#define DWMCI_CLKSEL 0x09C
#define DWMCI_SHIFT_0 0x0
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 54a34c725981..606c4a5c1c6c 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -57,6 +57,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include <thermal.h>
diff --git a/drivers/mmc/pci_mmc.c b/drivers/mmc/pci_mmc.c
index 0c45e1b8936e..345a330a983a 100644
--- a/drivers/mmc/pci_mmc.c
+++ b/drivers/mmc/pci_mmc.c
@@ -16,6 +16,7 @@
#include <acpi/acpi_dp.h>
#include <asm-generic/gpio.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
struct pci_mmc_plat {
struct mmc_config cfg;
diff --git a/drivers/mmc/renesas-sdhi.c b/drivers/mmc/renesas-sdhi.c
index 83153c5c4c4d..4e8d2a9e509a 100644
--- a/drivers/mmc/renesas-sdhi.c
+++ b/drivers/mmc/renesas-sdhi.c
@@ -17,6 +17,7 @@
#include <linux/compat.h>
#include <linux/delay.h>
#include <linux/dma-direction.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <power/regulator.h>
diff --git a/drivers/mmc/rockchip_dw_mmc.c b/drivers/mmc/rockchip_dw_mmc.c
index f1dafa6ce711..6d31f9f3d306 100644
--- a/drivers/mmc/rockchip_dw_mmc.c
+++ b/drivers/mmc/rockchip_dw_mmc.c
@@ -18,6 +18,7 @@
#include <asm/arch-rockchip/periph.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
struct rockchip_mmc_plat {
#if CONFIG_IS_ENABLED(OF_PLATDATA)
diff --git a/drivers/mmc/rpmb.c b/drivers/mmc/rpmb.c
index 0d1b3eb875b3..93fdf72f3444 100644
--- a/drivers/mmc/rpmb.c
+++ b/drivers/mmc/rpmb.c
@@ -14,6 +14,7 @@
#include <mmc.h>
#include <sdhci.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/sha256.h>
#include "mmc_private.h"
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index e06662141f54..cf32ca808211 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -12,6 +12,7 @@
#include <fdtdec.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/gpio.h>
#include <asm/arch/mmc.h>
diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c
index b1e53e8d425a..96901bce72da 100644
--- a/drivers/mmc/sdhci-cadence.c
+++ b/drivers/mmc/sdhci-cadence.c
@@ -11,6 +11,7 @@
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 9cfe0fcb9a55..f6b8625c21eb 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -22,6 +22,7 @@
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <phys2bus.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mmc/snps_dw_mmc.c b/drivers/mmc/snps_dw_mmc.c
index f7c64312154c..f123d3fe2222 100644
--- a/drivers/mmc/snps_dw_mmc.c
+++ b/drivers/mmc/snps_dw_mmc.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/err.h>
#include <malloc.h>
diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 1c3d996bcd52..9877919f4f1b 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -15,6 +15,7 @@
#include <fdtdec.h>
#include <asm/global_data.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/err.h>
#include <malloc.h>
diff --git a/drivers/mmc/sti_sdhci.c b/drivers/mmc/sti_sdhci.c
index 394c4d19b567..e71b63a8fdfc 100644
--- a/drivers/mmc/sti_sdhci.c
+++ b/drivers/mmc/sti_sdhci.c
@@ -12,6 +12,7 @@
#include <sdhci.h>
#include <asm/arch/sdhci.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mmc/stm32_sdmmc2.c b/drivers/mmc/stm32_sdmmc2.c
index 0bc2ecee69be..f46c9a8e5bf2 100644
--- a/drivers/mmc/stm32_sdmmc2.c
+++ b/drivers/mmc/stm32_sdmmc2.c
@@ -16,6 +16,7 @@
#include <asm/cache.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <mmc.h>
#include <reset.h>
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 4152b7be0e42..7164db122fa8 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -24,6 +24,7 @@
#include <asm/arch/mmc.h>
#include <asm-generic/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef CONFIG_DM_MMC
diff --git a/drivers/mmc/tangier_sdhci.c b/drivers/mmc/tangier_sdhci.c
index 879e2c98a21d..622cc3ef1bea 100644
--- a/drivers/mmc/tangier_sdhci.c
+++ b/drivers/mmc/tangier_sdhci.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <malloc.h>
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index e7a06ec79492..4cf183864340 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -23,6 +23,7 @@
#if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
#include <asm/arch/clock.h>
#endif
+#include <linux/errno.h>
struct tegra_mmc_plat {
struct mmc_config cfg;
diff --git a/drivers/mmc/tmio-common.c b/drivers/mmc/tmio-common.c
index b56f650f8a76..ff563cf97734 100644
--- a/drivers/mmc/tmio-common.c
+++ b/drivers/mmc/tmio-common.c
@@ -16,6 +16,7 @@
#include <linux/compat.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
#include <power/regulator.h>
diff --git a/drivers/mmc/xenon_sdhci.c b/drivers/mmc/xenon_sdhci.c
index 1336d9193357..355b4eecb093 100644
--- a/drivers/mmc/xenon_sdhci.c
+++ b/drivers/mmc/xenon_sdhci.c
@@ -21,6 +21,7 @@
#include <asm/global_data.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <sdhci.h>
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index 01e75e2e770b..923a10f11ecd 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -11,6 +11,7 @@
#include <fdtdec.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "mmc_private.h"
#include <log.h>
#include <dm/device_compat.h>
diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c
index 9722f32a533f..eb901c8c93bf 100644
--- a/drivers/mtd/altera_qspi.c
+++ b/drivers/mtd/altera_qspi.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index c6fb2a35ace0..53f605084a5b 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -36,6 +36,7 @@
#include <asm/unaligned.h>
#include <env_internal.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <mtd/cfi_flash.h>
#include <watchdog.h>
diff --git a/drivers/mtd/hbmc-am654.c b/drivers/mtd/hbmc-am654.c
index 846b0e832b75..1583efd267de 100644
--- a/drivers/mtd/hbmc-am654.c
+++ b/drivers/mtd/hbmc-am654.c
@@ -9,6 +9,7 @@
#include <regmap.h>
#include <syscon.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#define FSS_SYSC_REG 0x4
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index ebdec0dd6c56..cdf4600cd31e 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -12,6 +12,7 @@
#include <dm/device.h>
#include <dm/uclass-internal.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <mtd.h>
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c
index 1baaa6e9475c..46f2330468c7 100644
--- a/drivers/mtd/mtdconcat.c
+++ b/drivers/mtd/mtdconcat.c
@@ -23,6 +23,7 @@
#include <div64.h>
#include <linux/bug.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#endif
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index ba19bd8c7fa0..b995fb8abab3 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -33,6 +33,7 @@
#include <linux/bug.h>
#include <linux/err.h>
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#endif
diff --git a/drivers/mtd/nand/bbt.c b/drivers/mtd/nand/bbt.c
index 972aec6e2666..674b9c98b097 100644
--- a/drivers/mtd/nand/bbt.c
+++ b/drivers/mtd/nand/bbt.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <dm/devres.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/mtd/nand.h>
#ifndef __UBOOT__
#include <linux/slab.h>
diff --git a/drivers/mtd/nand/core.c b/drivers/mtd/nand/core.c
index 45d827f686c0..1d9d13dfe1e3 100644
--- a/drivers/mtd/nand/core.c
+++ b/drivers/mtd/nand/core.c
@@ -15,6 +15,7 @@
#include <linux/module.h>
#endif
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/mtd/nand.h>
#include <linux/printk.h>
diff --git a/drivers/mtd/nand/raw/atmel_nand.c b/drivers/mtd/nand/raw/atmel_nand.c
index dcd5f8ff82e4..75c21ff7852e 100644
--- a/drivers/mtd/nand/raw/atmel_nand.c
+++ b/drivers/mtd/nand/raw/atmel_nand.c
@@ -19,6 +19,7 @@
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mtd/nand/raw/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index f64de80bf2bd..6c4eb58abb60 100644
--- a/drivers/mtd/nand/raw/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
@@ -34,6 +34,7 @@
#include <nand.h>
#include <dm/uclass.h>
#include <asm/ti-common/davinci_nand.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/* Definitions for 4-bit hardware ECC */
diff --git a/drivers/mtd/nand/raw/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index 8318ff507f37..1f6963b55fe2 100644
--- a/drivers/mtd/nand/raw/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
@@ -9,6 +9,7 @@
#include <dm/device_compat.h>
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/printk.h>
diff --git a/drivers/mtd/nand/raw/denali_spl.c b/drivers/mtd/nand/raw/denali_spl.c
index 7252e0340c6a..504f773e4dec 100644
--- a/drivers/mtd/nand/raw/denali_spl.c
+++ b/drivers/mtd/nand/raw/denali_spl.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/unaligned.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mtd/rawnand.h>
#include <linux/string.h>
#include "denali.h"
diff --git a/drivers/mtd/nand/raw/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
index 1feaeadd4b72..0991a398f452 100644
--- a/drivers/mtd/nand/raw/fsmc_nand.c
+++ b/drivers/mtd/nand/raw/fsmc_nand.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/mtd/nand_ecc.h>
#include <linux/mtd/fsmc_nand.h>
#include <asm/arch/hardware.h>
diff --git a/drivers/mtd/nand/raw/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index c5e56c05873c..a90d30bd1003 100644
--- a/drivers/mtd/nand/raw/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
@@ -15,6 +15,7 @@
defined(CONFIG_MX51) || defined(CONFIG_MX53)
#include <asm/arch/imx-regs.h>
#endif
+#include <linux/errno.h>
#include <linux/printk.h>
#include "mxc_nand.h"
diff --git a/drivers/mtd/nand/raw/mxc_nand_spl.c b/drivers/mtd/nand/raw/mxc_nand_spl.c
index e1e542519d81..ad01cdce2607 100644
--- a/drivers/mtd/nand/raw/mxc_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxc_nand_spl.c
@@ -15,6 +15,7 @@
#include <nand.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include "mxc_nand.h"
#if defined(MXC_NFC_V1) || defined(MXC_NFC_V2_1)
diff --git a/drivers/mtd/nand/raw/mxs_nand_dt.c b/drivers/mtd/nand/raw/mxs_nand_dt.c
index 43dbe9e66ec4..675b284b063b 100644
--- a/drivers/mtd/nand/raw/mxs_nand_dt.c
+++ b/drivers/mtd/nand/raw/mxs_nand_dt.c
@@ -13,6 +13,7 @@
*/
#include <dm.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/printk.h>
diff --git a/drivers/mtd/nand/raw/mxs_nand_spl.c b/drivers/mtd/nand/raw/mxs_nand_spl.c
index bc3bc836434a..0fe538e7d6d8 100644
--- a/drivers/mtd/nand/raw/mxs_nand_spl.c
+++ b/drivers/mtd/nand/raw/mxs_nand_spl.c
@@ -15,6 +15,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
static struct mtd_info *mtd;
diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
index 1b7918c54b69..486c1b4a8bdc 100644
--- a/drivers/mtd/nand/raw/nand.c
+++ b/drivers/mtd/nand/raw/nand.c
@@ -9,6 +9,7 @@
#include <nand.h>
#include <errno.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/mtd/concat.h>
#ifndef CONFIG_SYS_NAND_BASE_LIST
diff --git a/drivers/mtd/nand/raw/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index 4f3c3223ca71..82b925e57c80 100644
--- a/drivers/mtd/nand/raw/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
@@ -63,6 +63,7 @@
#include <dm/devres.h>
#include <linux/bug.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/bbm.h>
#include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c
index 5733bcb9c624..94e03e9ba5ec 100644
--- a/drivers/mtd/nand/raw/nand_bch.c
+++ b/drivers/mtd/nand/raw/nand_bch.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <log.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
/*#include <asm/io.h>*/
diff --git a/drivers/mtd/nand/raw/nand_timings.c b/drivers/mtd/nand/raw/nand_timings.c
index e6aa79039131..008ea3bdf40c 100644
--- a/drivers/mtd/nand/raw/nand_timings.c
+++ b/drivers/mtd/nand/raw/nand_timings.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/mtd/rawnand.h>
diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
index c1e884af950a..1b8003fd73c0 100644
--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
+++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
@@ -14,6 +14,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
#include <linux/printk.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 5fd741f11243..025f18ad49dd 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -36,6 +36,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mtd/nand/raw/sunxi_nand_spl.c b/drivers/mtd/nand/raw/sunxi_nand_spl.c
index b098ebef8f39..9b54d007f8e4 100644
--- a/drivers/mtd/nand/raw/sunxi_nand_spl.c
+++ b/drivers/mtd/nand/raw/sunxi_nand_spl.c
@@ -13,6 +13,7 @@
#include <linux/bitops.h>
#include <linux/ctype.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* registers */
diff --git a/drivers/mtd/nand/raw/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
index 708653ab1621..ceec8c81e94d 100644
--- a/drivers/mtd/nand/raw/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <time.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c
index a59dae357f32..99622a335a3d 100644
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -30,6 +30,7 @@
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/mtd/spinand.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mtd/nand/spi/gigadevice.c b/drivers/mtd/nand/spi/gigadevice.c
index 0b228dcb5b1d..465f18642b06 100644
--- a/drivers/mtd/nand/spi/gigadevice.c
+++ b/drivers/mtd/nand/spi/gigadevice.c
@@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/kernel.h>
#endif
+#include <linux/errno.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_GIGADEVICE 0xC8
diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c
index 215f09acc371..83f9daaf5791 100644
--- a/drivers/mtd/nand/spi/macronix.c
+++ b/drivers/mtd/nand/spi/macronix.c
@@ -11,6 +11,7 @@
#include <linux/kernel.h>
#endif
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_MACRONIX 0xC2
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 6bacf14aafea..5fde4a78d23d 100644
--- a/drivers/mtd/nand/spi/micron.c
+++ b/drivers/mtd/nand/spi/micron.c
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#endif
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_MICRON 0x2c
diff --git a/drivers/mtd/nand/spi/toshiba.c b/drivers/mtd/nand/spi/toshiba.c
index c2cd3b426b31..d0b003d2957d 100644
--- a/drivers/mtd/nand/spi/toshiba.c
+++ b/drivers/mtd/nand/spi/toshiba.c
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#endif
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_TOSHIBA 0x98
diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c
index c119486efb7a..4e1c8883b383 100644
--- a/drivers/mtd/nand/spi/winbond.c
+++ b/drivers/mtd/nand/spi/winbond.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#endif
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/mtd/spinand.h>
#define SPINAND_MFR_WINBOND 0xEF
diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c
index a50aec7d77e4..3daa76f949ab 100644
--- a/drivers/mtd/pic32_flash.c
+++ b/drivers/mtd/pic32_flash.c
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <mach/pic32.h>
#include <wait_bit.h>
diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c
index 1398a474b218..7dc795c06aba 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -22,6 +22,7 @@
#include <mtd.h>
#include <wait_bit.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <mtd/cfi_flash.h>
#define RPC_CMNCR 0x0000 /* R/W */
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index e18326b56921..0ab3596a2a1f 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -17,6 +17,7 @@
#include <spi.h>
#include <os.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <spi_flash.h>
diff --git a/drivers/mtd/spi/sf_dataflash.c b/drivers/mtd/spi/sf_dataflash.c
index 90f09a5fa1d5..c65d62e7cdb2 100644
--- a/drivers/mtd/spi/sf_dataflash.c
+++ b/drivers/mtd/spi/sf_dataflash.c
@@ -20,6 +20,7 @@
#include <time.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/math64.h>
#include <linux/string.h>
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 8de8f94d2f3e..dd5e624f4b2c 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -15,6 +15,7 @@
#include <spi.h>
#include <spi_flash.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "sf_internal.h"
diff --git a/drivers/mtd/st_smi.c b/drivers/mtd/st_smi.c
index d53466059905..a6c1a0e1c78a 100644
--- a/drivers/mtd/st_smi.c
+++ b/drivers/mtd/st_smi.c
@@ -10,6 +10,7 @@
#include <time.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/mtd/st_smi.h>
#include <asm/io.h>
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
index 7b9ca10ed2aa..2fdf3dbc6583 100644
--- a/drivers/mtd/ubi/attach.c
+++ b/drivers/mtd/ubi/attach.c
@@ -81,6 +81,7 @@
#include <div64.h>
#include <linux/bug.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#endif
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index f07051c9f735..f0f63ae7df03 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -33,6 +33,7 @@
#else
#include <vsprintf.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/mtd/ubi/debug.c b/drivers/mtd/ubi/debug.c
index c84e3471266a..213061847d73 100644
--- a/drivers/mtd/ubi/debug.c
+++ b/drivers/mtd/ubi/debug.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <ubi_uboot.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "ubi.h"
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 9fe5ed791258..23a72d6a325c 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -36,6 +36,7 @@
#include <u-boot/crc.h>
#else
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
diff --git a/drivers/mtd/ubi/fastmap-wl.c b/drivers/mtd/ubi/fastmap-wl.c
index 4cb1377c4257..df5fab00e1a3 100644
--- a/drivers/mtd/ubi/fastmap-wl.c
+++ b/drivers/mtd/ubi/fastmap-wl.c
@@ -6,6 +6,8 @@
*
*/
+#include <linux/errno.h>
+
/**
* update_fastmap_work_fn - calls ubi_update_fastmap from a work queue
* @wrk: the work description object
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 90ed73b8577f..6812b122d651 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -17,6 +17,7 @@
#include <malloc.h>
#include <ubi_uboot.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index ef819a86d27c..f88bafd35d3e 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -83,6 +83,7 @@
#else
#include <hexdump.h>
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 3fac8b2b3088..981146ef034b 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -16,6 +16,7 @@
#include <asm/div64.h>
#else
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include <linux/err.h>
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 81275deaeb77..b9bad95cf6f8 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <malloc.h>
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include "ubi.h"
/**
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 175988899c39..d91c9effd070 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -28,6 +28,7 @@
#include <asm/pgtable.h>
#else
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#endif
#include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index c4856b6c11eb..96ecaf60c040 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -32,6 +32,7 @@
#else
#include <div64.h>
#include <ubi_uboot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include <linux/err.h>
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 079ffbe7563e..806abc9122e8 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -20,6 +20,7 @@
#include <div64.h>
#include <ubi_uboot.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include <linux/math64.h>
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index cb4de78fcbba..91c0589bb62d 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -56,6 +56,7 @@
#else
#include <ubi_uboot.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index b7e5cc17ef4d..d0963285b1fd 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -95,6 +95,7 @@
#else
#include <ubi_uboot.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#endif
#include "ubi.h"
diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c
index 3ffad5485352..96afa7dec115 100644
--- a/drivers/mtd/ubispl/ubispl.c
+++ b/drivers/mtd/ubispl/ubispl.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <errno.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
#include <ubispl.h>
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index 212f43ca4daa..c73c95ce6153 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -24,6 +24,7 @@
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <wait_bit.h>
#include <asm/io.h>
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index 8e58464cc6ce..bf17d1fb29ae 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -24,6 +24,7 @@
#include <asm/global_data.h>
#include <linux/dma-mapping.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "altera_tse.h"
diff --git a/drivers/net/armada100_fec.c b/drivers/net/armada100_fec.c
index 87c01e0e3cd2..c8f61a23d125 100644
--- a/drivers/net/armada100_fec.c
+++ b/drivers/net/armada100_fec.c
@@ -21,6 +21,7 @@
#include <asm/u-boot.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <asm/io.h>
#include <asm/arch/armada100.h>
diff --git a/drivers/net/at91_emac.c b/drivers/net/at91_emac.c
index d49f9216c7de..26381a1bc6e3 100644
--- a/drivers/net/at91_emac.c
+++ b/drivers/net/at91_emac.c
@@ -21,6 +21,7 @@
#include <miiphy.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <linux/string.h>
diff --git a/drivers/net/bcm-sf2-eth.c b/drivers/net/bcm-sf2-eth.c
index a0cbecf60dfc..db7930fb88eb 100644
--- a/drivers/net/bcm-sf2-eth.c
+++ b/drivers/net/bcm-sf2-eth.c
@@ -12,6 +12,7 @@
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c
index b759d12867d7..eeea3dc579f8 100644
--- a/drivers/net/bcm6348-eth.c
+++ b/drivers/net/bcm6348-eth.c
@@ -19,6 +19,7 @@
#include <vsprintf.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define ETH_RX_DESC PKTBUFSRX
diff --git a/drivers/net/bcm6368-eth.c b/drivers/net/bcm6368-eth.c
index f6b473ae9b00..0e6d266f1037 100644
--- a/drivers/net/bcm6368-eth.c
+++ b/drivers/net/bcm6368-eth.c
@@ -20,6 +20,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index a767fa6e6de1..cd3dac49e7ea 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -33,6 +33,7 @@
#include <net.h>
#include <dm/of_access.h>
#include <dm/ofnode.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
#include <asm/dma-mapping.h>
diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c
index 5df36fa67269..37c3a54761b6 100644
--- a/drivers/net/calxedaxgmac.c
+++ b/drivers/net/calxedaxgmac.c
@@ -13,6 +13,7 @@
#include <linux/delay.h>
#include <linux/err.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define TX_NUM_DESC 1
diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c
index 3b0219eee920..8bc75baf97f1 100644
--- a/drivers/net/dc2114x.c
+++ b/drivers/net/dc2114x.c
@@ -12,6 +12,7 @@
#include <asm/u-boot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define SROM_DLEVEL 0
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index bb36b77169a7..ffb41e8bf1f4 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -29,6 +29,7 @@
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <linux/printk.h>
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index db76ac9c7528..68d80bafa1e3 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -51,6 +51,7 @@
#endif
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c
index e93561dffa87..cddbd56ac7dc 100644
--- a/drivers/net/dwmac_socfpga.c
+++ b/drivers/net/dwmac_socfpga.c
@@ -13,6 +13,7 @@
#include <regmap.h>
#include <reset.h>
#include <syscon.h>
+#include <linux/errno.h>
#include "designware.h"
#include <dm/device_compat.h>
#include <linux/err.h>
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index 5041a1894eed..1705dde9d2c1 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -43,6 +43,7 @@ tested on both gig copper and gig fiber boards
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "e1000.h"
#include <asm/cache.h>
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index a8a20a080120..3d7decd126ae 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -16,6 +16,7 @@
#include <pci.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* Ethernet chip registers. */
diff --git a/drivers/net/ep93xx_eth.c b/drivers/net/ep93xx_eth.c
index 802d04a26baa..a4767e8742dd 100644
--- a/drivers/net/ep93xx_eth.c
+++ b/drivers/net/ep93xx_eth.c
@@ -28,6 +28,7 @@
#include <miiphy.h>
#include <asm/u-boot.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/types.h>
diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c
index 4afa6c87461d..861fc1bfb8a1 100644
--- a/drivers/net/eth-phy-uclass.c
+++ b/drivers/net/eth-phy-uclass.c
@@ -10,6 +10,7 @@
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#include <dm/lists.h>
+#include <linux/errno.h>
struct eth_phy_device_priv {
struct mii_dev *mdio_bus;
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index a1e051770c7e..c331cd9e97ca 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -18,6 +18,7 @@
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <dm/platform_data/net_ethoc.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <malloc.h>
#include <net.h>
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c
index 7d65ee70be4b..c451b136ae3f 100644
--- a/drivers/net/fm/eth.c
+++ b/drivers/net/fm/eth.c
@@ -28,6 +28,7 @@
#include <fsl_memac.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "fm.h"
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index b779b5c22998..1829517d024f 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -15,6 +15,7 @@
#include <asm/fsl_serdes.h>
#endif
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "fm.h"
diff --git a/drivers/net/fm/memac_phy.c b/drivers/net/fm/memac_phy.c
index 8973f498d173..79a15989ad94 100644
--- a/drivers/net/fm/memac_phy.c
+++ b/drivers/net/fm/memac_phy.c
@@ -13,6 +13,7 @@
#include <fsl_memac.h>
#include <fm_eth.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef CONFIG_SYS_MEMAC_LITTLE_ENDIAN
diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c
index bedff4ff321f..fb325846322e 100644
--- a/drivers/net/fsl-mc/dpio/qbman_portal.c
+++ b/drivers/net/fsl-mc/dpio/qbman_portal.c
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <asm/arch/clock.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "qbman_portal.h"
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 3a7e8e84b468..d2f8869a3408 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -18,6 +18,7 @@
#include <linux/bug.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <net.h>
#include <fdt_support.h>
diff --git a/drivers/net/fsl-mc/mc_sys.c b/drivers/net/fsl-mc/mc_sys.c
index 239bccb4b0a2..aa50e64bced0 100644
--- a/drivers/net/fsl-mc/mc_sys.c
+++ b/drivers/net/fsl-mc/mc_sys.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define MC_CMD_HDR_READ_CMDID(_hdr) \
((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index ed302eace59f..7b9730a84463 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -18,6 +18,7 @@
#include <miiphy.h>
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "fsl_enetc.h"
diff --git a/drivers/net/fsl_enetc_mdio.c b/drivers/net/fsl_enetc_mdio.c
index 9bca18e94076..282c08c82f55 100644
--- a/drivers/net/fsl_enetc_mdio.c
+++ b/drivers/net/fsl_enetc_mdio.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <miiphy.h>
+#include <linux/errno.h>
#include "fsl_enetc.h"
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 819de6236252..64c1e71ebbe7 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -22,6 +22,7 @@
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <asm/immap.h>
#include <asm/fsl_mcdmafec.h>
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index f5e50ff08477..af58d04da231 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -24,6 +24,7 @@
#include <asm/cache.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index e2b897a7cccf..569f1e400473 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -18,6 +18,7 @@
#include <asm/global_data.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/string.h>
diff --git a/drivers/net/gmac_rockchip.c b/drivers/net/gmac_rockchip.c
index 7cd2451e0846..8aed219d9eda 100644
--- a/drivers/net/gmac_rockchip.c
+++ b/drivers/net/gmac_rockchip.c
@@ -28,6 +28,7 @@
#include <dm/pinctrl.h>
#include <dt-bindings/clock/rk3288-cru.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "designware.h"
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index 0c71c51ceb43..7310d6a04267 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -13,6 +13,7 @@
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <miiphy.h>
#include <net.h>
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index 65b160f8c40c..f357fec5cc9a 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -15,6 +15,7 @@
#include <miiphy.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "ks8851_mll.h"
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index ac0487e68d28..5da5582200d4 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -23,6 +23,7 @@
#include <linux/compat.h>
#include <fsl-mc/fsl_dpmac.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <fsl-mc/ldpaa_wriop.h>
diff --git a/drivers/net/ldpaa_eth/ldpaa_wriop.c b/drivers/net/ldpaa_eth/ldpaa_wriop.c
index 06a284ad684d..e2ad13b89757 100644
--- a/drivers/net/ldpaa_eth/ldpaa_wriop.c
+++ b/drivers/net/ldpaa_eth/ldpaa_wriop.c
@@ -11,6 +11,7 @@
#include <linux/compat.h>
#include <asm/arch/fsl_serdes.h>
#include <fsl-mc/ldpaa_wriop.h>
+#include <linux/errno.h>
struct wriop_dpmac_info dpmac_info[NUM_WRIOP_PORTS];
diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c
index 9432b6eb85c7..a61508befc81 100644
--- a/drivers/net/ldpaa_eth/lx2160a.c
+++ b/drivers/net/ldpaa_eth/lx2160a.c
@@ -8,6 +8,7 @@
#include <asm/io.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/arch/soc.h>
+#include <linux/errno.h>
#include <linux/mii.h>
u32 dpmac_to_devdisr[] = {
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 5a86f204ee34..91ca0e03216b 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -23,6 +23,7 @@
#include <asm/immap.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <linux/string.h>
diff --git a/drivers/net/mdio_mux_sandbox.c b/drivers/net/mdio_mux_sandbox.c
index 3dba4d18a159..c22882c6e8db 100644
--- a/drivers/net/mdio_mux_sandbox.c
+++ b/drivers/net/mdio_mux_sandbox.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <miiphy.h>
+#include <linux/errno.h>
/* macros copied over from mdio_sandbox.c */
#define SANDBOX_PHY_ADDR 5
diff --git a/drivers/net/mdio_sandbox.c b/drivers/net/mdio_sandbox.c
index b731f60a98a1..2d7c845a098e 100644
--- a/drivers/net/mdio_sandbox.c
+++ b/drivers/net/mdio_sandbox.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <errno.h>
#include <miiphy.h>
+#include <linux/errno.h>
#define SANDBOX_PHY_ADDR 5
#define SANDBOX_PHY_REG_CNT 2
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index 94939c590f6e..5c86710cfdb1 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -18,6 +18,7 @@
#include <asm/ppc.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <phy.h>
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index d4752492c5ba..0e0a4d7037ca 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -13,6 +13,7 @@
#include <fdt_support.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index 0ebc207157b9..6ceb250688ad 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -12,6 +12,7 @@
#include <dm/of_addr.h>
#include <fdt_support.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/mscc_mac_table.c b/drivers/net/mscc_eswitch/mscc_mac_table.c
index 25b9cad42c97..dba44318f529 100644
--- a/drivers/net/mscc_eswitch/mscc_mac_table.c
+++ b/drivers/net/mscc_eswitch/mscc_mac_table.c
@@ -4,6 +4,7 @@
*/
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include "mscc_mac_table.h"
diff --git a/drivers/net/mscc_eswitch/mscc_miim.c b/drivers/net/mscc_eswitch/mscc_miim.c
index de257d4d60f4..9d59fc53ee9d 100644
--- a/drivers/net/mscc_eswitch/mscc_miim.c
+++ b/drivers/net/mscc_eswitch/mscc_miim.c
@@ -7,6 +7,7 @@
#include <vsprintf.h>
#include <wait_bit.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "mscc_miim.h"
#define MIIM_STATUS 0x0
diff --git a/drivers/net/mscc_eswitch/mscc_xfer.c b/drivers/net/mscc_eswitch/mscc_xfer.c
index 6f7474645717..a2827b5377e6 100644
--- a/drivers/net/mscc_eswitch/mscc_xfer.c
+++ b/drivers/net/mscc_eswitch/mscc_xfer.c
@@ -6,6 +6,7 @@
#include <log.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include "mscc_xfer.h"
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index de8a44e48bc1..b787524af163 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -12,6 +12,7 @@
#include <dm/of_addr.h>
#include <fdt_support.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index 540799567ec9..9b6e5d8743de 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -12,6 +12,7 @@
#include <dm/of_addr.h>
#include <fdt_support.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index a1c86062fac4..eecf6153245a 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -12,6 +12,7 @@
#include <dm/of_addr.h>
#include <fdt_support.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <miiphy.h>
diff --git a/drivers/net/mt7628-eth.c b/drivers/net/mt7628-eth.c
index 1eea520b8762..fd6193617275 100644
--- a/drivers/net/mt7628-eth.c
+++ b/drivers/net/mt7628-eth.c
@@ -30,6 +30,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index ad86820bbb09..8cf78422f7d2 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -26,6 +26,7 @@
#include <dm/device_compat.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/mdio.h>
#include <linux/mii.h>
diff --git a/drivers/net/mvmdio.c b/drivers/net/mvmdio.c
index deaba8aee4f3..c712043dc7d0 100644
--- a/drivers/net/mvmdio.c
+++ b/drivers/net/mvmdio.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <wait_bit.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define MVMDIO_SMI_DATA_SHIFT 0
diff --git a/drivers/net/pch_gbe.c b/drivers/net/pch_gbe.c
index fa824079391a..887958fef546 100644
--- a/drivers/net/pch_gbe.c
+++ b/drivers/net/pch_gbe.c
@@ -17,6 +17,7 @@
#include <pci.h>
#include <miiphy.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "pch_gbe.h"
diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c
index 41231a0a773f..d574aff8327a 100644
--- a/drivers/net/pcnet.c
+++ b/drivers/net/pcnet.c
@@ -21,6 +21,7 @@
#include <pci.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define PCNET_DEBUG_LEVEL 0 /* 0=off, 1=init, 2=rx/tx */
diff --git a/drivers/net/pfe_eth/pfe_driver.c b/drivers/net/pfe_eth/pfe_driver.c
index 7d712370100e..64d570e361eb 100644
--- a/drivers/net/pfe_eth/pfe_driver.c
+++ b/drivers/net/pfe_eth/pfe_driver.c
@@ -8,6 +8,7 @@
#include <malloc.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/pfe_eth/pfe_eth.h>
#include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c
index 4848e2e2aa91..f582f8c5af5b 100644
--- a/drivers/net/pfe_eth/pfe_eth.c
+++ b/drivers/net/pfe_eth/pfe_eth.c
@@ -13,6 +13,7 @@
#include <dm/platform_data/pfe_dm_eth.h>
#include <net.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <net/pfe_eth/pfe_eth.h>
#include <net/pfe_eth/pfe_mdio.h>
diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c
index 66d5ad930e3b..286594d91b94 100644
--- a/drivers/net/pfe_eth/pfe_firmware.c
+++ b/drivers/net/pfe_eth/pfe_firmware.c
@@ -15,6 +15,7 @@
#include <malloc.h>
#include <stdio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/pfe_eth/pfe_eth.h>
#include <net/pfe_eth/pfe_firmware.h>
diff --git a/drivers/net/pfe_eth/pfe_mdio.c b/drivers/net/pfe_eth/pfe_mdio.c
index 4cc55b36885a..08536dea67ef 100644
--- a/drivers/net/pfe_eth/pfe_mdio.c
+++ b/drivers/net/pfe_eth/pfe_mdio.c
@@ -12,6 +12,7 @@
#include <dm/platform_data/pfe_dm_eth.h>
#include <net.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <net/pfe_eth/pfe_eth.h>
extern struct gemac_s gem_info[];
diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c
index aa3e566bf2ea..1395af5444d3 100644
--- a/drivers/net/phy/aquantia.c
+++ b/drivers/net/phy/aquantia.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
#include <malloc.h>
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 29db299c1e79..7577ebdbe833 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -12,6 +12,7 @@
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <dt-bindings/net/qca-ar803x.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define AR803x_PHY_DEBUG_ADDR_REG 0x1d
diff --git a/drivers/net/phy/b53.c b/drivers/net/phy/b53.c
index 2e4796f5d6c8..1bc9b2e4e7c8 100644
--- a/drivers/net/phy/b53.c
+++ b/drivers/net/phy/b53.c
@@ -28,6 +28,7 @@
#include <vsprintf.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <errno.h>
diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index 18e9f5ab25ce..8ab483cdd58d 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -15,6 +15,7 @@
#include <vsprintf.h>
#include <linux/ctype.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/err.h>
#include <phy.h>
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index e4081244f211..9f07045007c7 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -10,6 +10,7 @@
#include <linux/bitops.h>
#include <linux/compat.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <dm.h>
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index b4833c5ac96d..987cde1fc129 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -13,6 +13,7 @@
#include <fdt_support.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index a313e8bf917b..f03b5541a97e 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define PHY_AUTONEGOTIATE_TIMEOUT 5000
diff --git a/drivers/net/phy/meson-gxl.c b/drivers/net/phy/meson-gxl.c
index e7a1008f14de..d65368a85e1e 100644
--- a/drivers/net/phy/meson-gxl.c
+++ b/drivers/net/phy/meson-gxl.c
@@ -12,6 +12,7 @@
#include <linux/bitops.h>
#include <dm.h>
#include <phy.h>
+#include <linux/errno.h>
/* This function is provided to cope with the possible failures of this phy
* during aneg process. When aneg fails, the PHY reports that aneg is done
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index f0032e8ce166..4c0b2f4af85e 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <micrel.h>
#include <phy.h>
+#include <linux/errno.h>
/*
* KSZ9021 - KSZ9031 common
diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index f8a4d0694406..f0d37d1b81fa 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -16,6 +16,7 @@
#include <time.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/* Microsemi PHY ID's */
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c
index 0a783e031298..927edb62a2ea 100644
--- a/drivers/net/phy/mv88e61xx.c
+++ b/drivers/net/phy/mv88e61xx.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <bitfield.h>
diff --git a/drivers/net/phy/ncsi.c b/drivers/net/phy/ncsi.c
index f112fa2bee97..9f68d14bf53f 100644
--- a/drivers/net/phy/ncsi.c
+++ b/drivers/net/phy/ncsi.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <phy.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/ncsi.h>
#include <net/ncsi-pkt.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 026ccc467f62..bda41672cc97 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -23,6 +23,7 @@
#include <linux/delay.h>
#include <linux/err.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c
index 86492e90c4df..1a7b24f0f683 100644
--- a/drivers/net/phy/xilinx_gmii2rgmii.c
+++ b/drivers/net/phy/xilinx_gmii2rgmii.c
@@ -11,6 +11,7 @@
#include <phy.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 39dbfdb7da88..84fb1f0fe2e6 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <phy.h>
#include <dm.h>
+#include <linux/errno.h>
#define MII_PHY_STATUS_SPD_MASK 0x0C00
#define MII_PHY_STATUS_FULLDUPLEX 0x1000
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index 5627b5d2d1a5..3be550e64d5b 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -18,6 +18,7 @@
#include <asm/global_data.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include "pic32_eth.h"
diff --git a/drivers/net/pic32_mdio.c b/drivers/net/pic32_mdio.c
index 963b9e7fc8fc..d30bceb4e53e 100644
--- a/drivers/net/pic32_mdio.c
+++ b/drivers/net/pic32_mdio.c
@@ -13,6 +13,7 @@
#include <wait_bit.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "pic32_eth.h"
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index b3f392cb8bf3..d9d376c09ec9 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -22,6 +22,7 @@
#include <asm/global_data.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <wait_bit.h>
#include <asm/io.h>
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c
index ba0f477bf23b..7c0bb2372d3c 100644
--- a/drivers/net/rtl8139.c
+++ b/drivers/net/rtl8139.c
@@ -82,6 +82,7 @@
#include <asm/u-boot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
diff --git a/drivers/net/rtl8169.c b/drivers/net/rtl8169.c
index c64888be4904..9cc5cc8acf9f 100644
--- a/drivers/net/rtl8169.c
+++ b/drivers/net/rtl8169.c
@@ -57,6 +57,7 @@
#include <pci.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/net/sandbox-raw-bus.c b/drivers/net/sandbox-raw-bus.c
index 6b111d47eea8..1509630b8350 100644
--- a/drivers/net/sandbox-raw-bus.c
+++ b/drivers/net/sandbox-raw-bus.c
@@ -11,6 +11,7 @@
#include <malloc.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int eth_raw_bus_post_bind(struct udevice *dev)
diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c
index 0551d0670b13..37eeaab4e82c 100644
--- a/drivers/net/sandbox.c
+++ b/drivers/net/sandbox.c
@@ -16,6 +16,7 @@
#include <asm/eth.h>
#include <asm/global_data.h>
#include <asm/test.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 196020c1b812..8b1aae24467b 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/string.h>
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 13ec074acacb..eb422f33b706 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -22,6 +22,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 0715cf81c740..8b94322ae746 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -36,6 +36,7 @@
#if CONFIG_IS_ENABLED(DM_GPIO)
#include <asm-generic/gpio.h>
#endif
+#include <linux/errno.h>
#include <linux/string.h>
#define MDIO_CMD_MII_BUSY BIT(0)
diff --git a/drivers/net/sunxi_emac.c b/drivers/net/sunxi_emac.c
index 009d0de48454..4470c741fa9e 100644
--- a/drivers/net/sunxi_emac.c
+++ b/drivers/net/sunxi_emac.c
@@ -19,6 +19,7 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* EMAC register */
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 571f1ebfc46c..14956af45804 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -23,6 +23,7 @@
#include <phy.h>
#include <power-domain.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/soc/ti/ti-udma.h>
diff --git a/drivers/net/ti/cpsw-common.c b/drivers/net/ti/cpsw-common.c
index 9ed0b56cc800..0b4adb1aa61d 100644
--- a/drivers/net/ti/cpsw-common.c
+++ b/drivers/net/ti/cpsw-common.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <cpsw.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/net/ti/cpsw_mdio.c b/drivers/net/ti/cpsw_mdio.c
index e47d5a2a5c55..2e70477756ac 100644
--- a/drivers/net/ti/cpsw_mdio.c
+++ b/drivers/net/ti/cpsw_mdio.c
@@ -14,6 +14,7 @@
#include <wait_bit.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
struct cpsw_mdio_regs {
u32 version;
diff --git a/drivers/net/ti/davinci_emac.c b/drivers/net/ti/davinci_emac.c
index 19041be320ef..272127903f50 100644
--- a/drivers/net/ti/davinci_emac.c
+++ b/drivers/net/ti/davinci_emac.c
@@ -35,6 +35,7 @@
#include <asm/arch/emac_defs.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "davinci_emac.h"
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index 96bbb219d5d6..a6062e336383 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -12,6 +12,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <dm.h>
diff --git a/drivers/net/vsc9953.c b/drivers/net/vsc9953.c
index 4ae225e879f4..36960bf12340 100644
--- a/drivers/net/vsc9953.c
+++ b/drivers/net/vsc9953.c
@@ -21,6 +21,7 @@
#include <ethsw.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
static struct vsc9953_info vsc9953_l2sw = {
.port[0] = VSC9953_PORT_INFO_INITIALIZER(0),
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index f6cf8df44fff..0da2385a92e9 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -20,6 +20,7 @@
#include <miiphy.h>
#include <wait_bit.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
index 9ce57335bc68..47a401cc96f1 100644
--- a/drivers/nvme/nvme.c
+++ b/drivers/nvme/nvme.c
@@ -18,6 +18,7 @@
#include <vsprintf.h>
#include <dm/device-internal.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "nvme.h"
diff --git a/drivers/nvme/nvme_show.c b/drivers/nvme/nvme_show.c
index 5a0bb4a223ee..2c3d7bcfa006 100644
--- a/drivers/nvme/nvme_show.c
+++ b/drivers/nvme/nvme_show.c
@@ -10,6 +10,7 @@
#include <memalign.h>
#include <nvme.h>
#include <stdio.h>
+#include <linux/errno.h>
#include "nvme.h"
static void print_optional_admin_cmd(u16 oacs, int devnum)
diff --git a/drivers/pch/pch-uclass.c b/drivers/pch/pch-uclass.c
index ad4906aa58b4..be9b89539f01 100644
--- a/drivers/pch/pch-uclass.c
+++ b/drivers/pch/pch-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <pch.h>
+#include <linux/errno.h>
int pch_get_spi_base(struct udevice *dev, ulong *sbasep)
{
diff --git a/drivers/pch/pch7.c b/drivers/pch/pch7.c
index 5fb35a19effe..8fc6388593f2 100644
--- a/drivers/pch/pch7.c
+++ b/drivers/pch/pch7.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <log.h>
#include <pch.h>
+#include <linux/errno.h>
#define GPIO_BASE 0x44
#define BIOS_CTRL 0xd8
diff --git a/drivers/pch/pch9.c b/drivers/pch/pch9.c
index 3bd011518b3a..f36b70c53ab7 100644
--- a/drivers/pch/pch9.c
+++ b/drivers/pch/pch9.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <log.h>
#include <pch.h>
+#include <linux/errno.h>
#define GPIO_BASE 0x48
#define IO_BASE 0x4c
diff --git a/drivers/pch/sandbox_pch.c b/drivers/pch/sandbox_pch.c
index 76f552527e37..c9317f1fda2c 100644
--- a/drivers/pch/sandbox_pch.c
+++ b/drivers/pch/sandbox_pch.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <pch.h>
+#include <linux/errno.h>
struct sandbox_pch_priv {
bool protect;
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 76234ea61c46..f2c2eb3870f3 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -33,6 +33,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/ioport.h>
/* PCIe core registers */
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index a52064341e0d..6a2242ab00cb 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <fdtdec.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <pci.h>
#include <dm/lists.h>
diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c
index e76abc1f84c1..d73c171846f8 100644
--- a/drivers/pci/pci-rcar-gen2.c
+++ b/drivers/pci/pci-rcar-gen2.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <pci.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* AHB-PCI Bridge PCI communication registers */
#define RCAR_AHBPCI_PCICOM_OFFSET 0x800
diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c
index 1f51854ccc6f..9a990a063245 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -23,6 +23,7 @@
#include <pci.h>
#include <wait_bit.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define PCIECAR 0x000010
#define PCIECCTLR 0x000018
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 32b6f0619e22..f3c243be31ae 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -22,6 +22,7 @@
#include <asm/fsp/fsp_support.h>
#endif
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "pci_internal.h"
diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c
index e7469d88d826..7ee0980bb759 100644
--- a/drivers/pci/pci_common.c
+++ b/drivers/pci/pci_common.c
@@ -16,6 +16,7 @@
#include <pci.h>
#include <stdio.h>
#include <asm/io.h>
+#include <linux/errno.h>
const char *pci_class_str(u8 class)
{
diff --git a/drivers/pci/pci_mpc85xx.c b/drivers/pci/pci_mpc85xx.c
index d7073a496940..d207f8e645ba 100644
--- a/drivers/pci/pci_mpc85xx.c
+++ b/drivers/pci/pci_mpc85xx.c
@@ -11,6 +11,7 @@
#include <pci.h>
#include <dm.h>
#include <asm/fsl_law.h>
+#include <linux/errno.h>
struct mpc85xx_pci_priv {
void __iomem *cfg_addr;
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 3a046df743d5..85ad27322f9c 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -41,6 +41,7 @@
#include <video_fb.h>
#include <acpi/acpi_s3.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/screen_info.h>
#include <linux/string.h>
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index 8745f286bd4a..4af0bf730347 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -9,6 +9,7 @@
#include <fdtdec.h>
#include <log.h>
#include <pci.h>
+#include <linux/errno.h>
#define FDT_DEV_INFO_CELLS 4
#define FDT_DEV_INFO_SIZE (FDT_DEV_INFO_CELLS * sizeof(u32))
diff --git a/drivers/pci/pci_sh7751.c b/drivers/pci/pci_sh7751.c
index 62d098d378f5..d5d1147f37db 100644
--- a/drivers/pci/pci_sh7751.c
+++ b/drivers/pci/pci_sh7751.c
@@ -14,6 +14,7 @@
#include <asm/pci.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/* Register addresses and such */
#define SH7751_BCR1 (vu_long *)0xFF800000
diff --git a/drivers/pci/pci_tegra.c b/drivers/pci/pci_tegra.c
index 8845dc451e55..5f8cde34bdf5 100644
--- a/drivers/pci/pci_tegra.c
+++ b/drivers/pci/pci_tegra.c
@@ -23,6 +23,7 @@
#include <reset.h>
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/pci/pcie_brcmstb.c b/drivers/pci/pcie_brcmstb.c
index 4fd4d4dfbd1e..10a19bdc9502 100644
--- a/drivers/pci/pcie_brcmstb.c
+++ b/drivers/pci/pcie_brcmstb.c
@@ -20,6 +20,7 @@
#include <pci.h>
#include <asm/io.h>
#include <linux/bitfield.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/iopoll.h>
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index b1f2750888cc..287736cd88c0 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -20,6 +20,7 @@
#include <asm/io.h>
#include <asm-generic/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index 3d86bdaaafb7..00b9a2418ab1 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -20,6 +20,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index e609ac58d40f..89a1490e2aca 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -18,6 +18,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "pcie_fsl.h"
#include <dm/device_compat.h>
diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index ab3d96efc533..928f624da9a7 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -22,6 +22,7 @@
#include <asm/io.h>
#include <dm.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <errno.h>
#include <asm/arch/sys_proto.h>
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index 2aedbdd0e568..bc9375326426 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -14,6 +14,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define RP_TX_REG0 0x2000
#define RP_TX_CNTRL 0x2004
diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c
index 0661834c1102..f6d4ae25cbe5 100644
--- a/drivers/pci/pcie_layerscape_ep.c
+++ b/drivers/pci/pcie_layerscape_ep.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <pci_ep.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/log2.h>
#include "pcie_layerscape.h"
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index 7f5d6f693c5c..2adc2aa251bb 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -20,6 +20,7 @@
#include <asm/arch/clock.h>
#endif
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include "pcie_layerscape.h"
#include "pcie_layerscape_fixup_common.h"
diff --git a/drivers/pci/pcie_layerscape_fixup_common.c b/drivers/pci/pcie_layerscape_fixup_common.c
index b1a7578ec435..05b5f76cf2c1 100644
--- a/drivers/pci/pcie_layerscape_fixup_common.c
+++ b/drivers/pci/pcie_layerscape_fixup_common.c
@@ -12,6 +12,7 @@
#include <asm/arch/clock.h>
#include <asm/arch/soc.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include "pcie_layerscape_fixup_common.h"
diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index 369124c2b8be..dcb991596b0e 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <malloc.h>
#include <dm.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include "pcie_layerscape_gen4.h"
diff --git a/drivers/pci/pcie_layerscape_gen4_fixup.c b/drivers/pci/pcie_layerscape_gen4_fixup.c
index ad329f7dd555..e16c0daa7858 100644
--- a/drivers/pci/pcie_layerscape_gen4_fixup.c
+++ b/drivers/pci/pcie_layerscape_gen4_fixup.c
@@ -21,6 +21,7 @@
#include <asm/arch/clock.h>
#endif
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include "pcie_layerscape_gen4.h"
#include "pcie_layerscape_fixup_common.h"
diff --git a/drivers/pci/pcie_layerscape_rc.c b/drivers/pci/pcie_layerscape_rc.c
index 397c9ea5e603..973a481c3b43 100644
--- a/drivers/pci/pcie_layerscape_rc.c
+++ b/drivers/pci/pcie_layerscape_rc.c
@@ -18,6 +18,7 @@
defined(CONFIG_ARM)
#include <asm/arch/clock.h>
#endif
+#include <linux/errno.h>
#include "pcie_layerscape.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index 8318b9ee7962..29d82739486e 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -19,6 +19,7 @@
#include <asm/io.h>
#include <dm/devres.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/list.h>
#include <linux/printk.h>
diff --git a/drivers/pci/pcie_phytium.c b/drivers/pci/pcie_phytium.c
index 926e7b33a867..3d91706ccf1c 100644
--- a/drivers/pci/pcie_phytium.c
+++ b/drivers/pci/pcie_phytium.c
@@ -12,6 +12,7 @@
#include <pci.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/**
diff --git a/drivers/pci/pcie_rockchip.c b/drivers/pci/pcie_rockchip.c
index 7d84be36be98..460d74a3088b 100644
--- a/drivers/pci/pcie_rockchip.c
+++ b/drivers/pci/pcie_rockchip.c
@@ -19,6 +19,7 @@
#include <generic-phy.h>
#include <pci.h>
#include <power-domain.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include <reset.h>
#include <syscon.h>
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index 600c69e20cfb..442a21c11152 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -10,6 +10,7 @@
#include <pci.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <asm/io.h>
diff --git a/drivers/pci_endpoint/pci_ep-uclass.c b/drivers/pci_endpoint/pci_ep-uclass.c
index 71b6bfa63828..aba38c3fe79a 100644
--- a/drivers/pci_endpoint/pci_ep-uclass.c
+++ b/drivers/pci_endpoint/pci_ep-uclass.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <errno.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <pci_ep.h>
diff --git a/drivers/pci_endpoint/pcie-cadence-ep.c b/drivers/pci_endpoint/pcie-cadence-ep.c
index e392fae338ad..44cce69a9aa1 100644
--- a/drivers/pci_endpoint/pcie-cadence-ep.c
+++ b/drivers/pci_endpoint/pcie-cadence-ep.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <pci_ep.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/log2.h>
#include "pcie-cadence.h"
diff --git a/drivers/pci_endpoint/sandbox-pci_ep.c b/drivers/pci_endpoint/sandbox-pci_ep.c
index d1e552a24662..59c330066d7f 100644
--- a/drivers/pci_endpoint/sandbox-pci_ep.c
+++ b/drivers/pci_endpoint/sandbox-pci_ep.c
@@ -9,6 +9,7 @@
#include <pci.h>
#include <pci_ep.h>
#include <asm/test.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 16c412b245d6..17c2de2caee0 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -27,6 +27,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define REG_ISCR 0x00
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index d29344ddb484..f6b7e4c1ca58 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -19,6 +19,7 @@
#include <dm/device.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/* USBH Setup register */
#define USBH_SETUP_REG 0x00
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index 8d28292726ce..13031b886d47 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <dm/device.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define USBH_SETUP_PORT1_EN BIT(0)
diff --git a/drivers/phy/bcm6358-usbh-phy.c b/drivers/phy/bcm6358-usbh-phy.c
index 501b97f3e213..aaa32315fa74 100644
--- a/drivers/phy/bcm6358-usbh-phy.c
+++ b/drivers/phy/bcm6358-usbh-phy.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <dm/device.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* USBH Swap Control register */
#define USBH_SWAP_REG 0x00
diff --git a/drivers/phy/bcm6368-usbh-phy.c b/drivers/phy/bcm6368-usbh-phy.c
index 99fdd33499ad..3bd4d6884193 100644
--- a/drivers/phy/bcm6368-usbh-phy.c
+++ b/drivers/phy/bcm6368-usbh-phy.c
@@ -19,6 +19,7 @@
#include <dm/device.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/* USBH PLL Control register */
#define USBH_PLL_REG 0x18
diff --git a/drivers/phy/keystone-usb-phy.c b/drivers/phy/keystone-usb-phy.c
index 27e1d35fc127..2806ee50ead4 100644
--- a/drivers/phy/keystone-usb-phy.c
+++ b/drivers/phy/keystone-usb-phy.c
@@ -13,6 +13,7 @@
#include <asm/arch/psc_defs.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/* USB PHY control register offsets */
diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index 734c79b78aa1..3a63900833e3 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -17,6 +17,7 @@
#include <generic-phy.h>
#include <regmap.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
#include <reset.h>
diff --git a/drivers/phy/meson-g12a-usb3-pcie.c b/drivers/phy/meson-g12a-usb3-pcie.c
index dc5dd62381f9..02feae1e2cd8 100644
--- a/drivers/phy/meson-g12a-usb3-pcie.c
+++ b/drivers/phy/meson-g12a-usb3-pcie.c
@@ -18,6 +18,7 @@
#include <bitfield.h>
#include <generic-phy.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/bitops.h>
diff --git a/drivers/phy/meson-gxbb-usb2.c b/drivers/phy/meson-gxbb-usb2.c
index 6ae06364a57c..8a06bc5aadb9 100644
--- a/drivers/phy/meson-gxbb-usb2.c
+++ b/drivers/phy/meson-gxbb-usb2.c
@@ -12,6 +12,7 @@
#include <clk.h>
#include <dm.h>
#include <generic-phy.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
#include <regmap.h>
diff --git a/drivers/phy/meson-gxl-usb2.c b/drivers/phy/meson-gxl-usb2.c
index 4bddd0eed9e2..ebfde063ee8b 100644
--- a/drivers/phy/meson-gxl-usb2.c
+++ b/drivers/phy/meson-gxl-usb2.c
@@ -16,6 +16,7 @@
#include <generic-phy.h>
#include <regmap.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
#include <clk.h>
diff --git a/drivers/phy/meson-gxl-usb3.c b/drivers/phy/meson-gxl-usb3.c
index 875fe6b44a6f..f566ef786638 100644
--- a/drivers/phy/meson-gxl-usb3.c
+++ b/drivers/phy/meson-gxl-usb3.c
@@ -16,6 +16,7 @@
#include <generic-phy.h>
#include <regmap.h>
#include <clk.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/usb/otg.h>
diff --git a/drivers/phy/msm8916-usbh-phy.c b/drivers/phy/msm8916-usbh-phy.c
index 4efaddd701cc..5883926f0877 100644
--- a/drivers/phy/msm8916-usbh-phy.c
+++ b/drivers/phy/msm8916-usbh-phy.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <generic-phy.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <usb/ehci-ci.h>
#include <usb/ulpi.h>
#include <asm/io.h>
diff --git a/drivers/phy/mt76x8-usb-phy.c b/drivers/phy/mt76x8-usb-phy.c
index 4c0818f6e8da..8c05e5e00df2 100644
--- a/drivers/phy/mt76x8-usb-phy.c
+++ b/drivers/phy/mt76x8-usb-phy.c
@@ -15,6 +15,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define OFS_U2_PHY_AC0 0x800
#define USBPLL_FBDIV_S 16
diff --git a/drivers/phy/omap-usb2-phy.c b/drivers/phy/omap-usb2-phy.c
index a460a0560c3a..df9ee1402917 100644
--- a/drivers/phy/omap-usb2-phy.c
+++ b/drivers/phy/omap-usb2-phy.c
@@ -17,6 +17,7 @@
#include <syscon.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT BIT(0)
#define OMAP_USB2_DISABLE_CHG_DET BIT(1)
diff --git a/drivers/phy/phy-da8xx-usb.c b/drivers/phy/phy-da8xx-usb.c
index ec87d3fea2d0..943c908fafaa 100644
--- a/drivers/phy/phy-da8xx-usb.c
+++ b/drivers/phy/phy-da8xx-usb.c
@@ -16,6 +16,7 @@
#include <asm/arch/da8xx-usb.h>
#include <asm/io.h>
#include <generic-phy.h>
+#include <linux/errno.h>
static int da8xx_usb_phy_power_on(struct phy *phy)
{
diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 1e65c24356e3..375a7575b779 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -16,6 +16,7 @@
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <dt-bindings/phy/phy.h>
diff --git a/drivers/phy/phy-rcar-gen2.c b/drivers/phy/phy-rcar-gen2.c
index 18da86e4bea5..db32d3b1a41c 100644
--- a/drivers/phy/phy-rcar-gen2.c
+++ b/drivers/phy/phy-rcar-gen2.c
@@ -19,6 +19,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#define USBHS_LPSTS 0x02
diff --git a/drivers/phy/phy-rcar-gen3.c b/drivers/phy/phy-rcar-gen3.c
index 4afdb791505a..fdd61efe4aca 100644
--- a/drivers/phy/phy-rcar-gen3.c
+++ b/drivers/phy/phy-rcar-gen3.c
@@ -17,6 +17,7 @@
#include <usb.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
diff --git a/drivers/phy/phy-stm32-usbphyc.c b/drivers/phy/phy-stm32-usbphyc.c
index d61a33422bc9..c66d185cc82d 100644
--- a/drivers/phy/phy-stm32-usbphyc.c
+++ b/drivers/phy/phy-stm32-usbphyc.c
@@ -17,6 +17,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
diff --git a/drivers/phy/phy-ti-am654.c b/drivers/phy/phy-ti-am654.c
index 6907c1afb395..fa22b7145405 100644
--- a/drivers/phy/phy-ti-am654.c
+++ b/drivers/phy/phy-ti-am654.c
@@ -23,6 +23,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define CMU_R07C 0x7c
#define CMU_MASTER_CDN_O BIT(24)
diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c
index af5c2c6497aa..bde8d029a441 100644
--- a/drivers/phy/phy-uclass.c
+++ b/drivers/phy/phy-uclass.c
@@ -9,6 +9,7 @@
#include <dm/devres.h>
#include <generic-phy.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
static inline struct phy_ops *phy_dev_ops(struct udevice *dev)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 75bd0fff5db3..93d3696b133e 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -17,6 +17,7 @@
#include <syscon.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <asm/arch-rockchip/clock.h>
#include <linux/string.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c
index c3bec8263f8e..fc7801224ace 100644
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
@@ -17,6 +17,7 @@
#include <syscon.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <asm/arch-rockchip/clock.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-typec.c b/drivers/phy/rockchip/phy-rockchip-typec.c
index 9a9a653c7efb..f018a95497da 100644
--- a/drivers/phy/rockchip/phy-rockchip-typec.c
+++ b/drivers/phy/rockchip/phy-rockchip-typec.c
@@ -19,6 +19,7 @@
#include <syscon.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <asm/arch-rockchip/clock.h>
#include <linux/string.h>
diff --git a/drivers/phy/sandbox-phy.c b/drivers/phy/sandbox-phy.c
index 84ff5c6275b5..5b867a6294e9 100644
--- a/drivers/phy/sandbox-phy.c
+++ b/drivers/phy/sandbox-phy.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <generic-phy.h>
+#include <linux/errno.h>
struct sandbox_phy_priv {
bool initialized;
diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c
index cfc24e76b249..03a4d61434e0 100644
--- a/drivers/phy/sti_usb_phy.c
+++ b/drivers/phy/sti_usb_phy.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <generic-phy.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <regmap.h>
#include <reset-uclass.h>
diff --git a/drivers/phy/ti-pipe3-phy.c b/drivers/phy/ti-pipe3-phy.c
index 2aa2a90c47c8..96a573add48f 100644
--- a/drivers/phy/ti-pipe3-phy.c
+++ b/drivers/phy/ti-pipe3-phy.c
@@ -17,6 +17,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/* PLLCTRL Registers */
diff --git a/drivers/pinctrl/aspeed/pinctrl_ast2500.c b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
index 05ef24864f2e..3f57aabea1d3 100644
--- a/drivers/pinctrl/aspeed/pinctrl_ast2500.c
+++ b/drivers/pinctrl/aspeed/pinctrl_ast2500.c
@@ -11,6 +11,7 @@
#include <asm/arch/pinctrl.h>
#include <asm/arch/scu_ast2500.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
/*
* This driver works with very simple configuration that has the same name
diff --git a/drivers/pinctrl/ath79/pinctrl_ar933x.c b/drivers/pinctrl/ath79/pinctrl_ar933x.c
index b3f9f6a01fd7..9f8ecf49ca46 100644
--- a/drivers/pinctrl/ath79/pinctrl_ar933x.c
+++ b/drivers/pinctrl/ath79/pinctrl_ar933x.c
@@ -10,6 +10,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <mach/ar71xx_regs.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/ath79/pinctrl_qca953x.c b/drivers/pinctrl/ath79/pinctrl_qca953x.c
index d27848c1ddd6..409ab0411739 100644
--- a/drivers/pinctrl/ath79/pinctrl_qca953x.c
+++ b/drivers/pinctrl/ath79/pinctrl_qca953x.c
@@ -10,6 +10,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <mach/ar71xx_regs.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
index 775a8a0a48ae..a7c928c71e39 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm283x.c
@@ -23,6 +23,7 @@
#include <asm/system.h>
#include <asm/io.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
struct bcm283x_pinctrl_priv {
u32 *base_reg;
diff --git a/drivers/pinctrl/broadcom/pinctrl-bcm6838.c b/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
index af10ead601f1..2f871b611fd5 100644
--- a/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
+++ b/drivers/pinctrl/broadcom/pinctrl-bcm6838.c
@@ -7,6 +7,7 @@
#include <vsprintf.h>
#include <dm/device_compat.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#define BCM6838_CMD_LOAD_MUX 0x21
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos.c b/drivers/pinctrl/exynos/pinctrl-exynos.c
index 6034794f6713..4a49519416c3 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "pinctrl-exynos.h"
diff --git a/drivers/pinctrl/exynos/pinctrl-exynos7420.c b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
index ff6d6c4143f5..7f1aeeda940e 100644
--- a/drivers/pinctrl/exynos/pinctrl-exynos7420.c
+++ b/drivers/pinctrl/exynos/pinctrl-exynos7420.c
@@ -13,6 +13,7 @@
#include <dm/root.h>
#include <fdtdec.h>
#include <asm/arch/pinmux.h>
+#include <linux/errno.h>
#include "pinctrl-exynos.h"
#define GPD1_OFFSET 0xc0
diff --git a/drivers/pinctrl/intel/pinctrl.c b/drivers/pinctrl/intel/pinctrl.c
index 933175d2b6c5..aa261a8bdc5d 100644
--- a/drivers/pinctrl/intel/pinctrl.c
+++ b/drivers/pinctrl/intel/pinctrl.c
@@ -32,6 +32,7 @@
#include <dm/device-internal.h>
#include <dt-bindings/gpio/gpio.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define GPIO_DW_SIZE(x) (sizeof(u32) * (x))
#define PAD_CFG_OFFSET(x, dw_num) ((x) + GPIO_DW_SIZE(dw_num))
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 6553dde45c2c..9227e5948c8f 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <asm-generic/gpio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-mtk-common.h"
diff --git a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
index 8246aa6890e1..0ed4b50b4589 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include "pinctrl-meson-axg.h"
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 8a3c292548e5..ad44da1e8bba 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -17,6 +17,7 @@
#include <fdt_support.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
diff --git a/drivers/pinctrl/mscc/mscc-common.c b/drivers/pinctrl/mscc/mscc-common.c
index 307ed1db8750..308f23b742df 100644
--- a/drivers/pinctrl/mscc/mscc-common.c
+++ b/drivers/pinctrl/mscc/mscc-common.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include "mscc-common.h"
diff --git a/drivers/pinctrl/mtmips/pinctrl-mt7628.c b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
index 1b51c2292717..2e043509cf84 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mt7628.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mt7628.c
@@ -10,6 +10,7 @@
#include <asm/global_data.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include "pinctrl-mtmips-common.h"
diff --git a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
index d5262438e17b..ad9bd0311cc7 100644
--- a/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
+++ b/drivers/pinctrl/mtmips/pinctrl-mtmips-common.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <malloc.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/string.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 1e8c345b8477..c52b8f5df337 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -36,6 +36,7 @@
#include <asm/system.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index c2b9c80586bc..e5820375393a 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <asm/arch-armada8k/soc-info.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-mvebu.h"
#define AP_EMMC_PHY_CTRL_REG 0x100
diff --git a/drivers/pinctrl/nexell/pinctrl-nexell.c b/drivers/pinctrl/nexell/pinctrl-nexell.c
index 4518c05d4685..da5ca6846cf2 100644
--- a/drivers/pinctrl/nexell/pinctrl-nexell.c
+++ b/drivers/pinctrl/nexell/pinctrl-nexell.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <errno.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include "pinctrl-nexell.h"
#include "pinctrl-s5pxx18.h"
diff --git a/drivers/pinctrl/nexell/pinctrl-s5pxx18.c b/drivers/pinctrl/nexell/pinctrl-s5pxx18.c
index 96a2ed38a056..5bb012b197fc 100644
--- a/drivers/pinctrl/nexell/pinctrl-s5pxx18.c
+++ b/drivers/pinctrl/nexell/pinctrl-s5pxx18.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <dm/root.h>
+#include <linux/errno.h>
#include "pinctrl-nexell.h"
#include "pinctrl-s5pxx18.h"
diff --git a/drivers/pinctrl/nxp/pinctrl-imx.c b/drivers/pinctrl/nxp/pinctrl-imx.c
index 1596dcc4747e..6db7313aecda 100644
--- a/drivers/pinctrl/nxp/pinctrl-imx.c
+++ b/drivers/pinctrl/nxp/pinctrl-imx.c
@@ -10,6 +10,7 @@
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/err.h>
#include <dm.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-mxs.c b/drivers/pinctrl/nxp/pinctrl-mxs.c
index 1067654e07e1..6cb6977812a6 100644
--- a/drivers/pinctrl/nxp/pinctrl-mxs.c
+++ b/drivers/pinctrl/nxp/pinctrl-mxs.c
@@ -9,6 +9,7 @@
#include <asm/global_data.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/err.h>
#include <dm.h>
diff --git a/drivers/pinctrl/nxp/pinctrl-scu.c b/drivers/pinctrl/nxp/pinctrl-scu.c
index 33bba8696f65..81f6eb56db39 100644
--- a/drivers/pinctrl/nxp/pinctrl-scu.c
+++ b/drivers/pinctrl/nxp/pinctrl-scu.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/arch/sci/sci.h>
#include <misc.h>
+#include <linux/errno.h>
#include "pinctrl-imx.h"
diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 4400e8088d89..49eb9078f150 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -12,6 +12,7 @@
#include <asm/global_data.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/err.h>
#include <mach/atmel_pio4.h>
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index 30f2bebbc78f..aa5d05d93e9c 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -13,6 +13,7 @@
#include <dm/pinctrl.h>
#include <asm/hardware.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/err.h>
#include <mach/at91_pio.h>
diff --git a/drivers/pinctrl/pinctrl-generic.c b/drivers/pinctrl/pinctrl-generic.c
index 7a2131d73ea1..45b3ad5d793c 100644
--- a/drivers/pinctrl/pinctrl-generic.c
+++ b/drivers/pinctrl/pinctrl-generic.c
@@ -8,6 +8,7 @@
#include <dm/device_compat.h>
#include <linux/compat.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 738f5bd63643..e4a05f5cce67 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <dm/device_compat.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <asm/io.h>
diff --git a/drivers/pinctrl/pinctrl-sti.c b/drivers/pinctrl/pinctrl-sti.c
index d446982c4e76..f6444181671d 100644
--- a/drivers/pinctrl/pinctrl-sti.c
+++ b/drivers/pinctrl/pinctrl-sti.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/printk.h>
diff --git a/drivers/pinctrl/pinctrl-stmfx.c b/drivers/pinctrl/pinctrl-stmfx.c
index dc063e087e82..bdf852c5f024 100644
--- a/drivers/pinctrl/pinctrl-stmfx.c
+++ b/drivers/pinctrl/pinctrl-stmfx.c
@@ -18,6 +18,7 @@
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index f821959137e0..817ea3f33232 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -8,6 +8,7 @@
#include <vsprintf.h>
#include <asm/global_data.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/err.h>
#include <linux/list.h>
diff --git a/drivers/pinctrl/pinctrl_pic32.c b/drivers/pinctrl/pinctrl_pic32.c
index 2eb80d92b341..6f2b34f2813e 100644
--- a/drivers/pinctrl/pinctrl_pic32.c
+++ b/drivers/pinctrl/pinctrl_pic32.c
@@ -13,6 +13,7 @@
#include <asm/io.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <mach/pic32.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c
index 998b90f803f3..faec68c3b2ef 100644
--- a/drivers/pinctrl/pinctrl_stm32.c
+++ b/drivers/pinctrl/pinctrl_stm32.c
@@ -13,6 +13,7 @@
#include <dm/pinctrl.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/printk.h>
diff --git a/drivers/pinctrl/renesas/pfc-r7s72100.c b/drivers/pinctrl/renesas/pfc-r7s72100.c
index 3d0caa9bb777..db4dea111040 100644
--- a/drivers/pinctrl/renesas/pfc-r7s72100.c
+++ b/drivers/pinctrl/renesas/pfc-r7s72100.c
@@ -12,6 +12,7 @@
#include <dm/lists.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/err.h>
diff --git a/drivers/pinctrl/renesas/pfc-r8a7790.c b/drivers/pinctrl/renesas/pfc-r8a7790.c
index 5e1502ed9696..30e9a117f8d0 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7790.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7790.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <errno.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc-r8a7791.c b/drivers/pinctrl/renesas/pfc-r8a7791.c
index d6095d6f674c..7ae6e4081c00 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7791.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7791.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <errno.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc-r8a7794.c b/drivers/pinctrl/renesas/pfc-r8a7794.c
index 91ac815f3da6..e59fd7656e01 100644
--- a/drivers/pinctrl/renesas/pfc-r8a7794.c
+++ b/drivers/pinctrl/renesas/pfc-r8a7794.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <errno.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc-r8a77970.c b/drivers/pinctrl/renesas/pfc-r8a77970.c
index 33ecd9339867..9996eb9298c5 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77970.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77970.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <errno.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc-r8a77980.c b/drivers/pinctrl/renesas/pfc-r8a77980.c
index 32efb4409c67..1b04250e527a 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77980.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77980.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <errno.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc-r8a77990.c b/drivers/pinctrl/renesas/pfc-r8a77990.c
index de22e49ebef4..e0bf1e4a3003 100644
--- a/drivers/pinctrl/renesas/pfc-r8a77990.c
+++ b/drivers/pinctrl/renesas/pfc-r8a77990.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include "sh_pfc.h"
diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c
index 6bf8fdff4781..1a7e686a4653 100644
--- a/drivers/pinctrl/renesas/pfc.c
+++ b/drivers/pinctrl/renesas/pfc.c
@@ -20,6 +20,7 @@
#include <dm/pinctrl.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-px30.c b/drivers/pinctrl/rockchip/pinctrl-px30.c
index 617721a6264c..bf1ee07c5fe0 100644
--- a/drivers/pinctrl/rockchip/pinctrl-px30.c
+++ b/drivers/pinctrl/rockchip/pinctrl-px30.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3036.c b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
index d49e3007cea2..11d4e784d02a 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3036.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3036.c
@@ -9,6 +9,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3128.c b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
index a175d6c07f1f..445dbf85d4f8 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3128.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3128.c
@@ -9,6 +9,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3188.c b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
index 8f197110e5e4..c4ff4e585312 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3188.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3188.c
@@ -9,6 +9,7 @@
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk322x.c b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
index 85bc0ef0f317..3e925837ee85 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk322x.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk322x.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3288.c b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
index 011ca286ec9e..e8cdca1bd280 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3288.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3288.c
@@ -9,6 +9,7 @@
#include <dm/pinctrl.h>
#include <regmap.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3308.c b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
index db2b10a6906a..088617de5db9 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3308.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3308.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3328.c b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
index 61eb9e0af0c9..342d67d06d91 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3328.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3328.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3368.c b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
index d8ccd4de5761..d66b62d91361 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3368.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3368.c
@@ -9,6 +9,7 @@
#include <dm/pinctrl.h>
#include <regmap.h>
#include <syscon.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rk3399.c b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
index d04c1afb090a..ec33f89bb829 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rk3399.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rk3399.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
index 16efb09b57f9..389d584078f8 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c
@@ -12,6 +12,7 @@
#include <syscon.h>
#include <fdtdec.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/drivers/pinctrl/rockchip/pinctrl-rv1108.c b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
index 22334329ed4c..c0fb962ef059 100644
--- a/drivers/pinctrl/rockchip/pinctrl-rv1108.c
+++ b/drivers/pinctrl/rockchip/pinctrl-rv1108.c
@@ -10,6 +10,7 @@
#include <regmap.h>
#include <syscon.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include "pinctrl-rockchip.h"
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index 631bb1f963b9..44a1571db4fb 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -9,6 +9,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/kernel.h>
diff --git a/drivers/power/acpi_pmc/acpi-pmc-uclass.c b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
index 98d217ca72f1..d713dc81f0a5 100644
--- a/drivers/power/acpi_pmc/acpi-pmc-uclass.c
+++ b/drivers/power/acpi_pmc/acpi-pmc-uclass.c
@@ -14,6 +14,7 @@
#include <asm/intel_pinctrl.h>
#endif
#include <asm/io.h>
+#include <linux/errno.h>
#include <power/acpi_pmc.h>
struct tco_regs {
diff --git a/drivers/power/acpi_pmc/pmc_emul.c b/drivers/power/acpi_pmc/pmc_emul.c
index 5ed6fcca262a..93ba847e2eca 100644
--- a/drivers/power/acpi_pmc/pmc_emul.c
+++ b/drivers/power/acpi_pmc/pmc_emul.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <pci.h>
#include <asm/test.h>
+#include <linux/errno.h>
#include <power/acpi_pmc.h>
/**
diff --git a/drivers/power/acpi_pmc/sandbox.c b/drivers/power/acpi_pmc/sandbox.c
index 48a6c663bd2f..667b7a5daf58 100644
--- a/drivers/power/acpi_pmc/sandbox.c
+++ b/drivers/power/acpi_pmc/sandbox.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <log.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <power/acpi_pmc.h>
#define GPIO_GPE_CFG 0x1050
diff --git a/drivers/power/axp152.c b/drivers/power/axp152.c
index d6e36125c12c..bf07232b08d1 100644
--- a/drivers/power/axp152.c
+++ b/drivers/power/axp152.c
@@ -7,6 +7,7 @@
#include <command.h>
#include <asm/arch/pmic_bus.h>
#include <axp_pmic.h>
+#include <linux/errno.h>
static u8 axp152_mvolt_to_target(int mvolt, int min, int max, int div)
{
diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index ade531940b93..878ccf459066 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -9,6 +9,7 @@
#include <asm/arch/pmic_bus.h>
#include <axp_pmic.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#ifdef CONFIG_AXP_ALDO3_VOLT_SLOPE_08
# define AXP209_VRC_SLOPE AXP209_VRC_LDO3_800uV_uS
diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c
index 3446fe7365d2..e0249796729e 100644
--- a/drivers/power/axp221.c
+++ b/drivers/power/axp221.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <asm/arch/pmic_bus.h>
#include <axp_pmic.h>
+#include <linux/errno.h>
static u8 axp221_mvolt_to_cfg(int mvolt, int min, int max, int div)
{
diff --git a/drivers/power/axp809.c b/drivers/power/axp809.c
index 6323492b66d1..fd85b7341457 100644
--- a/drivers/power/axp809.c
+++ b/drivers/power/axp809.c
@@ -16,6 +16,7 @@
#include <asm/arch/gpio.h>
#include <asm/arch/pmic_bus.h>
#include <axp_pmic.h>
+#include <linux/errno.h>
static u8 axp809_mvolt_to_cfg(int mvolt, int min, int max, int div)
{
diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index 0531707c8aa7..bfdc3d93caf0 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -16,6 +16,7 @@
#include <asm/arch/gpio.h>
#include <asm/arch/pmic_bus.h>
#include <axp_pmic.h>
+#include <linux/errno.h>
static u8 axp818_mvolt_to_cfg(int mvolt, int min, int max, int div)
{
diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c
index d1545004de31..c7350afe8e2b 100644
--- a/drivers/power/battery/bat_trats.c
+++ b/drivers/power/battery/bat_trats.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/battery.h>
#include <power/max8997_pmic.h>
diff --git a/drivers/power/battery/bat_trats2.c b/drivers/power/battery/bat_trats2.c
index abac714ff346..67fd7d8dbaee 100644
--- a/drivers/power/battery/bat_trats2.c
+++ b/drivers/power/battery/bat_trats2.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/battery.h>
#include <power/max77693_pmic.h>
diff --git a/drivers/power/domain/bcm6328-power-domain.c b/drivers/power/domain/bcm6328-power-domain.c
index a494bfa8c9de..21933018fc46 100644
--- a/drivers/power/domain/bcm6328-power-domain.c
+++ b/drivers/power/domain/bcm6328-power-domain.c
@@ -9,6 +9,7 @@
#include <power-domain-uclass.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define MAX_DOMAINS 32
diff --git a/drivers/power/domain/imx8-power-domain-legacy.c b/drivers/power/domain/imx8-power-domain-legacy.c
index 61ed7172f285..37167b334603 100644
--- a/drivers/power/domain/imx8-power-domain-legacy.c
+++ b/drivers/power/domain/imx8-power-domain-legacy.c
@@ -16,6 +16,7 @@
#include <dm/device.h>
#include <dm/uclass-internal.h>
#include <asm/arch/sci/sci.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/domain/imx8m-power-domain.c b/drivers/power/domain/imx8m-power-domain.c
index e50ded8b4c54..0d9501cf8acc 100644
--- a/drivers/power/domain/imx8m-power-domain.c
+++ b/drivers/power/domain/imx8m-power-domain.c
@@ -16,6 +16,7 @@
#include <dm/device.h>
#include <imx_sip.h>
#include <linux/arm-smccc.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/domain/meson-ee-pwrc.c b/drivers/power/domain/meson-ee-pwrc.c
index 8349a9c15822..7e131d325534 100644
--- a/drivers/power/domain/meson-ee-pwrc.c
+++ b/drivers/power/domain/meson-ee-pwrc.c
@@ -18,6 +18,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
/* AO Offsets */
diff --git a/drivers/power/domain/meson-gx-pwrc-vpu.c b/drivers/power/domain/meson-gx-pwrc-vpu.c
index a41b230448fc..78ac99e8d9be 100644
--- a/drivers/power/domain/meson-gx-pwrc-vpu.c
+++ b/drivers/power/domain/meson-gx-pwrc-vpu.c
@@ -18,6 +18,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
enum {
VPU_PWRC_COMPATIBLE_GX = 0,
diff --git a/drivers/power/domain/mtk-power-domain.c b/drivers/power/domain/mtk-power-domain.c
index fae4749012bd..d8467ac6c26f 100644
--- a/drivers/power/domain/mtk-power-domain.c
+++ b/drivers/power/domain/mtk-power-domain.c
@@ -15,6 +15,7 @@
#include <asm/processor.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <dt-bindings/power/mt7623-power.h>
diff --git a/drivers/power/domain/power-domain-uclass.c b/drivers/power/domain/power-domain-uclass.c
index c2c7c3bd507f..cf9227572f98 100644
--- a/drivers/power/domain/power-domain-uclass.c
+++ b/drivers/power/domain/power-domain-uclass.c
@@ -10,6 +10,7 @@
#include <power-domain.h>
#include <power-domain-uclass.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
static inline struct power_domain_ops *power_domain_dev_ops(struct udevice *dev)
{
diff --git a/drivers/power/domain/sandbox-power-domain.c b/drivers/power/domain/sandbox-power-domain.c
index 4d9a2006e660..373db61ba0f9 100644
--- a/drivers/power/domain/sandbox-power-domain.c
+++ b/drivers/power/domain/sandbox-power-domain.c
@@ -10,6 +10,7 @@
#include <power-domain-uclass.h>
#include <asm/io.h>
#include <asm/power-domain.h>
+#include <linux/errno.h>
#define SANDBOX_POWER_DOMAINS 3
diff --git a/drivers/power/domain/ti-sci-power-domain.c b/drivers/power/domain/ti-sci-power-domain.c
index 7ee121dfb26b..fd90f4926dbd 100644
--- a/drivers/power/domain/ti-sci-power-domain.c
+++ b/drivers/power/domain/ti-sci-power-domain.c
@@ -16,6 +16,7 @@
#include <power-domain-uclass.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <dt-bindings/soc/ti,sci_pm_domain.h>
diff --git a/drivers/power/exynos-tmu.c b/drivers/power/exynos-tmu.c
index bc8724882153..e714add99951 100644
--- a/drivers/power/exynos-tmu.c
+++ b/drivers/power/exynos-tmu.c
@@ -25,6 +25,7 @@
#include <tmu.h>
#include <asm/arch/tmu.h>
#include <asm/arch/power.h>
+#include <linux/errno.h>
#define TRIMINFO_RELOAD 1
#define CORE_EN 1
diff --git a/drivers/power/fuel_gauge/fg_max17042.c b/drivers/power/fuel_gauge/fg_max17042.c
index fde4bd195548..89a170aea609 100644
--- a/drivers/power/fuel_gauge/fg_max17042.c
+++ b/drivers/power/fuel_gauge/fg_max17042.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max17042_fg.h>
#include <i2c.h>
diff --git a/drivers/power/mfd/fg_max77693.c b/drivers/power/mfd/fg_max77693.c
index 4633f79bbe74..e96e59076286 100644
--- a/drivers/power/mfd/fg_max77693.c
+++ b/drivers/power/mfd/fg_max77693.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max77693_fg.h>
#include <i2c.h>
diff --git a/drivers/power/mfd/muic_max77693.c b/drivers/power/mfd/muic_max77693.c
index a021c04ccd4a..8f567c0ebe9d 100644
--- a/drivers/power/mfd/muic_max77693.c
+++ b/drivers/power/mfd/muic_max77693.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/power_chrg.h>
#include <power/max77693_muic.h>
diff --git a/drivers/power/mfd/pmic_max77693.c b/drivers/power/mfd/pmic_max77693.c
index 1955189c239d..64519d92fd1e 100644
--- a/drivers/power/mfd/pmic_max77693.c
+++ b/drivers/power/mfd/pmic_max77693.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max77693_pmic.h>
#include <i2c.h>
diff --git a/drivers/power/pmic/act8846.c b/drivers/power/pmic/act8846.c
index 8f0f5a6d96e5..7bd69ccc0b4f 100644
--- a/drivers/power/pmic/act8846.c
+++ b/drivers/power/pmic/act8846.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <fdtdec.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <power/act8846_pmic.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/as3722.c b/drivers/power/pmic/as3722.c
index c7dd9705d189..9152f657ff71 100644
--- a/drivers/power/pmic/as3722.c
+++ b/drivers/power/pmic/as3722.c
@@ -12,6 +12,7 @@
#include <i2c.h>
#include <log.h>
#include <dm/lists.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/as3722_gpio.c b/drivers/power/pmic/as3722_gpio.c
index 987fbdf9bc08..6b091a58b8b0 100644
--- a/drivers/power/pmic/as3722_gpio.c
+++ b/drivers/power/pmic/as3722_gpio.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/as3722.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/bd71837.c b/drivers/power/pmic/bd71837.c
index da9aa541979e..35d5018a3910 100644
--- a/drivers/power/pmic/bd71837.c
+++ b/drivers/power/pmic/bd71837.c
@@ -9,6 +9,7 @@
#include <i2c.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/da9063.c b/drivers/power/pmic/da9063.c
index ca95b82e6d01..b88e79f43143 100644
--- a/drivers/power/pmic/da9063.c
+++ b/drivers/power/pmic/da9063.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/fan53555.c b/drivers/power/pmic/fan53555.c
index c9b15d5b68f5..256c455aa29b 100644
--- a/drivers/power/pmic/fan53555.c
+++ b/drivers/power/pmic/fan53555.c
@@ -10,6 +10,7 @@
#include <dm/device_compat.h>
#include <dm/lists.h>
#include <i2c.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/fan53555.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/i2c_pmic_emul.c b/drivers/power/pmic/i2c_pmic_emul.c
index 4e72e966cfe8..1a044ea5b17d 100644
--- a/drivers/power/pmic/i2c_pmic_emul.c
+++ b/drivers/power/pmic/i2c_pmic_emul.c
@@ -10,6 +10,7 @@
#include <i2c.h>
#include <log.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/lp873x.c b/drivers/power/pmic/lp873x.c
index c307a9e3024a..4addcf9cbd13 100644
--- a/drivers/power/pmic/lp873x.c
+++ b/drivers/power/pmic/lp873x.c
@@ -11,6 +11,7 @@
#include <i2c.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/lp87565.c b/drivers/power/pmic/lp87565.c
index ba67a5efc023..c4bf1aff78cb 100644
--- a/drivers/power/pmic/lp87565.c
+++ b/drivers/power/pmic/lp87565.c
@@ -11,6 +11,7 @@
#include <i2c.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/max77686.c b/drivers/power/pmic/max77686.c
index 7e6f7d1966f1..2c83aab57a8d 100644
--- a/drivers/power/pmic/max77686.c
+++ b/drivers/power/pmic/max77686.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/mc34708.c b/drivers/power/pmic/mc34708.c
index d1661f01999a..df66038d68d9 100644
--- a/drivers/power/pmic/mc34708.c
+++ b/drivers/power/pmic/mc34708.c
@@ -12,6 +12,7 @@
#include <i2c.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <power/pmic.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/pmic/muic_max8997.c b/drivers/power/pmic/muic_max8997.c
index 6184b70e2fd1..6994eb96d7ca 100644
--- a/drivers/power/pmic/muic_max8997.c
+++ b/drivers/power/pmic/muic_max8997.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/power_chrg.h>
#include <power/max8997_muic.h>
diff --git a/drivers/power/pmic/palmas.c b/drivers/power/pmic/palmas.c
index 88f88e0014ca..0b4366a27153 100644
--- a/drivers/power/pmic/palmas.c
+++ b/drivers/power/pmic/palmas.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c
index b61dac193f2d..6e80c5cdc4f1 100644
--- a/drivers/power/pmic/pca9450.c
+++ b/drivers/power/pmic/pca9450.c
@@ -10,6 +10,7 @@
#include <i2c.h>
#include <log.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/pfuze100.c b/drivers/power/pmic/pfuze100.c
index 15420acb4725..0955d46fc78e 100644
--- a/drivers/power/pmic/pfuze100.c
+++ b/drivers/power/pmic/pfuze100.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/pm8916.c b/drivers/power/pmic/pm8916.c
index ddc30604cff8..c47c89754d10 100644
--- a/drivers/power/pmic/pm8916.c
+++ b/drivers/power/pmic/pm8916.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
#include <dm.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <spmi/spmi.h>
diff --git a/drivers/power/pmic/pmic-uclass.c b/drivers/power/pmic/pmic-uclass.c
index a83131e17365..257e514b10b9 100644
--- a/drivers/power/pmic/pmic-uclass.c
+++ b/drivers/power/pmic/pmic-uclass.c
@@ -13,6 +13,7 @@
#include <dm/lists.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/pmic.h>
#include <linux/ctype.h>
diff --git a/drivers/power/pmic/pmic_hi6553.c b/drivers/power/pmic/pmic_hi6553.c
index 4442f3501f7b..b724fe4a69e6 100644
--- a/drivers/power/pmic/pmic_hi6553.c
+++ b/drivers/power/pmic/pmic_hi6553.c
@@ -7,6 +7,7 @@
#include <asm/io.h>
#include <common.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max8997_muic.h>
#include <power/hi6553_pmic.h>
diff --git a/drivers/power/pmic/pmic_ltc3676.c b/drivers/power/pmic/pmic_ltc3676.c
index 5dc0079c2af2..022d782e83d9 100644
--- a/drivers/power/pmic/pmic_ltc3676.c
+++ b/drivers/power/pmic/pmic_ltc3676.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/ltc3676_pmic.h>
diff --git a/drivers/power/pmic/pmic_max77696.c b/drivers/power/pmic/pmic_max77696.c
index de36b4621802..b29fa6dedfd4 100644
--- a/drivers/power/pmic/pmic_max77696.c
+++ b/drivers/power/pmic/pmic_max77696.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max77696_pmic.h>
diff --git a/drivers/power/pmic/pmic_max8997.c b/drivers/power/pmic/pmic_max8997.c
index bf8a015dc8cd..6c4958208c83 100644
--- a/drivers/power/pmic/pmic_max8997.c
+++ b/drivers/power/pmic/pmic_max8997.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max8997_pmic.h>
#include <i2c.h>
diff --git a/drivers/power/pmic/pmic_max8998.c b/drivers/power/pmic/pmic_max8998.c
index 8e2c4b8e02e3..c4cc8485ea8b 100644
--- a/drivers/power/pmic/pmic_max8998.c
+++ b/drivers/power/pmic/pmic_max8998.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/max8998_pmic.h>
#include <errno.h>
diff --git a/drivers/power/pmic/pmic_mc34vr500.c b/drivers/power/pmic/pmic_mc34vr500.c
index 9a3f748538ce..a28c3e9b2b11 100644
--- a/drivers/power/pmic/pmic_mc34vr500.c
+++ b/drivers/power/pmic/pmic_mc34vr500.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/mc34vr500_pmic.h>
diff --git a/drivers/power/pmic/pmic_pca9450.c b/drivers/power/pmic/pmic_pca9450.c
index 651f3a0c2742..323b81a66ca8 100644
--- a/drivers/power/pmic/pmic_pca9450.c
+++ b/drivers/power/pmic/pmic_pca9450.c
@@ -7,6 +7,7 @@
#include <errno.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pca9450.h>
diff --git a/drivers/power/pmic/pmic_pfuze100.c b/drivers/power/pmic/pmic_pfuze100.c
index 25a4aa0ed624..1beb42393c3f 100644
--- a/drivers/power/pmic/pmic_pfuze100.c
+++ b/drivers/power/pmic/pmic_pfuze100.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pfuze100_pmic.h>
diff --git a/drivers/power/pmic/pmic_pfuze3000.c b/drivers/power/pmic/pmic_pfuze3000.c
index 82d932cef1bf..7d426801b7de 100644
--- a/drivers/power/pmic/pmic_pfuze3000.c
+++ b/drivers/power/pmic/pmic_pfuze3000.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/pfuze3000_pmic.h>
diff --git a/drivers/power/pmic/pmic_tps65910_dm.c b/drivers/power/pmic/pmic_tps65910_dm.c
index 8ead1db802a2..422fb72c38eb 100644
--- a/drivers/power/pmic/pmic_tps65910_dm.c
+++ b/drivers/power/pmic/pmic_tps65910_dm.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index 71027e8da35b..991a94b41ab4 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
diff --git a/drivers/power/pmic/s2mps11.c b/drivers/power/pmic/s2mps11.c
index 5ff4f2052113..93c3507e8fac 100644
--- a/drivers/power/pmic/s2mps11.c
+++ b/drivers/power/pmic/s2mps11.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/s2mps11.h>
diff --git a/drivers/power/pmic/s5m8767.c b/drivers/power/pmic/s5m8767.c
index eea072ae824f..f1fa67406602 100644
--- a/drivers/power/pmic/s5m8767.c
+++ b/drivers/power/pmic/s5m8767.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/sandbox.c b/drivers/power/pmic/sandbox.c
index 398b72341bd1..813294c7f36f 100644
--- a/drivers/power/pmic/sandbox.c
+++ b/drivers/power/pmic/sandbox.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/pmic/stpmic1.c b/drivers/power/pmic/stpmic1.c
index 2c85410b1bf5..c7cd596da088 100644
--- a/drivers/power/pmic/stpmic1.c
+++ b/drivers/power/pmic/stpmic1.c
@@ -13,6 +13,7 @@
#include <dm/device.h>
#include <dm/device_compat.h>
#include <dm/lists.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/stpmic1.h>
diff --git a/drivers/power/pmic/tps65090.c b/drivers/power/pmic/tps65090.c
index 2a04d5948a5e..8c8ffbe2046f 100644
--- a/drivers/power/pmic/tps65090.c
+++ b/drivers/power/pmic/tps65090.c
@@ -10,6 +10,7 @@
#include <fdtdec.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/tps65090.h>
diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c
index fd350b24df28..a05023516ba5 100644
--- a/drivers/power/pmic/tps65941.c
+++ b/drivers/power/pmic/tps65941.c
@@ -11,6 +11,7 @@
#include <i2c.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/power_core.c b/drivers/power/power_core.c
index 35be5d907325..bc8a2b6bf8c1 100644
--- a/drivers/power/power_core.c
+++ b/drivers/power/power_core.c
@@ -15,6 +15,7 @@
#include <malloc.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/list.h>
diff --git a/drivers/power/power_dialog.c b/drivers/power/power_dialog.c
index 62e460bd5812..267ef50203f0 100644
--- a/drivers/power/power_dialog.c
+++ b/drivers/power/power_dialog.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <dialog_pmic.h>
#include <errno.h>
diff --git a/drivers/power/power_fsl.c b/drivers/power/power_fsl.c
index 2324815a5bdf..e26b60c6abcb 100644
--- a/drivers/power/power_fsl.c
+++ b/drivers/power/power_fsl.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <spi.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <fsl_pmic.h>
#include <errno.h>
diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index ebf078fe7140..263d0f3eaa62 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <power/pmic.h>
diff --git a/drivers/power/power_spi.c b/drivers/power/power_spi.c
index 1eaf9773ef8b..adf317e849a1 100644
--- a/drivers/power/power_spi.c
+++ b/drivers/power/power_spi.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include <power/pmic.h>
#include <spi.h>
diff --git a/drivers/power/regulator/act8846.c b/drivers/power/regulator/act8846.c
index 1783813a158d..0140231214a8 100644
--- a/drivers/power/regulator/act8846.c
+++ b/drivers/power/regulator/act8846.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <linux/errno.h>
#include <power/act8846_pmic.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/as3722_regulator.c b/drivers/power/regulator/as3722_regulator.c
index 0fee9bf00b6b..da25e58dec9f 100644
--- a/drivers/power/regulator/as3722_regulator.c
+++ b/drivers/power/regulator/as3722_regulator.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <errno.h>
#include <log.h>
+#include <linux/errno.h>
#include <power/as3722.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/bd71837.c b/drivers/power/regulator/bd71837.c
index 8c7f71be3e81..7ebba28a9927 100644
--- a/drivers/power/regulator/bd71837.c
+++ b/drivers/power/regulator/bd71837.c
@@ -9,6 +9,7 @@
#include <dm.h>
#include <log.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <power/bd71837.h>
diff --git a/drivers/power/regulator/da9063.c b/drivers/power/regulator/da9063.c
index 3e5d2596561f..ae069e602a31 100644
--- a/drivers/power/regulator/da9063.c
+++ b/drivers/power/regulator/da9063.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/da9063_pmic.h>
#include <power/pmic.h>
diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c
index a7fa01f787b1..fa8dc96f9da0 100644
--- a/drivers/power/regulator/fan53555.c
+++ b/drivers/power/regulator/fan53555.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <asm/gpio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/fan53555.h>
#include <power/pmic.h>
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index 56d84a90e5ec..629b61c766c6 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <log.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include "regulator_common.h"
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index 587df32c408b..05b12f4fe8c8 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -11,6 +11,7 @@
#include <i2c.h>
#include <log.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index 9ec23b6f5484..c47a4a9a7786 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/lp873x.h>
diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index 5b14c07b4ce7..2275a7367b0a 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -13,6 +13,7 @@
#include <i2c.h>
#include <log.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/lp87565.h>
diff --git a/drivers/power/regulator/max77686.c b/drivers/power/regulator/max77686.c
index 4d3ac980fc87..bcbe257f53fd 100644
--- a/drivers/power/regulator/max77686.c
+++ b/drivers/power/regulator/max77686.c
@@ -11,6 +11,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/palmas_regulator.c b/drivers/power/regulator/palmas_regulator.c
index adbc921e53a2..9f1ae1d246fd 100644
--- a/drivers/power/regulator/palmas_regulator.c
+++ b/drivers/power/regulator/palmas_regulator.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/pbias_regulator.c b/drivers/power/regulator/pbias_regulator.c
index 0bc8562b317c..26598b7129fa 100644
--- a/drivers/power/regulator/pbias_regulator.c
+++ b/drivers/power/regulator/pbias_regulator.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/pfuze100.c b/drivers/power/regulator/pfuze100.c
index 15f34b915f20..b874d58961cc 100644
--- a/drivers/power/regulator/pfuze100.c
+++ b/drivers/power/regulator/pfuze100.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <i2c.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index 2031d882953a..451ce106e4f9 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -15,6 +15,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <power/regulator.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 2f095d57e8e4..704a33d057a4 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <dm/uclass-internal.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 46497e0fde28..575b631597e1 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include "regulator_common.h"
diff --git a/drivers/power/regulator/rk8xx.c b/drivers/power/regulator/rk8xx.c
index a08e2151f93b..03e6ffcc978e 100644
--- a/drivers/power/regulator/rk8xx.c
+++ b/drivers/power/regulator/rk8xx.c
@@ -12,6 +12,7 @@
#include <dm.h>
#include <errno.h>
#include <log.h>
+#include <linux/errno.h>
#include <power/rk8xx_pmic.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/s2mps11_regulator.c b/drivers/power/regulator/s2mps11_regulator.c
index 295e1d2c62a6..ffbc06d9b794 100644
--- a/drivers/power/regulator/s2mps11_regulator.c
+++ b/drivers/power/regulator/s2mps11_regulator.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <i2c.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/s5m8767.c b/drivers/power/regulator/s5m8767.c
index b46a2a486ec3..7e1d08b8d11d 100644
--- a/drivers/power/regulator/s5m8767.c
+++ b/drivers/power/regulator/s5m8767.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/s5m8767.h>
diff --git a/drivers/power/regulator/sandbox.c b/drivers/power/regulator/sandbox.c
index 18596770b370..88c6f3ca3b24 100644
--- a/drivers/power/regulator/sandbox.c
+++ b/drivers/power/regulator/sandbox.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/stm32-vrefbuf.c b/drivers/power/regulator/stm32-vrefbuf.c
index 92136961c2ed..73cae7c6d8e0 100644
--- a/drivers/power/regulator/stm32-vrefbuf.c
+++ b/drivers/power/regulator/stm32-vrefbuf.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/stpmic1.c b/drivers/power/regulator/stpmic1.c
index 3e342f48086b..38cd18b0d4f0 100644
--- a/drivers/power/regulator/stpmic1.c
+++ b/drivers/power/regulator/stpmic1.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <errno.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/stpmic1.h>
diff --git a/drivers/power/regulator/tps62360_regulator.c b/drivers/power/regulator/tps62360_regulator.c
index ce54495490d1..5d7d3d43ed51 100644
--- a/drivers/power/regulator/tps62360_regulator.c
+++ b/drivers/power/regulator/tps62360_regulator.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <i2c.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#define TPS62360_REG_SET0 0
diff --git a/drivers/power/regulator/tps65090_regulator.c b/drivers/power/regulator/tps65090_regulator.c
index 74403a5a8944..95db2d60e504 100644
--- a/drivers/power/regulator/tps65090_regulator.c
+++ b/drivers/power/regulator/tps65090_regulator.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/tps65090.h>
diff --git a/drivers/power/regulator/tps65910_regulator.c b/drivers/power/regulator/tps65910_regulator.c
index 2c0dd0604b32..a2bd9c6c18ab 100644
--- a/drivers/power/regulator/tps65910_regulator.c
+++ b/drivers/power/regulator/tps65910_regulator.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/pmic.h>
#include <power/regulator.h>
diff --git a/drivers/power/regulator/tps65941_regulator.c b/drivers/power/regulator/tps65941_regulator.c
index c25ca3181004..535d88a7e19c 100644
--- a/drivers/power/regulator/tps65941_regulator.c
+++ b/drivers/power/regulator/tps65941_regulator.c
@@ -14,6 +14,7 @@
#include <log.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/tps65941.h>
diff --git a/drivers/power/tps6586x.c b/drivers/power/tps6586x.c
index 49b28a5e6bf6..acf0d5cfa4f4 100644
--- a/drivers/power/tps6586x.c
+++ b/drivers/power/tps6586x.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <i2c.h>
#include <linux/delay.h>
+#include <linux/errno.h>
static struct udevice *tps6586x_dev;
diff --git a/drivers/pwm/exynos_pwm.c b/drivers/pwm/exynos_pwm.c
index e55fcceafd71..5417e95ef7b1 100644
--- a/drivers/pwm/exynos_pwm.c
+++ b/drivers/pwm/exynos_pwm.c
@@ -11,6 +11,7 @@
#include <asm/arch/clk.h>
#include <asm/arch/clock.h>
#include <asm/arch/pwm.h>
+#include <linux/errno.h>
struct exynos_pwm_priv {
struct s5p_timer *regs;
diff --git a/drivers/pwm/pwm-mtk.c b/drivers/pwm/pwm-mtk.c
index c6973dad3a80..1459e7fa6738 100644
--- a/drivers/pwm/pwm-mtk.c
+++ b/drivers/pwm/pwm-mtk.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
/* PWM registers and bits definitions */
diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c
index 0b819cfbf788..866b243c0046 100644
--- a/drivers/pwm/pwm-sifive.c
+++ b/drivers/pwm/pwm-sifive.c
@@ -19,6 +19,7 @@
#include <pwm.h>
#include <regmap.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/log2.h>
#include <linux/bitfield.h>
diff --git a/drivers/pwm/pwm-uclass.c b/drivers/pwm/pwm-uclass.c
index 027181c64652..ab2df85e3ea2 100644
--- a/drivers/pwm/pwm-uclass.c
+++ b/drivers/pwm/pwm-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <pwm.h>
+#include <linux/errno.h>
int pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
{
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 0fb894804b57..04c16ff36d8e 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch-rockchip/pwm.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <power/regulator.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pwm/sandbox_pwm.c b/drivers/pwm/sandbox_pwm.c
index 28988187e039..0e267064b146 100644
--- a/drivers/pwm/sandbox_pwm.c
+++ b/drivers/pwm/sandbox_pwm.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <pwm.h>
#include <asm/test.h>
+#include <linux/errno.h>
enum {
NUM_CHANNELS = 3,
diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index ffcf60c55842..d3e714a6ab3c 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/arch/pwm.h>
#include <asm/arch/gpio.h>
+#include <linux/errno.h>
#include <power/regulator.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/pwm/tegra_pwm.c b/drivers/pwm/tegra_pwm.c
index 5e98d0fc2c7b..2cfb3787dc4d 100644
--- a/drivers/pwm/tegra_pwm.c
+++ b/drivers/pwm/tegra_pwm.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <asm/arch/clock.h>
#include <asm/arch/pwm.h>
+#include <linux/errno.h>
struct tegra_pwm_priv {
struct pwm_ctlr *regs;
diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c
index 8f953e79afd7..0746d677a4c3 100644
--- a/drivers/ram/bmips_ram.c
+++ b/drivers/ram/bmips_ram.c
@@ -13,6 +13,7 @@
#include <init.h>
#include <ram.h>
#include <asm/io.h>
+#include <linux/errno.h>
#define SDRAM_CFG_REG 0x0
#define SDRAM_CFG_COL_SHIFT 4
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index 3726a39335ef..bfdf666cc435 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -15,6 +15,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index 21d5426f5c8a..1f282ec75104 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -16,6 +16,7 @@
#include <power-domain.h>
#include <asm/arch/sys_proto.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include "k3-am654-ddrss.h"
diff --git a/drivers/ram/k3-j721e/k3-j721e-ddrss.c b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
index 25cdf83922f9..bccf5a65c92a 100644
--- a/drivers/ram/k3-j721e/k3-j721e-ddrss.c
+++ b/drivers/ram/k3-j721e/k3-j721e-ddrss.c
@@ -16,6 +16,7 @@
#include <power-domain.h>
#include <wait_bit.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include "lpddr4_obj_if.h"
#include "lpddr4_if.h"
diff --git a/drivers/ram/k3-j721e/lpddr4_sanity.h b/drivers/ram/k3-j721e/lpddr4_sanity.h
index 0f0fc2767c11..84050d72c4a3 100644
--- a/drivers/ram/k3-j721e/lpddr4_sanity.h
+++ b/drivers/ram/k3-j721e/lpddr4_sanity.h
@@ -21,6 +21,7 @@
#define LPDDR4_SANITY_H
#include <errno.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include "lpddr4_if.h"
diff --git a/drivers/ram/mediatek/ddr3-mt7629.c b/drivers/ram/mediatek/ddr3-mt7629.c
index b3a68cb07879..a2f72b704706 100644
--- a/drivers/ram/mediatek/ddr3-mt7629.c
+++ b/drivers/ram/mediatek/ddr3-mt7629.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/* EMI */
#define EMI_CONA 0x000
diff --git a/drivers/ram/mpc83xx_sdram.c b/drivers/ram/mpc83xx_sdram.c
index f37812d4c5d9..568867e8aa36 100644
--- a/drivers/ram/mpc83xx_sdram.c
+++ b/drivers/ram/mpc83xx_sdram.c
@@ -13,6 +13,7 @@
#include <asm/global_data.h>
#include <asm/ppc.h>
#include <dt-bindings/memory/mpc83xx-sdram.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/ram-uclass.c b/drivers/ram/ram-uclass.c
index f4d387fed1ef..7f3b6276f9f4 100644
--- a/drivers/ram/ram-uclass.c
+++ b/drivers/ram/ram-uclass.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <dm/lists.h>
#include <dm/root.h>
+#include <linux/errno.h>
int ram_get_info(struct udevice *dev, struct ram_info *info)
{
diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 8795ad1c32cd..1c3d95d7d632 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -25,6 +25,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct dram_info {
diff --git a/drivers/ram/rockchip/sdram_rk3188.c b/drivers/ram/rockchip/sdram_rk3188.c
index a2c36fa3cad4..a8db0e341222 100644
--- a/drivers/ram/rockchip/sdram_rk3188.c
+++ b/drivers/ram/rockchip/sdram_rk3188.c
@@ -28,6 +28,7 @@
#include <asm/arch-rockchip/sdram_rk3288.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct chan_info {
diff --git a/drivers/ram/rockchip/sdram_rk322x.c b/drivers/ram/rockchip/sdram_rk322x.c
index 51d87e6d29fd..92fe235be5a5 100644
--- a/drivers/ram/rockchip/sdram_rk322x.c
+++ b/drivers/ram/rockchip/sdram_rk322x.c
@@ -24,6 +24,7 @@
#include <asm/types.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c
index 1063fde3e877..4f48da4b4e58 100644
--- a/drivers/ram/rockchip/sdram_rk3288.c
+++ b/drivers/ram/rockchip/sdram_rk3288.c
@@ -28,6 +28,7 @@
#include <asm/arch-rockchip/sdram_rk3288.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/regulator.h>
#include <power/rk8xx_pmic.h>
diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c
index 935bfc97b147..45c20b7cfa3b 100644
--- a/drivers/ram/rockchip/sdram_rk3399.c
+++ b/drivers/ram/rockchip/sdram_rk3399.c
@@ -26,6 +26,7 @@
#include <linux/delay.h>
#include <linux/err.h>
#include <time.h>
+#include <linux/errno.h>
#define PRESET_SGRF_HOLD(n) ((0x1 << (6 + 16)) | ((n) << 6))
#define PRESET_GPIO0_HOLD(n) ((0x1 << (7 + 16)) | ((n) << 7))
diff --git a/drivers/ram/sifive/fu540_ddr.c b/drivers/ram/sifive/fu540_ddr.c
index eff6da55ad26..0270dd088dbc 100644
--- a/drivers/ram/sifive/fu540_ddr.c
+++ b/drivers/ram/sifive/fu540_ddr.c
@@ -19,6 +19,7 @@
#include <clk.h>
#include <wait_bit.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define DENALI_CTL_0 0
#define DENALI_CTL_21 21
diff --git a/drivers/ram/stm32_sdram.c b/drivers/ram/stm32_sdram.c
index 3f61addac31c..04fb730525d3 100644
--- a/drivers/ram/stm32_sdram.c
+++ b/drivers/ram/stm32_sdram.c
@@ -15,6 +15,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_ddr.c b/drivers/ram/stm32mp1/stm32mp1_ddr.c
index 1f39ce5ea497..6742aa6a9869 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ddr.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ddr.c
@@ -15,6 +15,7 @@
#include <asm/arch/ddr.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/ram/stm32mp1/stm32mp1_ram.c b/drivers/ram/stm32mp1/stm32mp1_ram.c
index a24788957dfb..347ff769e405 100644
--- a/drivers/ram/stm32mp1/stm32mp1_ram.c
+++ b/drivers/ram/stm32mp1/stm32mp1_ram.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <syscon.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "stm32mp1_ddr.h"
diff --git a/drivers/remoteproc/k3_system_controller.c b/drivers/remoteproc/k3_system_controller.c
index 44271c5baf8e..aa993b973929 100644
--- a/drivers/remoteproc/k3_system_controller.c
+++ b/drivers/remoteproc/k3_system_controller.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <mailbox.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <linux/soc/ti/k3-sec-proxy.h>
#include <linux/string.h>
diff --git a/drivers/remoteproc/rproc-elf-loader.c b/drivers/remoteproc/rproc-elf-loader.c
index 45331107353b..d4064a311b52 100644
--- a/drivers/remoteproc/rproc-elf-loader.c
+++ b/drivers/remoteproc/rproc-elf-loader.c
@@ -11,6 +11,7 @@
#include <asm/cache.h>
#include <dm/device_compat.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/remoteproc/rproc-uclass.c b/drivers/remoteproc/rproc-uclass.c
index 1ed194aa034d..950dc3f9b11c 100644
--- a/drivers/remoteproc/rproc-uclass.c
+++ b/drivers/remoteproc/rproc-uclass.c
@@ -16,6 +16,7 @@
#include <dm.h>
#include <dm/uclass.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/remoteproc/sandbox_testproc.c b/drivers/remoteproc/sandbox_testproc.c
index 4317af78d29f..e3759eed95ca 100644
--- a/drivers/remoteproc/sandbox_testproc.c
+++ b/drivers/remoteproc/sandbox_testproc.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <remoteproc.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/**
diff --git a/drivers/remoteproc/stm32_copro.c b/drivers/remoteproc/stm32_copro.c
index e09d2b9a6460..eb437464ae16 100644
--- a/drivers/remoteproc/stm32_copro.c
+++ b/drivers/remoteproc/stm32_copro.c
@@ -15,6 +15,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#define RCC_GCR_HOLD_BOOT 0
diff --git a/drivers/remoteproc/ti_k3_arm64_rproc.c b/drivers/remoteproc/ti_k3_arm64_rproc.c
index 28c6ddb69191..20b02f691e35 100644
--- a/drivers/remoteproc/ti_k3_arm64_rproc.c
+++ b/drivers/remoteproc/ti_k3_arm64_rproc.c
@@ -17,6 +17,7 @@
#include <power-domain.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include "ti_sci_proc.h"
diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c b/drivers/remoteproc/ti_k3_dsp_rproc.c
index cbebfacb48c1..722b9432491a 100644
--- a/drivers/remoteproc/ti_k3_dsp_rproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
@@ -19,6 +19,7 @@
#include <power-domain.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <linux/string.h>
diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c b/drivers/remoteproc/ti_k3_r5f_rproc.c
index 964a75309adb..db437c1a6861 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <linux/string.h>
diff --git a/drivers/remoteproc/ti_power_proc.c b/drivers/remoteproc/ti_power_proc.c
index 0d78ec439d0e..84e621ca9ee0 100644
--- a/drivers/remoteproc/ti_power_proc.c
+++ b/drivers/remoteproc/ti_power_proc.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <remoteproc.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <mach/psc_defs.h>
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index 156703e08430..69793967c420 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -15,6 +15,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define MAX_RESETS 32
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c
index 139bc5d73e0b..2012421e4173 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -11,6 +11,7 @@
#include <dt-bindings/reset/ti-syscon.h>
#include <reset-uclass.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
struct hisi_reset_priv {
void __iomem *base;
diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
index 0c8f276293db..531e2cfb5fa4 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <reset-uclass.h>
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index 96916b644ad1..1ad031b90412 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -13,6 +13,7 @@
#include <reset-uclass.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
struct imx7_reset_priv {
void __iomem *base;
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 97d3d5759274..9df4c2a1c7b7 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -16,6 +16,7 @@
#include <syscon.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
struct mediatek_reset_priv {
struct regmap *regmap;
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 4e3327898e22..8322a48a8aeb 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -13,6 +13,7 @@
#include <reset-uclass.h>
#include <regmap.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define REG_COUNT 8
#define BITS_PER_REG 32
diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c
index bc20e3335c5c..4d59a9b8ac56 100644
--- a/drivers/reset/reset-mtmips.c
+++ b/drivers/reset/reset-mtmips.c
@@ -12,6 +12,7 @@
#include <malloc.h>
#include <reset-uclass.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
struct mtmips_reset_priv {
diff --git a/drivers/reset/reset-raspberrypi.c b/drivers/reset/reset-raspberrypi.c
index e2d284e5aca5..e4aa7ca6d3be 100644
--- a/drivers/reset/reset-raspberrypi.c
+++ b/drivers/reset/reset-raspberrypi.c
@@ -9,6 +9,7 @@
#include <reset-uclass.h>
#include <asm/arch/msg.h>
#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
+#include <linux/errno.h>
static int raspberrypi_reset_request(struct reset_ctl *reset_ctl)
{
diff --git a/drivers/reset/reset-rockchip.c b/drivers/reset/reset-rockchip.c
index 809255565086..5e8daa28913c 100644
--- a/drivers/reset/reset-rockchip.c
+++ b/drivers/reset/reset-rockchip.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <reset-uclass.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <asm/arch-rockchip/hardware.h>
#include <dm/lists.h>
diff --git a/drivers/reset/reset-sunxi.c b/drivers/reset/reset-sunxi.c
index b9ca80e9b025..54692cc3f5e7 100644
--- a/drivers/reset/reset-sunxi.c
+++ b/drivers/reset/reset-sunxi.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <dm/lists.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <asm/arch/ccu.h>
diff --git a/drivers/reset/reset-syscon.c b/drivers/reset/reset-syscon.c
index 8520227d551e..16e74dc8e94b 100644
--- a/drivers/reset/reset-syscon.c
+++ b/drivers/reset/reset-syscon.c
@@ -11,6 +11,7 @@
#include <syscon.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
struct syscon_reset_priv {
struct regmap *regmap;
diff --git a/drivers/reset/reset-ti-sci.c b/drivers/reset/reset-ti-sci.c
index 95cd3885876d..4d00622eb81a 100644
--- a/drivers/reset/reset-ti-sci.c
+++ b/drivers/reset/reset-ti-sci.c
@@ -16,6 +16,7 @@
#include <reset-uclass.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/soc/ti/ti_sci_protocol.h>
/**
diff --git a/drivers/reset/reset-uclass.c b/drivers/reset/reset-uclass.c
index 5e38ce5c0669..4dc2950bbab1 100644
--- a/drivers/reset/reset-uclass.c
+++ b/drivers/reset/reset-uclass.c
@@ -11,6 +11,7 @@
#include <reset.h>
#include <reset-uclass.h>
#include <dm/devres.h>
+#include <linux/errno.h>
static inline struct reset_ops *reset_dev_ops(struct udevice *dev)
{
diff --git a/drivers/reset/reset-uniphier.c b/drivers/reset/reset-uniphier.c
index fe1bd5541bda..b557906b8903 100644
--- a/drivers/reset/reset-uniphier.c
+++ b/drivers/reset/reset-uniphier.c
@@ -11,6 +11,7 @@
#include <reset-uclass.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/sizes.h>
diff --git a/drivers/reset/sandbox-reset.c b/drivers/reset/sandbox-reset.c
index 7a6f7f676cc4..a6936e81877e 100644
--- a/drivers/reset/sandbox-reset.c
+++ b/drivers/reset/sandbox-reset.c
@@ -10,6 +10,7 @@
#include <reset-uclass.h>
#include <asm/io.h>
#include <asm/reset.h>
+#include <linux/errno.h>
#define SANDBOX_RESET_SIGNALS 101
diff --git a/drivers/reset/sti-reset.c b/drivers/reset/sti-reset.c
index 12000d05cc89..75d972a5fa2f 100644
--- a/drivers/reset/sti-reset.c
+++ b/drivers/reset/sti-reset.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <dt-bindings/reset/stih407-resets.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/reset/stm32-reset.c b/drivers/reset/stm32-reset.c
index 64a11cfcfc0a..6f68c479e36b 100644
--- a/drivers/reset/stm32-reset.c
+++ b/drivers/reset/stm32-reset.c
@@ -13,6 +13,7 @@
#include <stm32_rcc.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* reset clear offset for STM32MP RCC */
#define RCC_CL 0x4
diff --git a/drivers/reset/tegra-car-reset.c b/drivers/reset/tegra-car-reset.c
index a33d4533a82b..68ec38643fd8 100644
--- a/drivers/reset/tegra-car-reset.c
+++ b/drivers/reset/tegra-car-reset.c
@@ -10,6 +10,7 @@
#include <reset-uclass.h>
#include <asm/arch/clock.h>
#include <asm/arch-tegra/clk_rst.h>
+#include <linux/errno.h>
static int tegra_car_reset_request(struct reset_ctl *reset_ctl)
{
diff --git a/drivers/rng/meson-rng.c b/drivers/rng/meson-rng.c
index 448d4537b05d..0debe8a10689 100644
--- a/drivers/rng/meson-rng.c
+++ b/drivers/rng/meson-rng.c
@@ -10,6 +10,7 @@
#include <dm.h>
#include <rng.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct meson_rng_platdata {
diff --git a/drivers/rng/rng-uclass.c b/drivers/rng/rng-uclass.c
index b6af3b8606a7..b315401f20e5 100644
--- a/drivers/rng/rng-uclass.c
+++ b/drivers/rng/rng-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <rng.h>
+#include <linux/errno.h>
int dm_rng_read(struct udevice *dev, void *buffer, size_t size)
{
diff --git a/drivers/rng/rockchip_rng.c b/drivers/rng/rockchip_rng.c
index c6a834b67c56..efc1980e4497 100644
--- a/drivers/rng/rockchip_rng.c
+++ b/drivers/rng/rockchip_rng.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/string.h>
#include <rng.h>
diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index 32f8cebb687d..25cba1602227 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <asm/io.h>
diff --git a/drivers/rtc/ds3231.c b/drivers/rtc/ds3231.c
index 328b03ed05da..ebb1cc65c64c 100644
--- a/drivers/rtc/ds3231.c
+++ b/drivers/rtc/ds3231.c
@@ -21,6 +21,7 @@
#include <rtc.h>
#include <i2c.h>
#include <stdio.h>
+#include <linux/errno.h>
/*
* RTC register addresses
diff --git a/drivers/rtc/ds3232.c b/drivers/rtc/ds3232.c
index 0a30e0eabb45..e6c9f8786659 100644
--- a/drivers/rtc/ds3232.c
+++ b/drivers/rtc/ds3232.c
@@ -10,6 +10,7 @@
#include <rtc.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/*
* RTC register addresses
diff --git a/drivers/rtc/pl031.c b/drivers/rtc/pl031.c
index 1b6717232c79..f98e3506eb61 100644
--- a/drivers/rtc/pl031.c
+++ b/drivers/rtc/pl031.c
@@ -14,6 +14,7 @@
#include <rtc.h>
#include <asm/io.h>
#include <asm/types.h>
+#include <linux/errno.h>
/*
* Register definitions
diff --git a/drivers/rtc/rtc-uclass.c b/drivers/rtc/rtc-uclass.c
index 8035f7fe9ccc..1fda0cd8fbce 100644
--- a/drivers/rtc/rtc-uclass.c
+++ b/drivers/rtc/rtc-uclass.c
@@ -9,6 +9,7 @@
#include <errno.h>
#include <log.h>
#include <rtc.h>
+#include <linux/errno.h>
int dm_rtc_get(struct udevice *dev, struct rtc_time *time)
{
diff --git a/drivers/rtc/rv3029.c b/drivers/rtc/rv3029.c
index 4dddf62aca88..ffed37ad5aa3 100644
--- a/drivers/rtc/rv3029.c
+++ b/drivers/rtc/rv3029.c
@@ -19,6 +19,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define RTC_RV3029_PAGE_LEN 7
diff --git a/drivers/rtc/rx8010sj.c b/drivers/rtc/rx8010sj.c
index 1d9b7cd6358c..1da7a7d6c905 100644
--- a/drivers/rtc/rx8010sj.c
+++ b/drivers/rtc/rx8010sj.c
@@ -23,6 +23,7 @@
#include <rtc.h>
#include <stdio.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/*---------------------------------------------------------------------*/
/* #undef DEBUG_RTC */
diff --git a/drivers/rtc/rx8025.c b/drivers/rtc/rx8025.c
index 7fd04d999b0f..aaa3609be008 100644
--- a/drivers/rtc/rx8025.c
+++ b/drivers/rtc/rx8025.c
@@ -14,6 +14,7 @@
#include <i2c.h>
#include <rtc.h>
#include <stdio.h>
+#include <linux/errno.h>
/*---------------------------------------------------------------------*/
#undef DEBUG_RTC
diff --git a/drivers/rtc/s35392a.c b/drivers/rtc/s35392a.c
index 5d70ed1ecda8..3744d8445fbc 100644
--- a/drivers/rtc/s35392a.c
+++ b/drivers/rtc/s35392a.c
@@ -25,6 +25,7 @@
#include <linux/bitrev.h>
#include <rtc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define S35390A_CHIP_ADDR 0x30
diff --git a/drivers/rtc/stm32_rtc.c b/drivers/rtc/stm32_rtc.c
index f9db318af1dc..8f9540697df4 100644
--- a/drivers/rtc/stm32_rtc.c
+++ b/drivers/rtc/stm32_rtc.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#define STM32_RTC_TR 0x00
diff --git a/drivers/scsi/scsi-uclass.c b/drivers/scsi/scsi-uclass.c
index acf3b3dc9570..4b063ad06e13 100644
--- a/drivers/scsi/scsi-uclass.c
+++ b/drivers/scsi/scsi-uclass.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <dm.h>
#include <scsi.h>
+#include <linux/errno.h>
int scsi_exec(struct udevice *dev, struct scsi_cmd *pccb)
{
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 1a5e256d61a3..ad7ca9e8784a 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -17,6 +17,7 @@
#include <vsprintf.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
#if !defined(CONFIG_DM_SCSI)
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 35b76f53f93d..6b20d3d487be 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -10,6 +10,7 @@
#include <serial.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* data register */
#define ALTERA_JTAG_RVALID BIT(15) /* Read valid */
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 0be5cd75c853..ea9eb206a109 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -10,6 +10,7 @@
#include <serial.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* status register */
#define ALTERA_UART_TMT BIT(5) /* tx empty */
diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c
index dfcb6fd69812..270f61cc0741 100644
--- a/drivers/serial/arm_dcc.c
+++ b/drivers/serial/arm_dcc.c
@@ -18,6 +18,7 @@
#include <common.h>
#include <dm.h>
#include <serial.h>
+#include <linux/errno.h>
#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V7A) || defined(CONFIG_CPU_V7R)
/*
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f20659358869..f6e14cc90216 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <linux/compiler.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <asm/io.h>
#ifdef CONFIG_DM_SERIAL
diff --git a/drivers/serial/lpc32xx_hsuart.c b/drivers/serial/lpc32xx_hsuart.c
index 7d31c6d4a145..598ae08c668e 100644
--- a/drivers/serial/lpc32xx_hsuart.c
+++ b/drivers/serial/lpc32xx_hsuart.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <serial.h>
#include <dm/platform_data/lpc32xx_hsuart.h>
+#include <linux/errno.h>
#include <asm/arch/uart.h>
#include <linux/compiler.h>
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 840d89f16fa5..603a8cb59774 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -16,6 +16,7 @@
#include <watchdog.h>
#include <asm/global_data.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include <asm/io.h>
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index 01c924675af9..aef4c75d3880 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -20,6 +20,7 @@
#include <asm/global_data.h>
#include <linux/compiler.h>
#include <asm/state.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 191263a0d636..9b679a5a6af2 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -19,6 +19,7 @@
#include <dm/device-internal.h>
#include <dm/of_access.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 71e1acbde083..a6839f465dc5 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -16,6 +16,7 @@
#include <linux/compiler.h>
#include <errno.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index 9de94b69bd04..a16d6a6eca61 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -14,6 +14,7 @@
#include <asm/types.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <mach/ar71xx_regs.h>
#define AR933X_UART_DATA_REG 0x00
diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c
index 8a4af87eb640..d9ebb273ddc5 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -25,6 +25,7 @@
#include <dm/pinctrl.h>
#include <linux/bitops.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
struct bcm283x_mu_regs {
u32 io;
diff --git a/drivers/serial/serial_bcm283x_pl011.c b/drivers/serial/serial_bcm283x_pl011.c
index 923f402fbe9d..efb6eb60b356 100644
--- a/drivers/serial/serial_bcm283x_pl011.c
+++ b/drivers/serial/serial_bcm283x_pl011.c
@@ -9,6 +9,7 @@
#include <dm/pinctrl.h>
#include <dm/platform_data/serial_pl01x.h>
#include <serial.h>
+#include <linux/errno.h>
#include "serial_pl01x_internal.h"
/*
diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm6345.c
index 5b963ce45bc0..309cbf63af9f 100644
--- a/drivers/serial/serial_bcm6345.c
+++ b/drivers/serial/serial_bcm6345.c
@@ -14,6 +14,7 @@
#include <serial.h>
#include <asm/io.h>
#include <asm/types.h>
+#include <linux/errno.h>
/* UART Control register */
#define UART_CTL_REG 0x0
diff --git a/drivers/serial/serial_cortina.c b/drivers/serial/serial_cortina.c
index cc20673efeff..c0beba19f58a 100644
--- a/drivers/serial/serial_cortina.c
+++ b/drivers/serial/serial_cortina.c
@@ -13,6 +13,7 @@
#include <serial.h>
#include <linux/bitops.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
/* Register definitions */
#define UCFG 0x00 /* UART config register */
diff --git a/drivers/serial/serial_efi.c b/drivers/serial/serial_efi.c
index b152e1025879..df3a09010243 100644
--- a/drivers/serial/serial_efi.c
+++ b/drivers/serial/serial_efi.c
@@ -15,6 +15,7 @@
#include <linux/compiler.h>
#include <asm/io.h>
#include <serial.h>
+#include <linux/errno.h>
/* Information about the efi console */
struct serial_efi_priv {
diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c
index d8482ba7047c..d9be526ffe2e 100644
--- a/drivers/serial/serial_linflexuart.c
+++ b/drivers/serial/serial_linflexuart.c
@@ -13,6 +13,7 @@
#include <linux/compiler.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
+#include <linux/errno.h>
#define US1_TDRE (1 << 7)
#define US1_RDRF (1 << 5)
diff --git a/drivers/serial/serial_lpuart.c b/drivers/serial/serial_lpuart.c
index 8631d790e6f3..1017981f97c2 100644
--- a/drivers/serial/serial_lpuart.c
+++ b/drivers/serial/serial_lpuart.c
@@ -18,6 +18,7 @@
#include <linux/compiler.h>
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
+#include <linux/errno.h>
#define US1_TDRE (1 << 7)
#define US1_RDRF (1 << 5)
diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c
index 6b907fe19202..2d2f07e369b7 100644
--- a/drivers/serial/serial_mcf.c
+++ b/drivers/serial/serial_mcf.c
@@ -23,6 +23,7 @@
#include <linux/compiler.h>
#include <asm/immap.h>
#include <asm/uart.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index 496a2ca2c35b..80141642af84 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -10,6 +10,7 @@
#include <linux/bitops.h>
#include <linux/compiler.h>
#include <serial.h>
+#include <linux/errno.h>
struct meson_uart {
u32 wfifo;
diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index 13c7f9d809ec..0809f1ff8a9f 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -19,6 +19,7 @@
#include <asm/io.h>
#include <linux/compiler.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
/* Serial registers - this driver works in uartdm mode*/
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index 0d2a9dc7e3ee..74b5cc880c19 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -18,6 +18,7 @@
#include <asm/io.h>
#include <asm/types.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct mtk_serial_regs {
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 1f8eeb2cbfe1..1c08f3ec7957 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -13,6 +13,7 @@
#include <dm/platform_data/serial_mxc.h>
#include <serial.h>
#include <linux/compiler.h>
+#include <linux/errno.h>
/* UART Control Register Bit Fields.*/
#define URXD_CHARRDY (1<<15)
diff --git a/drivers/serial/serial_nulldev.c b/drivers/serial/serial_nulldev.c
index efae14dd6ca5..c92ae698088a 100644
--- a/drivers/serial/serial_nulldev.c
+++ b/drivers/serial/serial_nulldev.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <serial.h>
+#include <linux/errno.h>
static int nulldev_serial_setbrg(struct udevice *dev, int baudrate)
{
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index f7997fc788fc..b661b11f0d8c 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -14,6 +14,7 @@
#include <serial.h>
#include <clk.h>
#include <linux/err.h>
+#include <linux/errno.h>
#ifndef CONFIG_SYS_NS16550_CLK
#define CONFIG_SYS_NS16550_CLK 0
diff --git a/drivers/serial/serial_owl.c b/drivers/serial/serial_owl.c
index 2651a45a7f3c..d721e24e4bfe 100644
--- a/drivers/serial/serial_owl.c
+++ b/drivers/serial/serial_owl.c
@@ -15,6 +15,7 @@
#include <asm/io.h>
#include <asm/types.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
/* UART Registers */
#define OWL_UART_CTL (0x0000)
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index ce6c5db762f3..8e420fb764bc 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -11,6 +11,7 @@
#include <wait_bit.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <mach/pic32.h>
#include <dt-bindings/clock/microchip,clock.h>
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 1ae5bac249a9..a472e8ca5de9 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
/* For get_bus_freq() */
#include <clock_legacy.h>
#include <dm.h>
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c
index a97d03a88760..e20f0c87540a 100644
--- a/drivers/serial/serial_pxa.c
+++ b/drivers/serial/serial_pxa.c
@@ -31,6 +31,7 @@
#include <linux/compiler.h>
#include <serial.h>
#include <watchdog.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 986c5ca8107e..1a939628a5aa 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -18,6 +18,7 @@
#include <asm/arch/uart.h>
#include <serial.h>
#include <clk.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index d697d62d910c..e596c042ca6b 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -17,6 +17,7 @@
#include <linux/compiler.h>
#include <dm/platform_data/serial_sh.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "serial_sh.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index c3f0a3cb65d2..39b62d30eb4f 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -16,6 +16,7 @@
#include <linux/compiler.h>
#include <serial.h>
#include <linux/err.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_sti_asc.c b/drivers/serial/serial_sti_asc.c
index aa3c9efc8a0e..0cb53d7ae3f1 100644
--- a/drivers/serial/serial_sti_asc.c
+++ b/drivers/serial/serial_sti_asc.c
@@ -13,6 +13,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index cab0db2c96a3..5cd4c815cfd9 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -15,6 +15,7 @@
#include <asm/arch/stm32.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "serial_stm32.h"
#include <dm/device_compat.h>
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index 5116d13751de..fd9e227557f2 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -14,6 +14,7 @@
#include <linux/bitops.h>
#include <linux/compiler.h>
#include <serial.h>
+#include <linux/errno.h>
#define SR_TX_FIFO_FULL BIT(3) /* transmit FIFO full */
#define SR_TX_FIFO_EMPTY BIT(2) /* transmit FIFO empty */
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 0e71cada1bba..7fec7d5bec4f 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -18,6 +18,7 @@
#include <linux/compiler.h>
#include <serial.h>
#include <linux/err.h>
+#include <linux/errno.h>
#define ZYNQ_UART_SR_TXACTIVE BIT(11) /* TX active */
#define ZYNQ_UART_SR_TXFULL BIT(4) /* TX FIFO full */
diff --git a/drivers/smem/msm_smem.c b/drivers/smem/msm_smem.c
index 09a1268e2766..ba9d108173cd 100644
--- a/drivers/smem/msm_smem.c
+++ b/drivers/smem/msm_smem.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <linux/bug.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <smem.h>
diff --git a/drivers/smem/smem-uclass.c b/drivers/smem/smem-uclass.c
index ce7bf40656e8..90b1316d6dc9 100644
--- a/drivers/smem/smem-uclass.c
+++ b/drivers/smem/smem-uclass.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <dm.h>
#include <smem.h>
+#include <linux/errno.h>
int smem_alloc(struct udevice *dev, unsigned int host,
unsigned int item, size_t size)
diff --git a/drivers/soc/soc-uclass.c b/drivers/soc/soc-uclass.c
index d22773e478bf..29d586e0bcdd 100644
--- a/drivers/soc/soc-uclass.c
+++ b/drivers/soc/soc-uclass.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <dm/lists.h>
#include <dm/root.h>
+#include <linux/errno.h>
#include <linux/string.h>
int soc_get(struct udevice **devp)
diff --git a/drivers/soc/soc_ti_k3.c b/drivers/soc/soc_ti_k3.c
index 0d26cf17d565..fff1a2e744a0 100644
--- a/drivers/soc/soc_ti_k3.c
+++ b/drivers/soc/soc_ti_k3.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <soc.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <asm/io.h>
diff --git a/drivers/soc/ti/k3-navss-ringacc.c b/drivers/soc/ti/k3-navss-ringacc.c
index f4a0272f3ae2..21c4b3fe1945 100644
--- a/drivers/soc/ti/k3-navss-ringacc.c
+++ b/drivers/soc/ti/k3-navss-ringacc.c
@@ -21,6 +21,7 @@
#include <linux/compat.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/soc/ti/k3-navss-ringacc.h>
#include <linux/soc/ti/ti_sci_protocol.h>
diff --git a/drivers/soc/ti/keystone_serdes.c b/drivers/soc/ti/keystone_serdes.c
index f2a5c18b80bd..c121fec52d43 100644
--- a/drivers/soc/ti/keystone_serdes.c
+++ b/drivers/soc/ti/keystone_serdes.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <asm/ti-common/keystone_serdes.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define SERDES_CMU_REGS(x) (0x0000 + (0x0c00 * (x)))
#define SERDES_LANE_REGS(x) (0x0200 + (0x200 * (x)))
diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c
index adb0b2b104da..4258d607cb4d 100644
--- a/drivers/sound/broadwell_i2s.c
+++ b/drivers/sound/broadwell_i2s.c
@@ -15,6 +15,7 @@
#include <log.h>
#include <time.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include "broadwell_i2s.h"
enum {
diff --git a/drivers/sound/broadwell_sound.c b/drivers/sound/broadwell_sound.c
index 6e083fe1f696..ba2a68ce56a0 100644
--- a/drivers/sound/broadwell_sound.c
+++ b/drivers/sound/broadwell_sound.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <i2s.h>
#include <sound.h>
+#include <linux/errno.h>
static int broadwell_sound_probe(struct udevice *dev)
{
diff --git a/drivers/sound/codec-uclass.c b/drivers/sound/codec-uclass.c
index 1ec77acfc1ce..207dc188c48c 100644
--- a/drivers/sound/codec-uclass.c
+++ b/drivers/sound/codec-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <audio_codec.h>
+#include <linux/errno.h>
int audio_codec_set_params(struct udevice *dev, int interface, int rate,
int mclk_freq, int bits_per_sample, uint channels)
diff --git a/drivers/sound/da7219.c b/drivers/sound/da7219.c
index 6bc1ad0036e0..41aa338b55f5 100644
--- a/drivers/sound/da7219.c
+++ b/drivers/sound/da7219.c
@@ -20,6 +20,7 @@
#include <asm-generic/gpio.h>
#include <dt-bindings/sound/nhlt.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#define DA7219_ACPI_HID "DLGS7219"
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index 93820d77802f..241b6270c4dd 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -18,6 +18,7 @@
#include <dt-bindings/sound/azalia.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/**
* struct hda_regs - HDA registers
diff --git a/drivers/sound/i2s-uclass.c b/drivers/sound/i2s-uclass.c
index b741e3952d17..e31d9933fff8 100644
--- a/drivers/sound/i2s-uclass.c
+++ b/drivers/sound/i2s-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <i2s.h>
+#include <linux/errno.h>
int i2s_tx_data(struct udevice *dev, void *data, uint data_size)
{
diff --git a/drivers/sound/max98088.c b/drivers/sound/max98088.c
index 5b4c489f4b1a..6c2caf3f77fd 100644
--- a/drivers/sound/max98088.c
+++ b/drivers/sound/max98088.c
@@ -17,6 +17,7 @@
#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include "maxim_codec.h"
#include "max98088.h"
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index d23955d6e10e..16620c3e9674 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -15,6 +15,7 @@
#include <sound.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "maxim_codec.h"
#include "max98090.h"
diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
index 5037f9516fa1..db52ccdea3b2 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -16,6 +16,7 @@
#include <log.h>
#include <sound.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include "i2s.h"
#include "max98095.h"
diff --git a/drivers/sound/max98357a.c b/drivers/sound/max98357a.c
index 841bc6ef682d..8fbcf80abcba 100644
--- a/drivers/sound/max98357a.c
+++ b/drivers/sound/max98357a.c
@@ -20,6 +20,7 @@
#endif
#include <dt-bindings/sound/nhlt.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
struct max98357a_priv {
struct gpio_desc sdmode_gpio;
diff --git a/drivers/sound/rockchip_i2s.c b/drivers/sound/rockchip_i2s.c
index 4e9e68aaac81..a20c8e78b88b 100644
--- a/drivers/sound/rockchip_i2s.c
+++ b/drivers/sound/rockchip_i2s.c
@@ -14,6 +14,7 @@
#include <sound.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
struct rk_i2s_regs {
u32 txcr; /* I2S_TXCR, 0x00 */
diff --git a/drivers/sound/rockchip_sound.c b/drivers/sound/rockchip_sound.c
index 94058e603d7d..ec93a44aec7e 100644
--- a/drivers/sound/rockchip_sound.c
+++ b/drivers/sound/rockchip_sound.c
@@ -16,6 +16,7 @@
#include <sound.h>
#include <asm/arch-rockchip/periph.h>
#include <dm/pinctrl.h>
+#include <linux/errno.h>
static int rockchip_sound_setup(struct udevice *dev)
{
diff --git a/drivers/sound/rt5677.c b/drivers/sound/rt5677.c
index 16aa9dfc5b2b..bfe78ff6b4f6 100644
--- a/drivers/sound/rt5677.c
+++ b/drivers/sound/rt5677.c
@@ -9,6 +9,7 @@
#include <audio_codec.h>
#include <dm.h>
#include <i2c.h>
+#include <linux/errno.h>
#include "rt5677.h"
#include <log.h>
diff --git a/drivers/sound/samsung-i2s.c b/drivers/sound/samsung-i2s.c
index 24e124e8083b..51cb9637bab1 100644
--- a/drivers/sound/samsung-i2s.c
+++ b/drivers/sound/samsung-i2s.c
@@ -14,6 +14,7 @@
#include <asm/arch/pinmux.h>
#include <asm/arch/i2s-regs.h>
#include <asm/io.h>
+#include <linux/errno.h>
#define FIC_TX2COUNT(x) (((x) >> 24) & 0xf)
#define FIC_TX1COUNT(x) (((x) >> 16) & 0xf)
diff --git a/drivers/sound/samsung_sound.c b/drivers/sound/samsung_sound.c
index 473cedf7e974..16fdb22ea9ee 100644
--- a/drivers/sound/samsung_sound.c
+++ b/drivers/sound/samsung_sound.c
@@ -12,6 +12,7 @@
#include <sound.h>
#include <asm/gpio.h>
#include <asm/arch/power.h>
+#include <linux/errno.h>
static int samsung_sound_setup(struct udevice *dev)
{
diff --git a/drivers/sound/sandbox.c b/drivers/sound/sandbox.c
index 0686add3c8b3..1c30f06350f6 100644
--- a/drivers/sound/sandbox.c
+++ b/drivers/sound/sandbox.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <sound.h>
#include <asm/sdl.h>
+#include <linux/errno.h>
struct sandbox_codec_priv {
int interface;
diff --git a/drivers/sound/sound-uclass.c b/drivers/sound/sound-uclass.c
index 92f4b0b924ba..86722d23c5ce 100644
--- a/drivers/sound/sound-uclass.c
+++ b/drivers/sound/sound-uclass.c
@@ -11,6 +11,7 @@
#include <malloc.h>
#include <sound.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#define SOUND_BITS_IN_BYTE 8
diff --git a/drivers/sound/tegra_ahub.c b/drivers/sound/tegra_ahub.c
index 2fead1aeffda..cb27be0a7cb3 100644
--- a/drivers/sound/tegra_ahub.c
+++ b/drivers/sound/tegra_ahub.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch-tegra/tegra_ahub.h>
#include <asm/arch-tegra/tegra_i2s.h>
+#include <linux/errno.h>
#include "tegra_i2s_priv.h"
struct tegra_ahub_priv {
diff --git a/drivers/sound/tegra_i2s.c b/drivers/sound/tegra_i2s.c
index 5cf82250da20..7749cd47b70c 100644
--- a/drivers/sound/tegra_i2s.c
+++ b/drivers/sound/tegra_i2s.c
@@ -14,6 +14,7 @@
#include <sound.h>
#include <asm/io.h>
#include <asm/arch-tegra/tegra_i2s.h>
+#include <linux/errno.h>
#include "tegra_i2s_priv.h"
int tegra_i2s_set_cif_tx_ctrl(struct udevice *dev, u32 value)
diff --git a/drivers/sound/tegra_sound.c b/drivers/sound/tegra_sound.c
index aef6a2eb1475..d76448c7e4d4 100644
--- a/drivers/sound/tegra_sound.c
+++ b/drivers/sound/tegra_sound.c
@@ -14,6 +14,7 @@
#include <misc.h>
#include <sound.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include "tegra_i2s_priv.h"
static int tegra_sound_setup(struct udevice *dev)
diff --git a/drivers/sound/wm8994.c b/drivers/sound/wm8994.c
index 367e14454170..c37c787549d5 100644
--- a/drivers/sound/wm8994.c
+++ b/drivers/sound/wm8994.c
@@ -17,6 +17,7 @@
#include <asm/arch/clk.h>
#include <asm/arch/cpu.h>
#include <asm/arch/sound.h>
+#include <linux/errno.h>
#include "wm8994.h"
#include "wm8994_registers.h"
diff --git a/drivers/spi/atcspi200_spi.c b/drivers/spi/atcspi200_spi.c
index 79bcd12367b5..aed5f64eabba 100644
--- a/drivers/spi/atcspi200_spi.c
+++ b/drivers/spi/atcspi200_spi.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index 7dbbe1f43cf7..f270eea61e84 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -20,6 +20,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 33bf382998e5..1a95cfb9f65b 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -17,6 +17,7 @@
#include <asm/gpio.h>
#endif
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
/*
diff --git a/drivers/spi/bcm63xx_hsspi.c b/drivers/spi/bcm63xx_hsspi.c
index f59143802485..f45214fbda4a 100644
--- a/drivers/spi/bcm63xx_hsspi.c
+++ b/drivers/spi/bcm63xx_hsspi.c
@@ -18,6 +18,7 @@
#include <wait_bit.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define HSSPI_PP 0
diff --git a/drivers/spi/bcm63xx_spi.c b/drivers/spi/bcm63xx_spi.c
index a5550a214e8e..ac79961a14e2 100644
--- a/drivers/spi/bcm63xx_spi.c
+++ b/drivers/spi/bcm63xx_spi.c
@@ -17,6 +17,7 @@
#include <stdio.h>
#include <wait_bit.h>
#include <asm/io.h>
+#include <linux/errno.h>
/* BCM6348 SPI core */
#define SPI_6348_CLK 0x06
diff --git a/drivers/spi/bcmstb_spi.c b/drivers/spi/bcmstb_spi.c
index 5879a7883b1c..539abcfd953f 100644
--- a/drivers/spi/bcmstb_spi.c
+++ b/drivers/spi/bcmstb_spi.c
@@ -19,6 +19,7 @@
#include <malloc.h>
#include <spi.h>
#include <time.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index a6a5c7f17c99..0a211b377070 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -23,6 +23,7 @@
#include <malloc.h>
#include <asm/coldfire/dspi.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct coldfire_spi_priv {
diff --git a/drivers/spi/davinci_spi.c b/drivers/spi/davinci_spi.c
index 3d1c0b58070d..7058ba9acf52 100644
--- a/drivers/spi/davinci_spi.c
+++ b/drivers/spi/davinci_spi.c
@@ -20,6 +20,7 @@
#include <dm/platform_data/spi_davinci.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/* SPIGCR0 */
#define SPIGCR0_SPIENA_MASK 0x1
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c
index 3838504455ab..f6c63435147e 100644
--- a/drivers/spi/designware_spi.c
+++ b/drivers/spi/designware_spi.c
@@ -23,6 +23,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <asm/io.h>
diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index 03c03ab4874d..cec59208395d 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -21,6 +21,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index eae6b379a9c5..190b60b3c4f0 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -10,6 +10,7 @@
*/
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/math64.h>
#include <common.h>
#include <dm.h>
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 35f8a58da162..2e85c25907d5 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -13,6 +13,7 @@
#include <asm/global_data.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <malloc.h>
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index 2923fb5fb3d8..195808c4066f 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -29,6 +29,7 @@
#include <asm/io.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/sizes.h>
#include <linux/iopoll.h>
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
index 308ace8a5802..51d283c5e6fa 100644
--- a/drivers/spi/ich.c
+++ b/drivers/spi/ich.c
@@ -29,6 +29,7 @@
#include <asm/mtrr.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/string.h>
diff --git a/drivers/spi/meson_spifc.c b/drivers/spi/meson_spifc.c
index 5bc99370a101..08b3859678fd 100644
--- a/drivers/spi/meson_spifc.c
+++ b/drivers/spi/meson_spifc.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <linux/bitfield.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* register map */
diff --git a/drivers/spi/mpc8xx_spi.c b/drivers/spi/mpc8xx_spi.c
index 0f9ebc58f297..d549c6e8a740 100644
--- a/drivers/spi/mpc8xx_spi.c
+++ b/drivers/spi/mpc8xx_spi.c
@@ -22,6 +22,7 @@
#include <spi.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <asm/cpm_8xx.h>
#include <asm/io.h>
diff --git a/drivers/spi/mpc8xxx_spi.c b/drivers/spi/mpc8xxx_spi.c
index b7fd47984de7..eedb29216cb6 100644
--- a/drivers/spi/mpc8xxx_spi.c
+++ b/drivers/spi/mpc8xxx_spi.c
@@ -18,6 +18,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
enum {
SPI_EV_NE = BIT(31 - 22), /* Receiver Not Empty */
diff --git a/drivers/spi/mt7621_spi.c b/drivers/spi/mt7621_spi.c
index 786afaaa9cda..581a9bd44c4a 100644
--- a/drivers/spi/mt7621_spi.c
+++ b/drivers/spi/mt7621_spi.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <wait_bit.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/printk.h>
diff --git a/drivers/spi/mtk_snfi_spi.c b/drivers/spi/mtk_snfi_spi.c
index bd9b79929a9d..07a178a87859 100644
--- a/drivers/spi/mtk_snfi_spi.c
+++ b/drivers/spi/mtk_snfi_spi.c
@@ -16,6 +16,7 @@
#include <watchdog.h>
#include <dm/pinctrl.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/string.h>
diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index b4f928741f34..fc75913022b3 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -41,6 +41,7 @@
#include <dm.h>
#include <clk.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sizes.h>
#include <linux/iopoll.h>
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index 4eb039f35793..222c30a1ebdd 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -17,6 +17,7 @@
#include <linux/compat.h>
#include <malloc.h>
#include <spi.h>
+#include <linux/errno.h>
#include <asm/types.h>
#include <asm/io.h>
diff --git a/drivers/spi/pl022_spi.c b/drivers/spi/pl022_spi.c
index 7cf19a1a6615..236de5b54a3f 100644
--- a/drivers/spi/pl022_spi.c
+++ b/drivers/spi/pl022_spi.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <asm/global_data.h>
#include <dm/platform_data/spi_pl022.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <spi.h>
#include <linux/printk.h>
diff --git a/drivers/spi/soft_spi.c b/drivers/spi/soft_spi.c
index 87e1e2417cea..9818ecb4c18a 100644
--- a/drivers/spi/soft_spi.c
+++ b/drivers/spi/soft_spi.c
@@ -20,6 +20,7 @@
#include <asm/gpio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/spi-mem-nodm.c b/drivers/spi/spi-mem-nodm.c
index 841eefc12ce1..42a6126dd7bc 100644
--- a/drivers/spi/spi-mem-nodm.c
+++ b/drivers/spi/spi-mem-nodm.c
@@ -7,6 +7,7 @@
#include <malloc.h>
#include <spi.h>
#include <spi-mem.h>
+#include <linux/errno.h>
#include <linux/string.h>
int spi_mem_exec_op(struct spi_slave *slave,
diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c
index b046792b636e..3c0300d68d6d 100644
--- a/drivers/spi/spi-sifive.c
+++ b/drivers/spi/spi-sifive.c
@@ -16,6 +16,7 @@
#include <wait_bit.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <clk.h>
#include <linux/string.h>
diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index 3b1e9fc22846..c19a24a1c64c 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -31,6 +31,7 @@
#include <asm/global_data.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <asm/bitops.h>
#include <asm/gpio.h>
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 56869c125afb..c59ae3ff9b30 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -15,6 +15,7 @@
#include <dm/uclass-internal.h>
#include <dm/lists.h>
#include <dm/util.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/stm32_qspi.c b/drivers/spi/stm32_qspi.c
index 8e91475ef95a..704a66d0c77f 100644
--- a/drivers/spi/stm32_qspi.c
+++ b/drivers/spi/stm32_qspi.c
@@ -17,6 +17,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/ioport.h>
#include <linux/printk.h>
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c
index 09711b0aabca..d37404f0c8cc 100644
--- a/drivers/spi/stm32_spi.c
+++ b/drivers/spi/stm32_spi.c
@@ -15,6 +15,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <asm/io.h>
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index 7b81e785215c..7be4efd35c60 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -21,6 +21,7 @@
#include <fdtdec.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "tegra_spi.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index ba97f3ece771..9fecdb20f73f 100644
--- a/drivers/spi/ti_qspi.c
+++ b/drivers/spi/ti_qspi.c
@@ -23,6 +23,7 @@
#include <asm/ti-common/ti-edma3.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <regmap.h>
#include <syscon.h>
diff --git a/drivers/spi/uniphier_spi.c b/drivers/spi/uniphier_spi.c
index 21fa7a77efb1..742554a09ab4 100644
--- a/drivers/spi/uniphier_spi.c
+++ b/drivers/spi/uniphier_spi.c
@@ -14,6 +14,7 @@
#include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <spi.h>
#include <wait_bit.h>
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index a1022ad496e7..a95558139d83 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c
index 01186f3c0399..1386dc86ed62 100644
--- a/drivers/spi/zynqmp_gqspi.c
+++ b/drivers/spi/zynqmp_gqspi.c
@@ -23,6 +23,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define GQSPI_GFIFO_STRT_MODE_MASK BIT(29)
diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 1f9b3c310086..d06fc34c6973 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
#include <spmi/spmi.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/spmi/spmi-sandbox.c b/drivers/spmi/spmi-sandbox.c
index 0da419c50529..f1e0d6915030 100644
--- a/drivers/spmi/spmi-sandbox.c
+++ b/drivers/spmi/spmi-sandbox.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <linux/errno.h>
#include <spmi/spmi.h>
#include <asm/gpio.h>
#include <asm/io.h>
diff --git a/drivers/spmi/spmi-uclass.c b/drivers/spmi/spmi-uclass.c
index ff098731bb2d..fc8252fbc91b 100644
--- a/drivers/spmi/spmi-uclass.c
+++ b/drivers/spmi/spmi-uclass.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <errno.h>
+#include <linux/errno.h>
#include <spmi/spmi.h>
#include <linux/ctype.h>
diff --git a/drivers/sysreset/sysreset-ti-sci.c b/drivers/sysreset/sysreset-ti-sci.c
index 3877b9bc1258..09ebd161fcb3 100644
--- a/drivers/sysreset/sysreset-ti-sci.c
+++ b/drivers/sysreset/sysreset-ti-sci.c
@@ -13,6 +13,7 @@
#include <sysreset.h>
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/soc/ti/ti_sci_protocol.h>
/**
diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index a42c603ff56d..46092d939cf3 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -22,6 +22,7 @@
#include <dm/root.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
int sysreset_request(struct udevice *dev, enum sysreset_t type)
{
diff --git a/drivers/sysreset/sysreset_ast.c b/drivers/sysreset/sysreset_ast.c
index ee941c777062..f93eea629dfd 100644
--- a/drivers/sysreset/sysreset_ast.c
+++ b/drivers/sysreset/sysreset_ast.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <asm/arch/wdt.h>
#include <linux/err.h>
+#include <linux/errno.h>
static int ast_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
diff --git a/drivers/sysreset/sysreset_microblaze.c b/drivers/sysreset/sysreset_microblaze.c
index b45e894440dc..1bb24914e77c 100644
--- a/drivers/sysreset/sysreset_microblaze.c
+++ b/drivers/sysreset/sysreset_microblaze.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <sysreset.h>
#include <linux/err.h>
+#include <linux/errno.h>
static int microblaze_sysreset_request(struct udevice *dev,
enum sysreset_t type)
diff --git a/drivers/sysreset/sysreset_mpc83xx.c b/drivers/sysreset/sysreset_mpc83xx.c
index bd4301bcbb6a..603dbbaea4ac 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -15,6 +15,7 @@
#include <asm/global_data.h>
#include <asm/ppc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "sysreset_mpc83xx.h"
diff --git a/drivers/sysreset/sysreset_octeon.c b/drivers/sysreset/sysreset_octeon.c
index a05dac3226e8..963ec20dc0bb 100644
--- a/drivers/sysreset/sysreset_octeon.c
+++ b/drivers/sysreset/sysreset_octeon.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <sysreset.h>
#include <asm/io.h>
+#include <linux/errno.h>
#define RST_SOFT_RST 0x0080
diff --git a/drivers/sysreset/sysreset_rockchip.c b/drivers/sysreset/sysreset_rockchip.c
index 0fc6b683f2be..a5e0f47c7d8e 100644
--- a/drivers/sysreset/sysreset_rockchip.c
+++ b/drivers/sysreset/sysreset_rockchip.c
@@ -12,6 +12,7 @@
#include <asm/arch-rockchip/cru_rk3328.h>
#include <asm/arch-rockchip/hardware.h>
#include <linux/err.h>
+#include <linux/errno.h>
int rockchip_sysreset_request(struct udevice *dev, enum sysreset_t type)
{
diff --git a/drivers/sysreset/sysreset_sandbox.c b/drivers/sysreset/sysreset_sandbox.c
index cb90266ab0cb..fd302d6473e8 100644
--- a/drivers/sysreset/sysreset_sandbox.c
+++ b/drivers/sysreset/sysreset_sandbox.c
@@ -10,6 +10,7 @@
#include <sysreset.h>
#include <asm/state.h>
#include <asm/test.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int sandbox_warm_sysreset_request(struct udevice *dev,
diff --git a/drivers/sysreset/sysreset_socfpga.c b/drivers/sysreset/sysreset_socfpga.c
index 178bcb227ff8..c348649cedf5 100644
--- a/drivers/sysreset/sysreset_socfpga.c
+++ b/drivers/sysreset/sysreset_socfpga.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/arch/reset_manager.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
struct socfpga_sysreset_data {
void __iomem *rstmgr_base;
diff --git a/drivers/sysreset/sysreset_socfpga_s10.c b/drivers/sysreset/sysreset_socfpga_s10.c
index b109320eedd0..7c6e5391b509 100644
--- a/drivers/sysreset/sysreset_socfpga_s10.c
+++ b/drivers/sysreset/sysreset_socfpga_s10.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <sysreset.h>
#include <asm/arch/mailbox_s10.h>
+#include <linux/errno.h>
static int socfpga_sysreset_request(struct udevice *dev,
enum sysreset_t type)
diff --git a/drivers/sysreset/sysreset_sti.c b/drivers/sysreset/sysreset_sti.c
index c1b22873ff43..26431ee129b8 100644
--- a/drivers/sysreset/sysreset_sti.c
+++ b/drivers/sysreset/sysreset_sti.c
@@ -12,6 +12,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/sysreset/sysreset_syscon.c b/drivers/sysreset/sysreset_syscon.c
index 0dfa91fc90e6..e6e98b383ee5 100644
--- a/drivers/sysreset/sysreset_syscon.c
+++ b/drivers/sysreset/sysreset_syscon.c
@@ -14,6 +14,7 @@
#include <sysreset.h>
#include <syscon.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct syscon_reboot_priv {
diff --git a/drivers/sysreset/sysreset_watchdog.c b/drivers/sysreset/sysreset_watchdog.c
index 3493c5e8e452..4fd234a62eca 100644
--- a/drivers/sysreset/sysreset_watchdog.c
+++ b/drivers/sysreset/sysreset_watchdog.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <sysreset.h>
#include <wdt.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct wdt_reboot_priv {
diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index bc911435602a..0ab2b543abdf 100644
--- a/drivers/sysreset/sysreset_x86.c
+++ b/drivers/sysreset/sysreset_x86.c
@@ -13,6 +13,7 @@
#include <acpi/acpi_s3.h>
#include <asm/io.h>
#include <asm/processor.h>
+#include <linux/errno.h>
struct x86_sysreset_platdata {
struct udevice *pch;
diff --git a/drivers/sysreset/sysreset_xtfpga.c b/drivers/sysreset/sysreset_xtfpga.c
index ad1781e6c0f8..ce30114a17ac 100644
--- a/drivers/sysreset/sysreset_xtfpga.c
+++ b/drivers/sysreset/sysreset_xtfpga.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <sysreset.h>
#include <asm/io.h>
+#include <linux/errno.h>
static int xtfpga_reset_request(struct udevice *dev, enum sysreset_t type)
{
diff --git a/drivers/tee/broadcom/chimp_optee.c b/drivers/tee/broadcom/chimp_optee.c
index 91ebc17c0361..a92fd9c95627 100644
--- a/drivers/tee/broadcom/chimp_optee.c
+++ b/drivers/tee/broadcom/chimp_optee.c
@@ -7,6 +7,7 @@
#include <string.h>
#include <tee.h>
#include <broadcom/chimp.h>
+#include <linux/errno.h>
#ifdef CONFIG_CHIMP_OPTEE
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 0fc7a0ec7f17..c1460999cbec 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -10,6 +10,7 @@
#include <tee.h>
#include <linux/arm-smccc.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/string.h>
diff --git a/drivers/tee/optee/supplicant.c b/drivers/tee/optee/supplicant.c
index ae042b9a2047..fe99a328adbe 100644
--- a/drivers/tee/optee/supplicant.c
+++ b/drivers/tee/optee/supplicant.c
@@ -7,6 +7,7 @@
#include <log.h>
#include <malloc.h>
#include <tee.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include "optee_msg.h"
diff --git a/drivers/tee/sandbox.c b/drivers/tee/sandbox.c
index 00e6f91df987..14df3ce01304 100644
--- a/drivers/tee/sandbox.c
+++ b/drivers/tee/sandbox.c
@@ -7,6 +7,7 @@
#include <sandboxtee.h>
#include <stdio.h>
#include <tee.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <tee/optee_ta_avb.h>
diff --git a/drivers/tee/tee-uclass.c b/drivers/tee/tee-uclass.c
index 76de11c3fb84..f42cc1becb83 100644
--- a/drivers/tee/tee-uclass.c
+++ b/drivers/tee/tee-uclass.c
@@ -10,6 +10,7 @@
#include <tee.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/drivers/thermal/imx_scu_thermal.c b/drivers/thermal/imx_scu_thermal.c
index 9b2f74636a5f..17c92ae0635e 100644
--- a/drivers/thermal/imx_scu_thermal.c
+++ b/drivers/thermal/imx_scu_thermal.c
@@ -15,6 +15,7 @@
#include <dm/device.h>
#include <asm/arch/sci/sci.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 82e8f8e65126..812c2ec07c36 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <malloc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/math64.h>
#include <thermal.h>
#include <imx_thermal.h>
diff --git a/drivers/thermal/imx_tmu.c b/drivers/thermal/imx_tmu.c
index 6ec16a35f278..279ea5a322ea 100644
--- a/drivers/thermal/imx_tmu.c
+++ b/drivers/thermal/imx_tmu.c
@@ -18,6 +18,7 @@
#include <fuse.h>
#include <malloc.h>
#include <thermal.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/thermal/thermal-uclass.c b/drivers/thermal/thermal-uclass.c
index a4ea1e291453..92dc311168be 100644
--- a/drivers/thermal/thermal-uclass.c
+++ b/drivers/thermal/thermal-uclass.c
@@ -10,6 +10,7 @@
#include <fdtdec.h>
#include <malloc.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <linux/list.h>
diff --git a/drivers/timer/arc_timer.c b/drivers/timer/arc_timer.c
index c6771d15966e..592b196cbbc2 100644
--- a/drivers/timer/arc_timer.c
+++ b/drivers/timer/arc_timer.c
@@ -10,6 +10,7 @@
#include <asm/arcregs.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
index 70511697fef7..07459d9c26b4 100644
--- a/drivers/timer/atmel_pit_timer.c
+++ b/drivers/timer/atmel_pit_timer.c
@@ -10,6 +10,7 @@
#include <timer.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define AT91_PIT_VALUE 0xfffff
#define AT91_PIT_PITEN BIT(24) /* Timer Enabled */
diff --git a/drivers/timer/mpc83xx_timer.c b/drivers/timer/mpc83xx_timer.c
index f1eb1a9d115c..aef8666dea05 100644
--- a/drivers/timer/mpc83xx_timer.c
+++ b/drivers/timer/mpc83xx_timer.c
@@ -18,6 +18,7 @@
#include <asm/ptrace.h>
#include <asm/ppc.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c
index 69ed521811d2..7aec7a7d59ea 100644
--- a/drivers/timer/mtk_timer.c
+++ b/drivers/timer/mtk_timer.c
@@ -12,6 +12,7 @@
#include <timer.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define MTK_GPT4_CTRL 0x40
#define MTK_GPT4_CLK 0x44
diff --git a/drivers/timer/nomadik-mtu-timer.c b/drivers/timer/nomadik-mtu-timer.c
index 7ff921385a33..5d5eadc47d79 100644
--- a/drivers/timer/nomadik-mtu-timer.c
+++ b/drivers/timer/nomadik-mtu-timer.c
@@ -17,6 +17,7 @@
#include <timer.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define MTU_NUM_TIMERS 4
diff --git a/drivers/timer/rockchip_timer.c b/drivers/timer/rockchip_timer.c
index 7e7612f154ea..20dddd53e4fb 100644
--- a/drivers/timer/rockchip_timer.c
+++ b/drivers/timer/rockchip_timer.c
@@ -15,6 +15,7 @@
#include <dt-structs.h>
#include <timer.h>
#include <asm/io.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/timer/sti-timer.c b/drivers/timer/sti-timer.c
index ff42056abdd1..2278b049354b 100644
--- a/drivers/timer/sti-timer.c
+++ b/drivers/timer/sti-timer.c
@@ -9,6 +9,7 @@
#include <clk.h>
#include <timer.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <asm/arch-armv7/globaltimer.h>
diff --git a/drivers/timer/stm32_timer.c b/drivers/timer/stm32_timer.c
index c57fa3f55704..96749c8a64f5 100644
--- a/drivers/timer/stm32_timer.c
+++ b/drivers/timer/stm32_timer.c
@@ -11,6 +11,7 @@
#include <timer.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <asm/io.h>
diff --git a/drivers/timer/timer-uclass.c b/drivers/timer/timer-uclass.c
index d90755a7e74f..01b3a42f3e07 100644
--- a/drivers/timer/timer-uclass.c
+++ b/drivers/timer/timer-uclass.c
@@ -14,6 +14,7 @@
#include <errno.h>
#include <timer.h>
#include <linux/err.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/tpm/cr50_i2c.c b/drivers/tpm/cr50_i2c.c
index 24b1e2448603..9ba0466f9298 100644
--- a/drivers/tpm/cr50_i2c.c
+++ b/drivers/tpm/cr50_i2c.c
@@ -22,6 +22,7 @@
#include <asm/arch/iomap.h>
#include <asm/arch/pm.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
enum {
diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c
index 61331726833a..23400235a4cf 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/unaligned/be_byteshift.h>
#include <tpm-v1.h>
diff --git a/drivers/tpm/tpm2_ftpm_tee.c b/drivers/tpm/tpm2_ftpm_tee.c
index 885b3e2c148e..249cf11beff7 100644
--- a/drivers/tpm/tpm2_ftpm_tee.c
+++ b/drivers/tpm/tpm2_ftpm_tee.c
@@ -19,6 +19,7 @@
#include <tpm-v2.h>
#include <tee.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "tpm_tis.h"
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index 437f65cc395b..6b61dbb88b55 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -12,6 +12,7 @@
#include <asm/state.h>
#include <asm/unaligned.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/drivers/tpm/tpm_tis_lpc.c b/drivers/tpm/tpm_tis_lpc.c
index 63b86b131bcc..e6eec6bca9e8 100644
--- a/drivers/tpm/tpm_tis_lpc.c
+++ b/drivers/tpm/tpm_tis_lpc.c
@@ -21,6 +21,7 @@
#include <vsprintf.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define PREFIX "lpc_tpm: "
diff --git a/drivers/tpm/tpm_tis_sandbox.c b/drivers/tpm/tpm_tis_sandbox.c
index 4b1cf36d9b9b..da31ec3ff561 100644
--- a/drivers/tpm/tpm_tis_sandbox.c
+++ b/drivers/tpm/tpm_tis_sandbox.c
@@ -11,6 +11,7 @@
#include <vsprintf.h>
#include <asm/state.h>
#include <asm/unaligned.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/crc.h>
diff --git a/drivers/tpm/tpm_tis_st33zp24_i2c.c b/drivers/tpm/tpm_tis_st33zp24_i2c.c
index bd9c08e06cb9..b5c706b7ccf5 100644
--- a/drivers/tpm/tpm_tis_st33zp24_i2c.c
+++ b/drivers/tpm/tpm_tis_st33zp24_i2c.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <vsprintf.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <asm/unaligned.h>
diff --git a/drivers/tpm/tpm_tis_st33zp24_spi.c b/drivers/tpm/tpm_tis_st33zp24_spi.c
index 2b6b3714087c..33f7392431f5 100644
--- a/drivers/tpm/tpm_tis_st33zp24_spi.c
+++ b/drivers/tpm/tpm_tis_st33zp24_spi.c
@@ -22,6 +22,7 @@
#include <errno.h>
#include <vsprintf.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <asm/unaligned.h>
diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index 8509c65171dc..666a0a547978 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -25,6 +25,7 @@
#include <asm/dma-mapping.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/dma-mapping.h>
diff --git a/drivers/usb/cdns3/cdns3-ti.c b/drivers/usb/cdns3/cdns3-ti.c
index cd7b2113ace8..5130b4c70d23 100644
--- a/drivers/usb/cdns3/cdns3-ti.c
+++ b/drivers/usb/cdns3/cdns3-ti.c
@@ -11,6 +11,7 @@
#include <dm.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/usb/otg.h>
#include <malloc.h>
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index d5fb8a0edb35..135ca1b2af9f 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -20,6 +20,7 @@
#include <dm/devres.h>
#include <dm/lists.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/io.h>
#include <usb.h>
diff --git a/drivers/usb/cdns3/drd.c b/drivers/usb/cdns3/drd.c
index 47874fec29eb..e84fb57b2e02 100644
--- a/drivers/usb/cdns3/drd.c
+++ b/drivers/usb/cdns3/drd.c
@@ -13,6 +13,7 @@
#include <dm.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/usb/otg.h>
diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
index 4fbd450fed38..7be5c8de4e2f 100644
--- a/drivers/usb/cdns3/ep0.c
+++ b/drivers/usb/cdns3/ep0.c
@@ -16,6 +16,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/usb/composite.h>
#include <linux/iopoll.h>
diff --git a/drivers/usb/cdns3/gadget-export.h b/drivers/usb/cdns3/gadget-export.h
index 577469eee961..99066a2adb5f 100644
--- a/drivers/usb/cdns3/gadget-export.h
+++ b/drivers/usb/cdns3/gadget-export.h
@@ -25,4 +25,5 @@ static inline void cdns3_gadget_exit(struct cdns3 *cdns) { }
#endif
+#include <linux/errno.h>
#endif /* __LINUX_CDNS3_GADGET_EXPORT */
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 535935ac7237..e42b82d0c2ba 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -63,6 +63,7 @@
#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/cdns3/host-export.h b/drivers/usb/cdns3/host-export.h
index b498a170b7e8..299fe5749c9d 100644
--- a/drivers/usb/cdns3/host-export.h
+++ b/drivers/usb/cdns3/host-export.h
@@ -25,4 +25,5 @@ static inline void cdns3_host_exit(struct cdns3 *cdns) { }
#endif /* CONFIG_USB_CDNS3_HOST */
+#include <linux/errno.h>
#endif /* __LINUX_CDNS3_HOST_EXPORT */
diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/cdns3/host.c
index b44e7df11319..702fc86e92ec 100644
--- a/drivers/usb/cdns3/host.c
+++ b/drivers/usb/cdns3/host.c
@@ -12,6 +12,7 @@
#include <dm/devres.h>
#include <linux/compat.h>
#include <usb.h>
+#include <linux/errno.h>
#include <usb/xhci.h>
#include "core.h"
diff --git a/drivers/usb/common/fsl-dt-fixup.c b/drivers/usb/common/fsl-dt-fixup.c
index 5382447eb72d..a279c28bdad2 100644
--- a/drivers/usb/common/fsl-dt-fixup.c
+++ b/drivers/usb/common/fsl-dt-fixup.c
@@ -18,6 +18,7 @@
#include <fsl_usb.h>
#include <fdt_support.h>
#include <asm/u-boot.h>
+#include <linux/errno.h>
#include <linux/string.h>
#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 86825565895f..f79f9c931664 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -23,6 +23,7 @@
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/ioport.h>
#include <dm.h>
#include <generic-phy.h>
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c
index c78ac00521d6..54a9ffb9d681 100644
--- a/drivers/usb/dwc3/dwc3-generic.c
+++ b/drivers/usb/dwc3/dwc3-generic.c
@@ -17,6 +17,7 @@
#include <dwc3-uboot.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c
index 6fdf686af8da..999cb11d594e 100644
--- a/drivers/usb/dwc3/dwc3-meson-g12a.c
+++ b/drivers/usb/dwc3/dwc3-meson-g12a.c
@@ -15,6 +15,7 @@
#include <dwc3-uboot.h>
#include <generic-phy.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c
index 9596bf144c37..2d722376efb4 100644
--- a/drivers/usb/dwc3/dwc3-omap.c
+++ b/drivers/usb/dwc3/dwc3-omap.c
@@ -20,6 +20,7 @@
#include <dwc3-omap-uboot.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/usb/dwc3-omap.h>
#include <linux/ioport.h>
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index f9420873bba1..80de10ec1258 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -16,6 +16,7 @@
#include <cpu_func.h>
#include <dm/device_compat.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/string.h>
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index c33e0894e10a..fa338119de62 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -23,6 +23,7 @@
#include <linux/bug.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/usb/dwc3/ti_usb_phy.c b/drivers/usb/dwc3/ti_usb_phy.c
index f8ab06482c92..ea512ea8ffb7 100644
--- a/drivers/usb/dwc3/ti_usb_phy.c
+++ b/drivers/usb/dwc3/ti_usb_phy.c
@@ -23,6 +23,7 @@
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include <asm/arch/sys_proto.h>
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c
index 883f6ae6d39b..e63720f2550f 100644
--- a/drivers/usb/emul/sandbox_flash.c
+++ b/drivers/usb/emul/sandbox_flash.c
@@ -10,6 +10,7 @@
#include <os.h>
#include <scsi.h>
#include <usb.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c
index 21bf3bda48d2..b2dc73e65f70 100644
--- a/drivers/usb/emul/sandbox_hub.c
+++ b/drivers/usb/emul/sandbox_hub.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <usb.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
/* We only support up to 8 */
#define SANDBOX_NUM_PORTS 4
diff --git a/drivers/usb/emul/sandbox_keyb.c b/drivers/usb/emul/sandbox_keyb.c
index 9f4b40895629..1c8de6d37feb 100644
--- a/drivers/usb/emul/sandbox_keyb.c
+++ b/drivers/usb/emul/sandbox_keyb.c
@@ -10,6 +10,7 @@
#include <os.h>
#include <scsi.h>
#include <usb.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/drivers/usb/emul/usb-emul-uclass.c b/drivers/usb/emul/usb-emul-uclass.c
index 9807cbed1651..6b309592f6bb 100644
--- a/drivers/usb/emul/usb-emul-uclass.c
+++ b/drivers/usb/emul/usb-emul-uclass.c
@@ -9,6 +9,7 @@
#include <log.h>
#include <usb.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int copy_to_unicode(char *buff, int length, const char *str)
diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index fe98a581d0d5..de25ba12f61b 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -16,6 +16,7 @@
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <linux/string.h>
#include "usb_ether.h"
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
index 8191b85eb4d6..c1c873c2c2b8 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -14,6 +14,7 @@
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <linux/string.h>
#include "usb_ether.h"
diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c
index 9a7a0d834a13..194753fb278a 100644
--- a/drivers/usb/eth/lan78xx.c
+++ b/drivers/usb/eth/lan78xx.c
@@ -8,6 +8,7 @@
#include <net.h>
#include <usb.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "usb_ether.h"
#include "lan7x.h"
diff --git a/drivers/usb/eth/lan7x.c b/drivers/usb/eth/lan7x.c
index b3bca81059c3..c3c1ebb1cb6b 100644
--- a/drivers/usb/eth/lan7x.c
+++ b/drivers/usb/eth/lan7x.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <usb.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/string.h>
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
index bbc03c7ea586..02a241414ff1 100644
--- a/drivers/usb/eth/mcs7830.c
+++ b/drivers/usb/eth/mcs7830.c
@@ -17,6 +17,7 @@
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
index 1f60fc499b94..da0b285077a6 100644
--- a/drivers/usb/eth/r8152.c
+++ b/drivers/usb/eth/r8152.c
@@ -16,6 +16,7 @@
#include <vsprintf.h>
#include <asm/u-boot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <linux/bitops.h>
#include <linux/string.h>
diff --git a/drivers/usb/eth/r8152_fw.c b/drivers/usb/eth/r8152_fw.c
index f953b0384b88..7e9b13de0447 100644
--- a/drivers/usb/eth/r8152_fw.c
+++ b/drivers/usb/eth/r8152_fw.c
@@ -8,6 +8,7 @@
#include <errno.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "usb_ether.h"
#include "r8152.h"
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index d90850074411..435224c71979 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -20,6 +20,7 @@
#include <asm/u-boot.h>
#include <asm/unaligned.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mii.h>
#include <linux/string.h>
#include "usb_ether.h"
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index 097425b7afa2..54bb0118228c 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -13,6 +13,7 @@
#include <usb.h>
#include <asm/cache.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "usb_ether.h"
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index f353f1a3cd25..d5b3d1d40e4f 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -11,6 +11,7 @@
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/usb/composite.h>
diff --git a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
index 84b46709a58a..6b6fe0a5040b 100644
--- a/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/dwc2_udc_otg_xfer_dma.c
@@ -22,6 +22,7 @@
#include <log.h>
#include <stdio.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
static u8 clear_feature_num;
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index 43a342c5afed..a1f13b6ec22a 100644
--- a/drivers/usb/gadget/f_dfu.c
+++ b/drivers/usb/gadget/f_dfu.c
@@ -20,6 +20,7 @@
#include <log.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 14a710a52384..40648ef38bdb 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -18,6 +18,7 @@
#include <log.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 8723c656e0b5..e0b898db214c 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -250,6 +250,7 @@
#include <vsprintf.h>
#include <dm/devres.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/err.h>
diff --git a/drivers/usb/gadget/f_rockusb.c b/drivers/usb/gadget/f_rockusb.c
index 1705b7a611a8..a852707525a4 100644
--- a/drivers/usb/gadget/f_rockusb.c
+++ b/drivers/usb/gadget/f_rockusb.c
@@ -14,6 +14,7 @@
#include <memalign.h>
#include <part.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 34c393c9f047..fde5c2c690ee 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -23,6 +23,7 @@
#include <log.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
index 142bd99c698d..4a70bdcc5c33 100644
--- a/drivers/usb/gadget/f_thor.c
+++ b/drivers/usb/gadget/f_thor.c
@@ -26,6 +26,7 @@
#include <version.h>
#include <vsprintf.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c
index cd4015f65a00..1a0160b5836c 100644
--- a/drivers/usb/gadget/g_dnl.c
+++ b/drivers/usb/gadget/g_dnl.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <mmc.h>
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h
index 70067afa7d43..e43d96eab361 100644
--- a/drivers/usb/gadget/gadget_chips.h
+++ b/drivers/usb/gadget/gadget_chips.h
@@ -14,6 +14,7 @@
* Ported to U-Boot by: Thomas Smits <ts.smits at gmail.com> and
* Remy Bohmer <linux at bohmer.net>
*/
+#include <linux/errno.h>
#include <linux/string.h>
#ifdef CONFIG_USB_GADGET_NET2280
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 22db49164da8..3e35e0fa45f1 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -32,6 +32,7 @@
#include <asm/io.h>
#include <asm/arch/pxa.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c
index 13c42aabab33..74d66fd77b24 100644
--- a/drivers/usb/gadget/udc/udc-core.c
+++ b/drivers/usb/gadget/udc/udc-core.c
@@ -23,6 +23,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c
index 384aa47a98f4..7fa4aae4d2b7 100644
--- a/drivers/usb/gadget/udc/udc-uclass.c
+++ b/drivers/usb/gadget/udc/udc-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/usb/gadget.h>
diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 62eab821bb67..b8c92f52b2fd 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -23,6 +23,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/regulator.h>
#include <reset.h>
diff --git a/drivers/usb/host/dwc3-of-simple.c b/drivers/usb/host/dwc3-of-simple.c
index e4abc6f3b9be..afd304fba866 100644
--- a/drivers/usb/host/dwc3-of-simple.c
+++ b/drivers/usb/host/dwc3-of-simple.c
@@ -14,6 +14,7 @@
#include <dm.h>
#include <reset.h>
#include <clk.h>
+#include <linux/errno.h>
struct dwc3_of_simple {
struct clk_bulk clks;
diff --git a/drivers/usb/host/dwc3-sti-glue.c b/drivers/usb/host/dwc3-sti-glue.c
index 95514a4c593b..1989881ae84e 100644
--- a/drivers/usb/host/dwc3-sti-glue.c
+++ b/drivers/usb/host/dwc3-sti-glue.c
@@ -17,6 +17,7 @@
#include <reset-uclass.h>
#include <syscon.h>
#include <usb.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/usb/dwc3.h>
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 3b208e8eb228..dc6eb5b9bb6f 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -13,6 +13,7 @@
#include <usb.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
+#include <linux/errno.h>
#include "ehci.h"
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 35bd319de8a1..b929eb9781b1 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -17,6 +17,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb/ehci-ci.h>
#include <hwconfig.h>
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
index 304a3437d56c..b9ad1785ceac 100644
--- a/drivers/usb/host/ehci-generic.c
+++ b/drivers/usb/host/ehci-generic.c
@@ -13,6 +13,7 @@
#include <reset.h>
#include <asm/io.h>
#include <dm.h>
+#include <linux/errno.h>
#include "ehci.h"
#include <power/regulator.h>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index fe6459e4a314..4ef54a53d83f 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -24,6 +24,7 @@
#include <dm/device_compat.h>
#include <linux/compiler.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "ehci.h"
diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c
index 9f6b8a2ae5fa..635f9f252360 100644
--- a/drivers/usb/host/ehci-marvell.c
+++ b/drivers/usb/host/ehci-marvell.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <usb.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "ehci.h"
#include <linux/mbus.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c
index 6492769b2a3e..458472b7b2e2 100644
--- a/drivers/usb/host/ehci-msm.c
+++ b/drivers/usb/host/ehci-msm.c
@@ -12,6 +12,7 @@
#include <errno.h>
#include <stdio.h>
#include <usb.h>
+#include <linux/errno.h>
#include <usb/ehci-ci.h>
#include <usb/ulpi.h>
#include <wait_bit.h>
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 709cb1cff54d..2b7c9cc80d75 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -12,6 +12,7 @@
#include <asm/global_data.h>
#include <linux/compiler.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb/ehci-ci.h>
#include <asm/io.h>
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 51723fca051a..7ca106520dbe 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -13,6 +13,7 @@
#include <asm/global_data.h>
#include <linux/compiler.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <usb/ehci-ci.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index d0b7ac512e80..0cbc8ee75e95 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <usb/ehci-ci.h>
#include <errno.h>
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 05c0f4a196ee..7698c7761fee 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -12,6 +12,7 @@
#include <asm/arch/imx-regs.h>
#include <errno.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "ehci.h"
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 45c3418e7f84..cc5c9406112f 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -17,6 +17,7 @@
#include <usb.h>
#include <vsprintf.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb/ulpi.h>
#include <errno.h>
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index 39d5b1dd9be8..3f140521c9c5 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -21,6 +21,7 @@
#include <asm/mach-imx/iomux-v3.h>
#include <asm/mach-imx/regs-usbphy.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb/ehci-ci.h>
#include <linux/libfdt.h>
diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c
index 6eef3814a149..918e224e761f 100644
--- a/drivers/usb/host/ehci-zynq.c
+++ b/drivers/usb/host/ehci-zynq.c
@@ -12,6 +12,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/sys_proto.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <usb/ehci-ci.h>
#include <usb/ulpi.h>
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c
index e9f87cfb7b0e..f034d50a3826 100644
--- a/drivers/usb/host/ohci-da8xx.c
+++ b/drivers/usb/host/ohci-da8xx.c
@@ -14,6 +14,7 @@
#include <dm/ofnode.h>
#include <generic-phy.h>
#include <reset.h>
+#include <linux/errno.h>
#include "ohci.h"
#include <asm/arch/da8xx-usb.h>
diff --git a/drivers/usb/host/ohci-generic.c b/drivers/usb/host/ohci-generic.c
index b84bf8ac0f7c..ae7066169d33 100644
--- a/drivers/usb/host/ohci-generic.c
+++ b/drivers/usb/host/ohci-generic.c
@@ -12,6 +12,7 @@
#include <dm/ofnode.h>
#include <generic-phy.h>
#include <reset.h>
+#include <linux/errno.h>
#include "ohci.h"
#if !defined(CONFIG_USB_OHCI_NEW)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 598567d60477..3b204efdd690 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -35,6 +35,7 @@
#include <errno.h>
#include <asm/cache.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#if defined(CONFIG_PCI_OHCI)
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 7595813868c6..f977b3336f05 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 8d095c7fe241..36c676a1e5cb 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -17,6 +17,7 @@
#include <dm/device-internal.h>
#include <dm/lists.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
extern bool usb_started; /* flag for the started/stopped USB status */
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
index ee65f51c5d27..3308b7e756a7 100644
--- a/drivers/usb/host/xhci-brcm.c
+++ b/drivers/usb/host/xhci-brcm.c
@@ -8,6 +8,7 @@
#include <fdtdec.h>
#include <usb.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <usb/xhci.h>
#define DRD2U3H_XHC_REGS_AXIWRA 0xC08
diff --git a/drivers/usb/host/xhci-dwc3.c b/drivers/usb/host/xhci-dwc3.c
index fdbf2c83b569..b96aea1e0105 100644
--- a/drivers/usb/host/xhci-dwc3.c
+++ b/drivers/usb/host/xhci-dwc3.c
@@ -15,6 +15,7 @@
#include <usb.h>
#include <dwc3-uboot.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <usb/xhci.h>
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index 32e00378ab70..bc3a9f4d0181 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <stdio.h>
#include <usb.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include <asm/gpio.h>
diff --git a/drivers/usb/host/xhci-rcar.c b/drivers/usb/host/xhci-rcar.c
index 8fc51df3d111..28eea930cc21 100644
--- a/drivers/usb/host/xhci-rcar.c
+++ b/drivers/usb/host/xhci-rcar.c
@@ -15,6 +15,7 @@
#include <wait_bit.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <usb/xhci.h>
#include "xhci-rcar-r8a779x_usb3_v3.h"
diff --git a/drivers/usb/musb-new/am35x.c b/drivers/usb/musb-new/am35x.c
index 410cf042f66e..8d8aa7794670 100644
--- a/drivers/usb/musb-new/am35x.c
+++ b/drivers/usb/musb-new/am35x.c
@@ -29,6 +29,7 @@
#include <asm/omap_musb.h>
#include <linux/bug.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "linux-compat.h"
#endif
diff --git a/drivers/usb/musb-new/da8xx.c b/drivers/usb/musb-new/da8xx.c
index e13a6810b8da..8c44ed2429fb 100644
--- a/drivers/usb/musb-new/da8xx.c
+++ b/drivers/usb/musb-new/da8xx.c
@@ -23,6 +23,7 @@
#include <asm/arch/hardware.h>
#include <asm/arch/da8xx-usb.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/usb/otg.h>
#include <asm/omap_musb.h>
#include <generic-phy.h>
diff --git a/drivers/usb/musb-new/mt85xx.c b/drivers/usb/musb-new/mt85xx.c
index 78b4c93e8609..c5b994d906bf 100644
--- a/drivers/usb/musb-new/mt85xx.c
+++ b/drivers/usb/musb-new/mt85xx.c
@@ -16,6 +16,7 @@
#include <dm/lists.h>
#include <dm/root.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/musb.h>
diff --git a/drivers/usb/musb-new/musb_dsps.c b/drivers/usb/musb-new/musb_dsps.c
index f9d30b5b76dd..14d8cfb70fc7 100644
--- a/drivers/usb/musb-new/musb_dsps.c
+++ b/drivers/usb/musb-new/musb_dsps.c
@@ -35,6 +35,7 @@
#include <time.h>
#include <vsprintf.h>
#include <asm/omap_musb.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "linux-compat.h"
#endif
diff --git a/drivers/usb/musb-new/musb_gadget.c b/drivers/usb/musb-new/musb_gadget.c
index ceac6a82b644..949bea72aae8 100644
--- a/drivers/usb/musb-new/musb_gadget.c
+++ b/drivers/usb/musb-new/musb_gadget.c
@@ -25,6 +25,7 @@
#include <common.h>
#include <vsprintf.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/ch9.h>
diff --git a/drivers/usb/musb-new/musb_gadget_ep0.c b/drivers/usb/musb-new/musb_gadget_ep0.c
index 22de98559d9c..769aa25f1759 100644
--- a/drivers/usb/musb-new/musb_gadget_ep0.c
+++ b/drivers/usb/musb-new/musb_gadget_ep0.c
@@ -19,6 +19,7 @@
#include <linux/interrupt.h>
#else
#include <common.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "linux-compat.h"
#include <asm/processor.h>
diff --git a/drivers/usb/musb-new/omap2430.c b/drivers/usb/musb-new/omap2430.c
index e8bc3f33597f..b609034184fa 100644
--- a/drivers/usb/musb-new/omap2430.c
+++ b/drivers/usb/musb-new/omap2430.c
@@ -18,6 +18,7 @@
#include <dm/device_compat.h>
#include <dm/lists.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/usb/otg.h>
#include <asm/omap_common.h>
diff --git a/drivers/usb/musb-new/pic32.c b/drivers/usb/musb-new/pic32.c
index b3905660c797..b4ee18442239 100644
--- a/drivers/usb/musb-new/pic32.c
+++ b/drivers/usb/musb-new/pic32.c
@@ -16,6 +16,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/usb/musb.h>
#include "linux-compat.h"
diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
index 20d968f8497e..1ab74d4be394 100644
--- a/drivers/usb/musb-new/sunxi.c
+++ b/drivers/usb/musb-new/sunxi.c
@@ -33,6 +33,7 @@
#include <dm/root.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/musb.h>
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c
index bbec87743104..e4382a30969d 100644
--- a/drivers/usb/musb-new/ti-musb.c
+++ b/drivers/usb/musb-new/ti-musb.c
@@ -13,6 +13,7 @@
#include <malloc.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <linux/usb/otg.h>
diff --git a/drivers/video/am335x-fb.c b/drivers/video/am335x-fb.c
index 4e0d9c2b0981..4d74e96e2a3f 100644
--- a/drivers/video/am335x-fb.c
+++ b/drivers/video/am335x-fb.c
@@ -26,6 +26,7 @@
#include <asm/utils.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "am335x-fb.h"
diff --git a/drivers/video/atmel_hlcdfb.c b/drivers/video/atmel_hlcdfb.c
index 13dc28412c76..bee082508b6d 100644
--- a/drivers/video/atmel_hlcdfb.c
+++ b/drivers/video/atmel_hlcdfb.c
@@ -23,6 +23,7 @@
#include <wait_bit.h>
#include <atmel_hlcdc.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#if defined(CONFIG_LCD_LOGO)
#include <bmp_logo.h>
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
index e5e0aeec3502..20b9ba661c2d 100644
--- a/drivers/video/atmel_lcdfb.c
+++ b/drivers/video/atmel_lcdfb.c
@@ -20,6 +20,7 @@
#include <bmp_layout.h>
#include <atmel_lcdc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/backlight-uclass.c b/drivers/video/backlight-uclass.c
index 0aadf8a1f974..60cc206c5fd6 100644
--- a/drivers/video/backlight-uclass.c
+++ b/drivers/video/backlight-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <backlight.h>
+#include <linux/errno.h>
int backlight_enable(struct udevice *dev)
{
diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c
index 0888cb001971..7d2a452fd6fd 100644
--- a/drivers/video/bcm2835.c
+++ b/drivers/video/bcm2835.c
@@ -10,6 +10,7 @@
#include <asm/arch/mbox.h>
#include <asm/arch/msg.h>
#include <asm/cache.h>
+#include <linux/errno.h>
static int bcm2835_video_probe(struct udevice *dev)
{
diff --git a/drivers/video/bridge/anx6345.c b/drivers/video/bridge/anx6345.c
index 5d76cedbcea0..e7c33e6a18b4 100644
--- a/drivers/video/bridge/anx6345.c
+++ b/drivers/video/bridge/anx6345.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <video_bridge.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "../anx98xx-edp.h"
diff --git a/drivers/video/bridge/ps862x.c b/drivers/video/bridge/ps862x.c
index 7e9c6da4545f..b6f3e300f352 100644
--- a/drivers/video/bridge/ps862x.c
+++ b/drivers/video/bridge/ps862x.c
@@ -12,6 +12,7 @@
#include <video_bridge.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/regulator.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/bridge/video-bridge-uclass.c b/drivers/video/bridge/video-bridge-uclass.c
index 389b02cdcba2..d606342d8472 100644
--- a/drivers/video/bridge/video-bridge-uclass.c
+++ b/drivers/video/bridge/video-bridge-uclass.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <video_bridge.h>
#include <linux/delay.h>
+#include <linux/errno.h>
int video_bridge_set_backlight(struct udevice *dev, int percent)
{
diff --git a/drivers/video/broadwell_igd.c b/drivers/video/broadwell_igd.c
index 7a282be660f9..77a4dc158304 100644
--- a/drivers/video/broadwell_igd.c
+++ b/drivers/video/broadwell_igd.c
@@ -24,6 +24,7 @@
#include <asm/arch/iomap.h>
#include <asm/arch/pch.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "i915_reg.h"
struct broadwell_igd_priv {
diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c
index 04f022491e52..5b51252aaa62 100644
--- a/drivers/video/console_normal.c
+++ b/drivers/video/console_normal.c
@@ -12,6 +12,7 @@
#include <video.h>
#include <video_console.h>
#include <video_font.h> /* Get font data, width and height */
+#include <linux/errno.h>
static int console_normal_set_row(struct udevice *dev, uint row, int clr)
{
diff --git a/drivers/video/console_rotate.c b/drivers/video/console_rotate.c
index 36c8d0609d87..3649bd4487e5 100644
--- a/drivers/video/console_rotate.c
+++ b/drivers/video/console_rotate.c
@@ -10,6 +10,7 @@
#include <video.h>
#include <video_console.h>
#include <video_font.h> /* Get font data, width and height */
+#include <linux/errno.h>
static int console_set_row_1(struct udevice *dev, uint row, int clr)
{
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c
index 26093408453a..17e040bc9261 100644
--- a/drivers/video/console_truetype.c
+++ b/drivers/video/console_truetype.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <video.h>
#include <video_console.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* Functions needed by stb_truetype.h */
diff --git a/drivers/video/coreboot.c b/drivers/video/coreboot.c
index 6914162d3acf..e29b0651a67a 100644
--- a/drivers/video/coreboot.c
+++ b/drivers/video/coreboot.c
@@ -9,6 +9,7 @@
#include <vbe.h>
#include <video.h>
#include <asm/arch/sysinfo.h>
+#include <linux/errno.h>
static int save_vesa_mode(struct cb_framebuffer *fb,
struct vesa_mode_info *vesa)
diff --git a/drivers/video/display-uclass.c b/drivers/video/display-uclass.c
index 1a29ce5d8589..8b49a7ba028c 100644
--- a/drivers/video/display-uclass.c
+++ b/drivers/video/display-uclass.c
@@ -8,6 +8,7 @@
#include <display.h>
#include <edid.h>
#include <errno.h>
+#include <linux/errno.h>
int display_read_edid(struct udevice *dev, u8 *buf, int buf_size)
{
diff --git a/drivers/video/dsi-host-uclass.c b/drivers/video/dsi-host-uclass.c
index 1db1f88a1799..78e3d94e3e7d 100644
--- a/drivers/video/dsi-host-uclass.c
+++ b/drivers/video/dsi-host-uclass.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <dm.h>
#include <dsi_host.h>
+#include <linux/errno.h>
int dsi_host_init(struct udevice *dev,
struct mipi_dsi_device *device,
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index 547dfc4b81c6..1a2d2b3b7f5d 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -22,6 +22,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <video_bridge.h>
#include <linux/string.h>
diff --git a/drivers/video/efi.c b/drivers/video/efi.c
index 489998f3625f..aa67cf17ad0a 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <vbe.h>
#include <video.h>
+#include <linux/errno.h>
struct pixel {
u8 pos;
diff --git a/drivers/video/exynos/exynos_dp.c b/drivers/video/exynos/exynos_dp.c
index d63d9effb007..72333b470108 100644
--- a/drivers/video/exynos/exynos_dp.c
+++ b/drivers/video/exynos/exynos_dp.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <malloc.h>
#include <video_bridge.h>
diff --git a/drivers/video/exynos/exynos_dp_lowlevel.c b/drivers/video/exynos/exynos_dp_lowlevel.c
index efa3b924af16..c87e18f1dadf 100644
--- a/drivers/video/exynos/exynos_dp_lowlevel.c
+++ b/drivers/video/exynos/exynos_dp_lowlevel.c
@@ -15,6 +15,7 @@
#include <asm/arch/dp_info.h>
#include <asm/arch/dp.h>
#include <fdtdec.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include "exynos_dp_lowlevel.h"
diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index 1d5ed38bf44f..a21c185cc792 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/compat.h>
#include <linux/err.h>
diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c
index ab7d61afc88b..26e5d24314bb 100644
--- a/drivers/video/exynos/exynos_mipi_dsi_common.c
+++ b/drivers/video/exynos/exynos_mipi_dsi_common.c
@@ -13,6 +13,7 @@
#include <linux/err.h>
#include <asm/arch/dsim.h>
#include <asm/arch/mipi_dsim.h>
+#include <linux/errno.h>
#include "exynos_mipi_dsi_lowlevel.h"
diff --git a/drivers/video/fsl_dcu_fb.c b/drivers/video/fsl_dcu_fb.c
index eaf4892b0484..be6b62bfa838 100644
--- a/drivers/video/fsl_dcu_fb.c
+++ b/drivers/video/fsl_dcu_fb.c
@@ -15,6 +15,7 @@
#include <dm.h>
#include <fdt_support.h>
#include <fsl_dcu_fb.h>
+#include <linux/errno.h>
#include <linux/fb.h>
#include <malloc.h>
#include <video.h>
diff --git a/drivers/video/hitachi_tx18d42vm_lcd.c b/drivers/video/hitachi_tx18d42vm_lcd.c
index 752bc62eb68a..fd51761485d7 100644
--- a/drivers/video/hitachi_tx18d42vm_lcd.c
+++ b/drivers/video/hitachi_tx18d42vm_lcd.c
@@ -9,6 +9,7 @@
#include <malloc.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <asm/gpio.h>
#include <errno.h>
diff --git a/drivers/video/ihs_video_out.c b/drivers/video/ihs_video_out.c
index 2124b826d28d..dcbfbde688ff 100644
--- a/drivers/video/ihs_video_out.c
+++ b/drivers/video/ihs_video_out.c
@@ -16,6 +16,7 @@
#include <regmap.h>
#include <video_osd.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
static const uint MAX_X_CHARS = 53;
diff --git a/drivers/video/ivybridge_igd.c b/drivers/video/ivybridge_igd.c
index d4247ee6406d..47aa55ebdfcb 100644
--- a/drivers/video/ivybridge_igd.c
+++ b/drivers/video/ivybridge_igd.c
@@ -21,6 +21,7 @@
#include <asm/arch/pch.h>
#include <asm/arch/sandybridge.h>
#include <linux/delay.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/lg4573.c b/drivers/video/lg4573.c
index f91ee7363f50..7d4ddca1573e 100644
--- a/drivers/video/lg4573.c
+++ b/drivers/video/lg4573.c
@@ -17,6 +17,7 @@
#include <spi.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define PWR_ON_DELAY_MSECS 120
diff --git a/drivers/video/logicore_dp_tx.c b/drivers/video/logicore_dp_tx.c
index 45eba82c4095..938455c0e4a6 100644
--- a/drivers/video/logicore_dp_tx.c
+++ b/drivers/video/logicore_dp_tx.c
@@ -16,6 +16,7 @@
#include <errno.h>
#include <stdio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "axi.h"
diff --git a/drivers/video/mali_dp.c b/drivers/video/mali_dp.c
index 778a9a917ddd..44841a9f9296 100644
--- a/drivers/video/mali_dp.c
+++ b/drivers/video/mali_dp.c
@@ -21,6 +21,7 @@
#include <clk.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <linux/string.h>
diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c
index ec550b57fdab..0fa1178415a9 100644
--- a/drivers/video/meson/meson_dw_hdmi.c
+++ b/drivers/video/meson/meson_dw_hdmi.c
@@ -14,6 +14,7 @@
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <power/regulator.h>
#include <clk.h>
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index 2d095c6a28eb..84171befb993 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -14,6 +14,7 @@
#include <log.h>
#include <part.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
#include <asm/arch/mem.h>
#include <dm/device-internal.h>
diff --git a/drivers/video/mipi_dsi.c b/drivers/video/mipi_dsi.c
index 5caa6a6fef6c..7f9e2c8357fb 100644
--- a/drivers/video/mipi_dsi.c
+++ b/drivers/video/mipi_dsi.c
@@ -39,6 +39,7 @@
#include <mipi_display.h>
#include <mipi_dsi.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/drivers/video/mvebu_lcd.c b/drivers/video/mvebu_lcd.c
index f3cb2bfb480c..142ae2355998 100644
--- a/drivers/video/mvebu_lcd.c
+++ b/drivers/video/mvebu_lcd.c
@@ -12,6 +12,7 @@
#include <asm/cache.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/mbus.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/video/nexell/s5pxx18_dp.c b/drivers/video/nexell/s5pxx18_dp.c
index 2248f4790575..e857b004d914 100644
--- a/drivers/video/nexell/s5pxx18_dp.c
+++ b/drivers/video/nexell/s5pxx18_dp.c
@@ -12,6 +12,7 @@
#include <asm/arch/reset.h>
#include <asm/arch/nexell.h>
#include <asm/arch/display.h>
+#include <linux/errno.h>
#include "soc/s5pxx18_soc_disptop.h"
#include "soc/s5pxx18_soc_dpc.h"
diff --git a/drivers/video/nexell/s5pxx18_dp_hdmi.c b/drivers/video/nexell/s5pxx18_dp_hdmi.c
index 3f1fb8a5757b..087cb11f916f 100644
--- a/drivers/video/nexell/s5pxx18_dp_hdmi.c
+++ b/drivers/video/nexell/s5pxx18_dp_hdmi.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
#include <log.h>
+#include <linux/errno.h>
#include <asm/arch/nexell.h>
#include <asm/arch/tieoff.h>
diff --git a/drivers/video/nexell/s5pxx18_dp_lvds.c b/drivers/video/nexell/s5pxx18_dp_lvds.c
index f8ea63fdf1b3..cc95de13f511 100644
--- a/drivers/video/nexell/s5pxx18_dp_lvds.c
+++ b/drivers/video/nexell/s5pxx18_dp_lvds.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
#include <errno.h>
+#include <linux/errno.h>
#include <asm/arch/nexell.h>
#include <asm/arch/reset.h>
diff --git a/drivers/video/nexell/s5pxx18_dp_mipi.c b/drivers/video/nexell/s5pxx18_dp_mipi.c
index 670272b26802..0eb1ebb377a3 100644
--- a/drivers/video/nexell/s5pxx18_dp_mipi.c
+++ b/drivers/video/nexell/s5pxx18_dp_mipi.c
@@ -8,6 +8,7 @@
#include <config.h>
#include <common.h>
#include <errno.h>
+#include <linux/errno.h>
#include <asm/arch/nexell.h>
#include <asm/arch/tieoff.h>
diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c
index 4101e0962a9c..1592e9b46ab9 100644
--- a/drivers/video/nexell_display.c
+++ b/drivers/video/nexell_display.c
@@ -22,6 +22,7 @@
#include <asm/io.h>
#include <asm/arch/display.h>
#include <asm/arch/display_dev.h>
+#include <linux/errno.h>
#include "videomodes.h"
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/orisetech_otm8009a.c b/drivers/video/orisetech_otm8009a.c
index acb8f384a882..b6a8527533cb 100644
--- a/drivers/video/orisetech_otm8009a.c
+++ b/drivers/video/orisetech_otm8009a.c
@@ -15,6 +15,7 @@
#include <asm/gpio.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/drivers/video/panel-uclass.c b/drivers/video/panel-uclass.c
index 246d1b2836d7..8bdba13c457a 100644
--- a/drivers/video/panel-uclass.c
+++ b/drivers/video/panel-uclass.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <dm.h>
#include <panel.h>
+#include <linux/errno.h>
int panel_enable_backlight(struct udevice *dev)
{
diff --git a/drivers/video/pwm_backlight.c b/drivers/video/pwm_backlight.c
index 468a5703bdbd..6aacb067ad3a 100644
--- a/drivers/video/pwm_backlight.c
+++ b/drivers/video/pwm_backlight.c
@@ -14,6 +14,7 @@
#include <pwm.h>
#include <asm/gpio.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <power/regulator.h>
/**
diff --git a/drivers/video/raydium-rm68200.c b/drivers/video/raydium-rm68200.c
index 1efd1607f63e..d31cbb4c34a9 100644
--- a/drivers/video/raydium-rm68200.c
+++ b/drivers/video/raydium-rm68200.c
@@ -15,6 +15,7 @@
#include <asm/gpio.h>
#include <dm/device_compat.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <power/regulator.h>
diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c
index b232ff0b76b2..f842dfeb1d77 100644
--- a/drivers/video/rockchip/rk3288_mipi.c
+++ b/drivers/video/rockchip/rk3288_mipi.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <panel.h>
#include <regmap.h>
+#include <linux/errno.h>
#include "rk_mipi.h"
#include <syscon.h>
#include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c
index 113708d97e5a..efcd8614c035 100644
--- a/drivers/video/rockchip/rk3399_mipi.c
+++ b/drivers/video/rockchip/rk3399_mipi.c
@@ -11,6 +11,7 @@
#include <log.h>
#include <panel.h>
#include <regmap.h>
+#include <linux/errno.h>
#include "rk_mipi.h"
#include <syscon.h>
#include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_edp.c b/drivers/video/rockchip/rk_edp.c
index 575aee1cdb19..d6478d4f3986 100644
--- a/drivers/video/rockchip/rk_edp.c
+++ b/drivers/video/rockchip/rk_edp.c
@@ -24,6 +24,7 @@
#include <asm/arch-rockchip/hardware.h>
#include <dt-bindings/clock/rk3288-cru.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define MAX_CR_LOOP 5
diff --git a/drivers/video/rockchip/rk_lvds.c b/drivers/video/rockchip/rk_lvds.c
index 24f3caabb011..c9890feac0f1 100644
--- a/drivers/video/rockchip/rk_lvds.c
+++ b/drivers/video/rockchip/rk_lvds.c
@@ -20,6 +20,7 @@
#include <asm/arch-rockchip/lvds_rk3288.h>
#include <dt-bindings/clock/rk3288-cru.h>
#include <dt-bindings/video/rk3288.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c
index 2e235cb6c2cd..2438d44cf3f4 100644
--- a/drivers/video/rockchip/rk_mipi.c
+++ b/drivers/video/rockchip/rk_mipi.c
@@ -12,6 +12,7 @@
#include <panel.h>
#include <regmap.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include "rk_mipi.h"
#include <syscon.h>
#include <asm/gpio.h>
diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c
index 7e864698697a..41541ef8222f 100644
--- a/drivers/video/rockchip/rk_vop.c
+++ b/drivers/video/rockchip/rk_vop.c
@@ -23,6 +23,7 @@
#include <dm/uclass-internal.h>
#include <linux/bitops.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include "rk_vop.h"
diff --git a/drivers/video/sandbox_osd.c b/drivers/video/sandbox_osd.c
index 9fb1224bf596..ab6abae520e8 100644
--- a/drivers/video/sandbox_osd.c
+++ b/drivers/video/sandbox_osd.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <malloc.h>
#include <video_osd.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "sandbox_osd.h"
diff --git a/drivers/video/simple_panel.c b/drivers/video/simple_panel.c
index 6c624c376991..74ae68ea3ad9 100644
--- a/drivers/video/simple_panel.c
+++ b/drivers/video/simple_panel.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <panel.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <power/regulator.h>
struct simple_panel_priv {
diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c
index c545c79ced85..d722832f3eb5 100644
--- a/drivers/video/simplefb.c
+++ b/drivers/video/simplefb.c
@@ -11,6 +11,7 @@
#include <stdio.h>
#include <video.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
static int simple_video_probe(struct udevice *dev)
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index e77a0f478a6e..617d900343ca 100644
--- a/drivers/video/stm32/stm32_dsi.c
+++ b/drivers/video/stm32/stm32_dsi.c
@@ -25,6 +25,7 @@
#include <dm/device_compat.h>
#include <dm/lists.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
#include <power/regulator.h>
diff --git a/drivers/video/stm32/stm32_ltdc.c b/drivers/video/stm32/stm32_ltdc.c
index d2ac2e57c8a1..3767792a399f 100644
--- a/drivers/video/stm32/stm32_ltdc.c
+++ b/drivers/video/stm32/stm32_ltdc.c
@@ -20,6 +20,7 @@
#include <dm/device-internal.h>
#include <dm/device_compat.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/printk.h>
struct stm32_ltdc_priv {
diff --git a/drivers/video/sunxi/sunxi_de2.c b/drivers/video/sunxi/sunxi_de2.c
index 6e3999649d31..13a23f4ff63e 100644
--- a/drivers/video/sunxi/sunxi_de2.c
+++ b/drivers/video/sunxi/sunxi_de2.c
@@ -22,6 +22,7 @@
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "simplefb_common.h"
diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
index 07a63e7570ec..8285ccd70a45 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <asm/arch/clock.h>
diff --git a/drivers/video/sunxi/sunxi_lcd.c b/drivers/video/sunxi/sunxi_lcd.c
index c39438ff09af..841ef4334930 100644
--- a/drivers/video/sunxi/sunxi_lcd.c
+++ b/drivers/video/sunxi/sunxi_lcd.c
@@ -18,6 +18,7 @@
#include <asm/arch/lcdc.h>
#include <asm/arch/gpio.h>
#include <asm/gpio.h>
+#include <linux/errno.h>
#include <linux/string.h>
struct sunxi_lcd_priv {
diff --git a/drivers/video/tda19988.c b/drivers/video/tda19988.c
index 48c291291923..bead13f29344 100644
--- a/drivers/video/tda19988.c
+++ b/drivers/video/tda19988.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/*
* TDA19988 uses paged registers. We encode the page# in the upper
diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 5e03aab67bb5..f10c509345d0 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -17,6 +17,7 @@
#include <asm/system.h>
#include <asm/gpio.h>
#include <asm/io.h>
+#include <linux/errno.h>
#include <asm/arch/clock.h>
#include <asm/arch/funcmux.h>
diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c
index 1c47b133c856..c16110f1191e 100644
--- a/drivers/video/tegra124/display.c
+++ b/drivers/video/tegra124/display.c
@@ -25,6 +25,7 @@
#include <asm/arch-tegra/dc.h>
#include <dm/uclass-internal.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include "displayport.h"
/* return in 1000ths of a Hertz */
diff --git a/drivers/video/tegra124/dp.c b/drivers/video/tegra124/dp.c
index 9c5ce04c3760..52b06f32ea85 100644
--- a/drivers/video/tegra124/dp.c
+++ b/drivers/video/tegra124/dp.c
@@ -16,6 +16,7 @@
#include <asm/io.h>
#include <asm/arch-tegra/dc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "display.h"
#include "edid.h"
diff --git a/drivers/video/tegra124/sor.c b/drivers/video/tegra124/sor.c
index 345974f465b4..17a1f75a9bf0 100644
--- a/drivers/video/tegra124/sor.c
+++ b/drivers/video/tegra124/sor.c
@@ -17,6 +17,7 @@
#include <asm/arch/clock.h>
#include <asm/arch-tegra/dc.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "displayport.h"
#include "sor.h"
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index 128fa88648f5..7262cc0a65ce 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -17,6 +17,7 @@
#include <video_font.h> /* Bitmap font for code page 437 */
#include <vsprintf.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 398f1a97e046..722a9c8765a6 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -24,6 +24,7 @@
#ifdef CONFIG_SANDBOX
#include <asm/sdl.h>
#endif
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 802d84a88603..e854e3a3bfec 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -13,6 +13,7 @@
#include <video.h>
#include <watchdog.h>
#include <asm/unaligned.h>
+#include <linux/errno.h>
#ifdef CONFIG_VIDEO_BMP_RLE8
#define BMP_RLE8_ESCAPE 0
diff --git a/drivers/video/videomodes.c b/drivers/video/videomodes.c
index ba0fa3589f6b..f14fe3bb9e66 100644
--- a/drivers/video/videomodes.c
+++ b/drivers/video/videomodes.c
@@ -64,6 +64,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "videomodes.h"
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 50e143bb9e55..da0945b5c60a 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -24,6 +24,7 @@
#include <vsprintf.h>
#include <dm/lists.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/string.h>
static const char *const virtio_drv_name[VIRTIO_ID_MAX_NUM] = {
diff --git a/drivers/virtio/virtio_blk.c b/drivers/virtio/virtio_blk.c
index 95b7360656a3..5117b9251260 100644
--- a/drivers/virtio/virtio_blk.c
+++ b/drivers/virtio/virtio_blk.c
@@ -12,6 +12,7 @@
#include <virtio.h>
#include <virtio_ring.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include "virtio_blk.h"
struct virtio_blk_priv {
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 50f79dcb3b1d..42baf5c9fd2d 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -16,6 +16,7 @@
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/string.h>
#include "virtio_mmio.h"
diff --git a/drivers/virtio/virtio_net.c b/drivers/virtio/virtio_net.c
index a16268f9d27b..277d4832fbb2 100644
--- a/drivers/virtio/virtio_net.c
+++ b/drivers/virtio/virtio_net.c
@@ -10,6 +10,7 @@
#include <virtio_types.h>
#include <virtio.h>
#include <virtio_ring.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "virtio_net.h"
diff --git a/drivers/virtio/virtio_pci_legacy.c b/drivers/virtio/virtio_pci_legacy.c
index 59deadeec33a..bef5dd1ca3cc 100644
--- a/drivers/virtio/virtio_pci_legacy.c
+++ b/drivers/virtio/virtio_pci_legacy.c
@@ -18,6 +18,7 @@
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include "virtio_pci.h"
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index cc3378d87583..9edb271e929a 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -19,6 +19,7 @@
#include <linux/compat.h>
#include <linux/delay.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <linux/string.h>
#include "virtio_pci.h"
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index f058b2f8de8c..76dc7d3a7620 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -16,6 +16,7 @@
#include <virtio_ring.h>
#include <linux/bug.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/string.h>
int virtqueue_add(struct virtqueue *vq, struct virtio_sg *sgs[],
diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c
index 1e5589f004c6..8fb04b8b39ec 100644
--- a/drivers/virtio/virtio_sandbox.c
+++ b/drivers/virtio/virtio_sandbox.c
@@ -14,6 +14,7 @@
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
struct virtio_sandbox_priv {
diff --git a/drivers/w1-eeprom/ds2502.c b/drivers/w1-eeprom/ds2502.c
index 42a3560c2372..167351055afd 100644
--- a/drivers/w1-eeprom/ds2502.c
+++ b/drivers/w1-eeprom/ds2502.c
@@ -26,6 +26,7 @@
#include <linux/err.h>
#include <w1-eeprom.h>
#include <w1.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define DS2502_PAGE_SIZE 32
diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c
index 8a63f614c58d..07e1c12e5ce8 100644
--- a/drivers/w1-eeprom/w1-eeprom-uclass.c
+++ b/drivers/w1-eeprom/w1-eeprom-uclass.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <w1.h>
#include <w1-eeprom.h>
+#include <linux/errno.h>
#include <dm/device-internal.h>
diff --git a/drivers/w1/mxc_w1.c b/drivers/w1/mxc_w1.c
index 8e6372f0bede..92b18606c824 100644
--- a/drivers/w1/mxc_w1.c
+++ b/drivers/w1/mxc_w1.c
@@ -23,6 +23,7 @@
#include <dm/device_compat.h>
#include <linux/bitops.h>
#include <linux/delay.h>
+#include <linux/errno.h>
#include <linux/io.h>
#include <w1.h>
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index 61887bee1dea..a40beaefd67c 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <w1.h>
#include <w1-eeprom.h>
+#include <linux/errno.h>
#include <dm/device-internal.h>
diff --git a/drivers/watchdog/armada-37xx-wdt.c b/drivers/watchdog/armada-37xx-wdt.c
index 7af680a5c250..b845e2b2e3d9 100644
--- a/drivers/watchdog/armada-37xx-wdt.c
+++ b/drivers/watchdog/armada-37xx-wdt.c
@@ -13,6 +13,7 @@
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
#include <dm/device_compat.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index a5cbc4309cc3..c116a011263d 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -24,6 +24,7 @@
#include <dm.h>
#include <errno.h>
#include <wdt.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/bcm6345_wdt.c b/drivers/watchdog/bcm6345_wdt.c
index ee77f49a9445..5999561efd22 100644
--- a/drivers/watchdog/bcm6345_wdt.c
+++ b/drivers/watchdog/bcm6345_wdt.c
@@ -13,6 +13,7 @@
#include <wdt.h>
#include <clk.h>
#include <asm/io.h>
+#include <linux/errno.h>
/* WDT Value register */
#define WDT_VAL_REG 0x0
diff --git a/drivers/watchdog/cortina_wdt.c b/drivers/watchdog/cortina_wdt.c
index 7ab9d7b2db97..0f60b3a63220 100644
--- a/drivers/watchdog/cortina_wdt.c
+++ b/drivers/watchdog/cortina_wdt.c
@@ -10,6 +10,7 @@
#include <asm/io.h>
#include <wdt.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define CA_WDT_CTRL 0x00
#define CA_WDT_PS 0x04
diff --git a/drivers/watchdog/designware_wdt.c b/drivers/watchdog/designware_wdt.c
index 12f09a7a3920..b2d17f6e335d 100644
--- a/drivers/watchdog/designware_wdt.c
+++ b/drivers/watchdog/designware_wdt.c
@@ -11,6 +11,7 @@
#include <asm/io.h>
#include <asm/utils.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define DW_WDT_CR 0x00
#define DW_WDT_TORR 0x04
diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
index b90c2daecee6..e17d9217cc0a 100644
--- a/drivers/watchdog/imx_watchdog.c
+++ b/drivers/watchdog/imx_watchdog.c
@@ -17,6 +17,7 @@
#endif
#include <fsl_wdog.h>
#include <div64.h>
+#include <linux/errno.h>
#define TIMEOUT_MAX 128000
#define TIMEOUT_MIN 500
diff --git a/drivers/watchdog/mpc8xx_wdt.c b/drivers/watchdog/mpc8xx_wdt.c
index 45e679d35159..1640cd46bb7a 100644
--- a/drivers/watchdog/mpc8xx_wdt.c
+++ b/drivers/watchdog/mpc8xx_wdt.c
@@ -11,6 +11,7 @@
#include <asm/cpm_8xx.h>
#include <asm/io.h>
#include <asm/ppc.h>
+#include <linux/errno.h>
#include <linux/string.h>
void hw_watchdog_reset(void)
diff --git a/drivers/watchdog/mt7621_wdt.c b/drivers/watchdog/mt7621_wdt.c
index ff5c3243ce73..d033d95b6f5f 100644
--- a/drivers/watchdog/mt7621_wdt.c
+++ b/drivers/watchdog/mt7621_wdt.c
@@ -14,6 +14,7 @@
#include <wdt.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/io.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c
index a636cff354d8..2a38bef43ec6 100644
--- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c
@@ -12,6 +12,7 @@
#include <wdt.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#define MTK_WDT_MODE 0x00
#define MTK_WDT_LENGTH 0x04
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 9059a4c6105b..9d3896a5d990 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -46,6 +46,7 @@
#include <wdt.h>
#include <dm.h>
#include <errno.h>
+#include <linux/errno.h>
/* Hardware timeout in seconds */
#define WDT_HW_TIMEOUT 60
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 3284321299d0..804a76811070 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -19,6 +19,7 @@
#include <wdt.h>
#include <asm/global_data.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
diff --git a/drivers/watchdog/stm32mp_wdt.c b/drivers/watchdog/stm32mp_wdt.c
index 89ce5588a37e..c45dbdc9bdbd 100644
--- a/drivers/watchdog/stm32mp_wdt.c
+++ b/drivers/watchdog/stm32mp_wdt.c
@@ -11,6 +11,7 @@
#include <wdt.h>
#include <asm/io.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
#include <linux/iopoll.h>
#include <linux/printk.h>
diff --git a/drivers/watchdog/wdt-uclass.c b/drivers/watchdog/wdt-uclass.c
index 0ef303f1f2d1..e2791a0dba0d 100644
--- a/drivers/watchdog/wdt-uclass.c
+++ b/drivers/watchdog/wdt-uclass.c
@@ -14,6 +14,7 @@
#include <asm/global_data.h>
#include <dm/device-internal.h>
#include <dm/lists.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index ea4311c8ce1a..5047cd045615 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -13,6 +13,7 @@
#include <log.h>
#include <wdt.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/io.h>
#define XWT_CSR0_WRS_MASK 0x00000008 /* Reset status Mask */
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c
index d8a585a48306..a486e032624d 100644
--- a/drivers/watchdog/xilinx_wwdt.c
+++ b/drivers/watchdog/xilinx_wwdt.c
@@ -14,6 +14,7 @@
#include <regmap.h>
#include <wdt.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/io.h>
/* Refresh Register Masks */
diff --git a/env/common.c b/env/common.c
index 4df445eb2c4f..b8ac49cf4998 100644
--- a/env/common.c
+++ b/env/common.c
@@ -16,6 +16,7 @@
#include <sort.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/stddef.h>
#include <search.h>
diff --git a/env/env.c b/env/env.c
index c289af4c6a44..60c0295affbf 100644
--- a/env/env.c
+++ b/env/env.c
@@ -12,6 +12,7 @@
#include <asm/global_data.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/ext4.c b/env/ext4.c
index a51c7c6eff38..59ed02c0ca17 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -21,6 +21,7 @@
#include <common.h>
#include <part.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <command.h>
diff --git a/env/fat.c b/env/fat.c
index e95af7e19d34..c4c09fee02be 100644
--- a/env/fat.c
+++ b/env/fat.c
@@ -19,6 +19,7 @@
#include <mmc.h>
#include <stdio.h>
#include <asm/cache.h>
+#include <linux/errno.h>
#include <linux/stddef.h>
#include <linux/string.h>
diff --git a/env/mmc.c b/env/mmc.c
index 4afabf673653..63287ec398e9 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <command.h>
diff --git a/env/nand.c b/env/nand.c
index e8d226ee7153..730baf0095c1 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -19,6 +19,7 @@
#include <env_internal.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/env/remote.c b/env/remote.c
index 131ac83584fc..0d0261767944 100644
--- a/env/remote.c
+++ b/env/remote.c
@@ -10,6 +10,7 @@
#include <env_internal.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/stddef.h>
#include <u-boot/crc.h>
diff --git a/env/sata.c b/env/sata.c
index d88771b27e21..56109397d533 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <command.h>
#include <env.h>
diff --git a/env/sf.c b/env/sf.c
index 077d82f8e77f..4bf67dcc8a9d 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -23,6 +23,7 @@
#include <asm/cache.h>
#include <asm/global_data.h>
#include <dm/device-internal.h>
+#include <linux/errno.h>
#include <u-boot/crc.h>
#ifndef CONFIG_SPL_BUILD
diff --git a/env/ubi.c b/env/ubi.c
index 12495776609b..da691f470c8e 100644
--- a/env/ubi.c
+++ b/env/ubi.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <command.h>
diff --git a/fs/btrfs/btrfs.c b/fs/btrfs/btrfs.c
index de16217d0dd3..9b9f9b5ffa34 100644
--- a/fs/btrfs/btrfs.c
+++ b/fs/btrfs/btrfs.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <malloc.h>
#include <uuid.h>
+#include <linux/errno.h>
#include <linux/time.h>
struct btrfs_info btrfs_info;
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index 51a59030f60e..1b27320a7601 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <malloc.h>
#include <asm/byteorder.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* Offset of master header from the start of a coreboot ROM */
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index a6fbd5a971d7..c3ca193a1906 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -28,6 +28,7 @@
#include <part.h>
#include <stddef.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/time.h>
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index 9f1eb6ad9d1e..ad967d39f950 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -21,6 +21,7 @@
#include <ext_common.h>
#include <stdio.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "ext4_common.h"
diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c
index 22bb845f8bf0..a38e0edd6a73 100644
--- a/fs/ext4/ext4_write.c
+++ b/fs/ext4/ext4_write.c
@@ -28,6 +28,7 @@
#include <memalign.h>
#include <part.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/stat.h>
#include <div64.h>
#include <linux/string.h>
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index c004d5facbb2..8143079b8b01 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -29,6 +29,7 @@
#include <part.h>
#include <stdio.h>
#include <uuid.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "ext4_common.h"
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index a16896c8e087..e25416674b79 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -23,6 +23,7 @@
#include <asm/cache.h>
#include <linux/compiler.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index bdc604038ad5..42ddb2857897 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -17,6 +17,7 @@
#include <asm/cache.h>
#include <linux/ctype.h>
#include <div64.h>
+#include <linux/errno.h>
#include <linux/math64.h>
#include <linux/string.h>
#include "fat.c"
diff --git a/fs/fs.c b/fs/fs.c
index b8ce3d8f266a..71dbad6103b5 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -25,6 +25,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <div64.h>
+#include <linux/errno.h>
#include <linux/math64.h>
#include <efi_loader.h>
#include <squashfs.h>
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 77178e0e28a0..07196c52e4f8 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -20,6 +20,7 @@
#include <time.h>
#include <vsprintf.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 57e0847464ce..4ef1381fc7d0 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -68,6 +68,7 @@
#else
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/log.c b/fs/ubifs/log.c
index 0c8671a88478..6e43a9c62b4b 100644
--- a/fs/ubifs/log.c
+++ b/fs/ubifs/log.c
@@ -19,6 +19,7 @@
#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index 83e6b2d5df2c..b5ddde857c38 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -20,6 +20,7 @@
#include <log.h>
#include <malloc.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index 583f113902ef..7c5f5d9a246e 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -23,6 +23,7 @@
#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include "crc16.h"
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index 6aa2890ff05c..1d7b8b6a181f 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include "ubifs.h"
/*
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index cf2b8a48b8a5..8d342766221d 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -43,6 +43,7 @@
#include <u-boot/crc.h>
#else
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c
index 0862fe4ebf3b..248a80659257 100644
--- a/fs/ubifs/replay.c
+++ b/fs/ubifs/replay.c
@@ -25,6 +25,7 @@
#include <dm/devres.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index 7a6e46df5d90..9332a61ff34a 100644
--- a/fs/ubifs/scan.c
+++ b/fs/ubifs/scan.c
@@ -20,6 +20,7 @@
#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
+#include <linux/errno.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 62b03731f8d1..8f219ba85333 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -36,6 +36,7 @@
#include <vsprintf.h>
#include <linux/bitops.h>
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/log2.h>
#include <linux/printk.h>
#include <linux/stat.h>
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index c8aef71d86a5..72bcd4227462 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -29,6 +29,7 @@
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/stat.h>
#include <linux/string.h>
#endif
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c
index e4cd785b9f5f..659ff2e2ce2b 100644
--- a/fs/ubifs/tnc_misc.c
+++ b/fs/ubifs/tnc_misc.c
@@ -19,6 +19,7 @@
#include <log.h>
#include <dm/devres.h>
#include <linux/err.h>
+#include <linux/errno.h>
#endif
#include "ubifs.h"
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index ab48f10310c6..e76839e098d8 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <vsprintf.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "ubifs.h"
#include <part.h>
diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c
index a3ff0044788c..62f034552e58 100644
--- a/fs/yaffs2/yaffs_uboot_glue.c
+++ b/fs/yaffs2/yaffs_uboot_glue.c
@@ -24,6 +24,7 @@
#include <malloc.h>
#include <stdio.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index 5bf9350c8225..8f43d3ac0851 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -13,6 +13,7 @@
#include <div64.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "yaffsfs.h"
#include "yaffs_guts.h"
diff --git a/fs/yaffs2/yportenv.h b/fs/yaffs2/yportenv.h
index 081391a1d0fe..607b7cc31cf2 100644
--- a/fs/yaffs2/yportenv.h
+++ b/fs/yaffs2/yportenv.h
@@ -18,6 +18,7 @@
#define __YPORTENV_H__
#include <linux/bug.h>
+#include <linux/errno.h>
#include <linux/types.h>
/* Definition of types */
diff --git a/include/acpi/acpi_s3.h b/include/acpi/acpi_s3.h
index baa848dcd15b..1dc568117bd3 100644
--- a/include/acpi/acpi_s3.h
+++ b/include/acpi/acpi_s3.h
@@ -6,6 +6,7 @@
#ifndef __ASM_ACPI_S3_H__
#define __ASM_ACPI_S3_H__
+#include <linux/errno.h>
#define WAKEUP_BASE 0x600
/* PM1_STATUS register */
diff --git a/include/board.h b/include/board.h
index a43f35a021b0..755a888e3382 100644
--- a/include/board.h
+++ b/include/board.h
@@ -4,6 +4,7 @@
* Mario Six, Guntermann & Drunck GmbH, mario.six at gdsys.cc
*/
+#include <linux/errno.h>
struct udevice;
/*
diff --git a/include/common.h b/include/common.h
index 2b7a422fbe19..4fa613216ef2 100644
--- a/include/common.h
+++ b/include/common.h
@@ -14,7 +14,6 @@
#ifndef __ASSEMBLY__ /* put C only stuff in this section */
#include <config.h>
-#include <errno.h>
#include <linux/types.h>
#include <linux/kernel.h>
#endif /* __ASSEMBLY__ */
diff --git a/include/dfu.h b/include/dfu.h
index 436057e378ed..475b2a254d6b 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -12,6 +12,7 @@
#include <common.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <mmc.h>
#include <spi_flash.h>
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index 692e5fc8cbfa..f879901279db 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -6,6 +6,7 @@
#ifndef __PINCTRL_H
#define __PINCTRL_H
+#include <linux/errno.h>
#define PINNAME_SIZE 10
#define PINMUX_SIZE 40
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index e08530ec4e58..6c583e5e7b6c 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -10,6 +10,7 @@
#define __DWC3_UBOOT_H_
#include <generic-phy.h>
+#include <linux/errno.h>
#include <linux/usb/otg.h>
#include <linux/usb/phy.h>
diff --git a/include/eeprom.h b/include/eeprom.h
index 6820844cea3a..06f2a471657e 100644
--- a/include/eeprom.h
+++ b/include/eeprom.h
@@ -25,4 +25,5 @@ int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt);
# define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
#endif
+#include <linux/errno.h>
#endif
diff --git a/include/hwspinlock.h b/include/hwspinlock.h
index 99389c13c24e..88a2868b70ec 100644
--- a/include/hwspinlock.h
+++ b/include/hwspinlock.h
@@ -12,6 +12,7 @@
* critical sections and synchronisation between multiprocessors.
*/
+#include <linux/errno.h>
struct udevice;
/**
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index eb916ba10194..0d02ca82aef7 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -21,6 +21,7 @@
* @firmware_description: Firmware description (not usually used).
*/
#include <linux/bitops.h>
+#include <linux/errno.h>
struct ti_sci_version_info {
u8 abi_major;
u8 abi_minor;
diff --git a/include/mipi_dsi.h b/include/mipi_dsi.h
index c8a7d3daefa1..33eae9fb6d00 100644
--- a/include/mipi_dsi.h
+++ b/include/mipi_dsi.h
@@ -17,6 +17,7 @@
#include <mipi_display.h>
#include <linux/bitops.h>
+#include <linux/errno.h>
struct mipi_dsi_host;
struct mipi_dsi_device;
diff --git a/include/power-domain.h b/include/power-domain.h
index 72ff2ff25ba2..12945f078547 100644
--- a/include/power-domain.h
+++ b/include/power-domain.h
@@ -42,6 +42,7 @@
* by which power domains are managed.
*/
+#include <linux/errno.h>
struct udevice;
/**
diff --git a/include/power/sandbox_pmic.h b/include/power/sandbox_pmic.h
index 1dbd15b52354..25cb95db84f9 100644
--- a/include/power/sandbox_pmic.h
+++ b/include/power/sandbox_pmic.h
@@ -7,6 +7,7 @@
#ifndef _SANDBOX_PMIC_H_
#define _SANDBOX_PMIC_H_
+#include <linux/errno.h>
#define SANDBOX_LDO_DRIVER "sandbox_ldo"
#define SANDBOX_OF_LDO_PREFIX "ldo"
#define SANDBOX_BUCK_DRIVER "sandbox_buck"
diff --git a/include/regmap.h b/include/regmap.h
index bae96a6ef0bc..5a3f3dce02cc 100644
--- a/include/regmap.h
+++ b/include/regmap.h
@@ -9,6 +9,7 @@
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
/**
* DOC: Overview
diff --git a/include/remoteproc.h b/include/remoteproc.h
index a903acb9b24f..92de5604a800 100644
--- a/include/remoteproc.h
+++ b/include/remoteproc.h
@@ -14,6 +14,7 @@
* platforms have moved to dm/fdt.
*/
#include <dm/platdata.h> /* For platform data support - non dt world */
+#include <linux/errno.h>
/**
* enum rproc_mem_type - What type of memory model does the rproc use
diff --git a/include/soc.h b/include/soc.h
index a52a300a84a6..eda52d78cdf6 100644
--- a/include/soc.h
+++ b/include/soc.h
@@ -7,6 +7,7 @@
#ifndef __SOC_H
#define __SOC_H
+#include <linux/errno.h>
#define SOC_MAX_STR_SIZE 128
struct udevice;
diff --git a/include/spi_flash.h b/include/spi_flash.h
index e555495da610..2ee4dbb1322a 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -10,6 +10,7 @@
#define _SPI_FLASH_H_
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/mtd/spi-nor.h>
diff --git a/include/splash.h b/include/splash.h
index 7fd2de8fea1d..8b70e4a8068b 100644
--- a/include/splash.h
+++ b/include/splash.h
@@ -23,6 +23,7 @@
#define _SPLASH_H_
#include <errno.h>
+#include <linux/errno.h>
enum splash_storage {
SPLASH_STORAGE_NAND,
diff --git a/include/tlv_eeprom.h b/include/tlv_eeprom.h
index f7e130296a7f..99cefa61dfa5 100644
--- a/include/tlv_eeprom.h
+++ b/include/tlv_eeprom.h
@@ -8,6 +8,7 @@
#define __TLV_EEPROM_H_
#include <compiler.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/include/u-boot/aes.h b/include/u-boot/aes.h
index 32281041de24..ee6863945095 100644
--- a/include/u-boot/aes.h
+++ b/include/u-boot/aes.h
@@ -8,6 +8,7 @@
#include <errno.h>
#include <image.h>
+#include <linux/errno.h>
#if IMAGE_ENABLE_ENCRYPT
int image_aes_encrypt(struct image_cipher_info *info,
diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h
index bed1c097c2ce..6d5f50a0030b 100644
--- a/include/u-boot/rsa.h
+++ b/include/u-boot/rsa.h
@@ -13,6 +13,7 @@
#include <errno.h>
#include <image.h>
+#include <linux/errno.h>
/**
* struct rsa_public_key - holder for a public key
diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c
index f891f3ade90b..9e31a69c20f9 100644
--- a/lib/acpi/acpi_device.c
+++ b/lib/acpi/acpi_device.c
@@ -17,6 +17,7 @@
#include <acpi/acpigen.h>
#include <asm-generic/gpio.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#include <linux/string.h>
/**
diff --git a/lib/acpi/acpi_dp.c b/lib/acpi/acpi_dp.c
index 194e79d7d038..87e7bc4313b8 100644
--- a/lib/acpi/acpi_dp.c
+++ b/lib/acpi/acpi_dp.c
@@ -14,6 +14,7 @@
#include <acpi/acpigen.h>
#include <acpi/acpi_dp.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#include <linux/string.h>
static void acpi_dp_write_array(struct acpi_ctx *ctx,
diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c
index d6abb6068a6b..0f6cb8728cd8 100644
--- a/lib/acpi/acpi_table.c
+++ b/lib/acpi/acpi_table.c
@@ -15,6 +15,7 @@
#include <acpi/acpi_table.h>
#include <asm/global_data.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#include <linux/string.h>
int acpi_create_dmar(struct acpi_dmar *dmar, enum dmar_flags flags)
diff --git a/lib/acpi/acpigen.c b/lib/acpi/acpigen.c
index 0906b1d30306..f119de2bca6d 100644
--- a/lib/acpi/acpigen.c
+++ b/lib/acpi/acpigen.c
@@ -16,6 +16,7 @@
#include <acpi/acpi_device.h>
#include <acpi/acpi_table.h>
#include <dm/acpi.h>
+#include <linux/errno.h>
#include <linux/string.h>
u8 *acpigen_get_current(struct acpi_ctx *ctx)
diff --git a/lib/aes/aes-decrypt.c b/lib/aes/aes-decrypt.c
index 09fdf38df63a..3b01d1c8cbb5 100644
--- a/lib/aes/aes-decrypt.c
+++ b/lib/aes/aes-decrypt.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#endif
#include <image.h>
diff --git a/lib/bch.c b/lib/bch.c
index 7f82cef242b0..578f4191309c 100644
--- a/lib/bch.c
+++ b/lib/bch.c
@@ -59,6 +59,7 @@
#include <malloc.h>
#include <ubi_uboot.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/bitops.h>
diff --git a/lib/binman.c b/lib/binman.c
index 7a8ad62c4a8c..f6c2d0a64321 100644
--- a/lib/binman.c
+++ b/lib/binman.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <malloc.h>
#include <mapmem.h>
+#include <linux/errno.h>
/**
* struct binman_info - Information needed by the binman library
diff --git a/lib/crypto/asymmetric_type.c b/lib/crypto/asymmetric_type.c
index 24c2d15ef97a..46d0dd468e5c 100644
--- a/lib/crypto/asymmetric_type.c
+++ b/lib/crypto/asymmetric_type.c
@@ -18,6 +18,7 @@
#include <linux/compat.h>
#include <linux/ctype.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#else
diff --git a/lib/crypto/pkcs7_parser.c b/lib/crypto/pkcs7_parser.c
index d5efa828d6aa..3cb13fae86d7 100644
--- a/lib/crypto/pkcs7_parser.c
+++ b/lib/crypto/pkcs7_parser.c
@@ -11,6 +11,7 @@
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#endif
#include <linux/kernel.h>
diff --git a/lib/crypto/pkcs7_verify.c b/lib/crypto/pkcs7_verify.c
index 5ca268ee00cc..2d9113fd2e05 100644
--- a/lib/crypto/pkcs7_verify.c
+++ b/lib/crypto/pkcs7_verify.c
@@ -15,6 +15,7 @@
#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/asn1.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#include <u-boot/rsa-checksum.h>
diff --git a/lib/crypto/public_key.c b/lib/crypto/public_key.c
index 54078471bec7..be5e722a83d4 100644
--- a/lib/crypto/public_key.c
+++ b/lib/crypto/public_key.c
@@ -14,6 +14,7 @@
#include <linux/bug.h>
#include <linux/compat.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#else
diff --git a/lib/crypto/rsa_helper.c b/lib/crypto/rsa_helper.c
index c941d40fd7a8..acea8b262132 100644
--- a/lib/crypto/rsa_helper.c
+++ b/lib/crypto/rsa_helper.c
@@ -15,6 +15,7 @@
#include <linux/fips.h>
#endif
#include <crypto/internal/rsa.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include "rsapubkey.asn1.h"
#ifndef __UBOOT__
diff --git a/lib/crypto/x509_cert_parser.c b/lib/crypto/x509_cert_parser.c
index a0f0689118f6..909190c8af8a 100644
--- a/lib/crypto/x509_cert_parser.c
+++ b/lib/crypto/x509_cert_parser.c
@@ -8,6 +8,7 @@
#define pr_fmt(fmt) "X.509: "fmt
#include <log.h>
#include <dm/devres.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#ifndef __UBOOT__
#include <linux/export.h>
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index c1796f83a59a..046ca411e42e 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <asm/global_data.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <efi.h>
diff --git a/lib/efi/efi_info.c b/lib/efi/efi_info.c
index 4d78923c4d40..6ba042f6894a 100644
--- a/lib/efi/efi_info.c
+++ b/lib/efi/efi_info.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <mapmem.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
int efi_info_get(enum efi_entry_t type, void **datap, int *sizep)
{
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 97a709904dfb..ef8b80a46257 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -20,6 +20,7 @@
#include <asm/cpu.h>
#include <asm/io.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c
index 98600db09dcb..3ac3a94ab03e 100644
--- a/lib/efi_driver/efi_block_device.c
+++ b/lib/efi_driver/efi_block_device.c
@@ -36,6 +36,7 @@
#include <vsprintf.h>
#include <dm/device-internal.h>
#include <dm/root.h>
+#include <linux/errno.h>
/*
* EFI attributes of the udevice handled by this driver.
diff --git a/lib/efi_loader/efi_variable_tee.c b/lib/efi_loader/efi_variable_tee.c
index 08f7c95e37bf..c1f88c28244f 100644
--- a/lib/efi_loader/efi_variable_tee.c
+++ b/lib/efi_loader/efi_variable_tee.c
@@ -14,6 +14,7 @@
#include <tee.h>
#include <malloc.h>
#include <mm_communication.h>
+#include <linux/errno.h>
#include <linux/string.h>
#define OPTEE_PAGE_SIZE BIT(12)
diff --git a/lib/errno_str.c b/lib/errno_str.c
index 2e5f4a887d5b..d342ed70b603 100644
--- a/lib/errno_str.c
+++ b/lib/errno_str.c
@@ -6,6 +6,7 @@
*/
#include <common.h>
#include <errno.h>
+#include <linux/errno.h>
#define ERRNO_MSG(errno, msg) msg
#define SAME_AS(x) (const char *)&errno_message[x]
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index faf7be634f39..3ac889ba730e 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -23,6 +23,7 @@
#include <fdt_support.h>
#include <gzip.h>
#include <mapmem.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <serial.h>
#include <asm/global_data.h>
diff --git a/lib/list_sort.c b/lib/list_sort.c
index 44d85ff43fee..0c0605285041 100644
--- a/lib/list_sort.c
+++ b/lib/list_sort.c
@@ -8,6 +8,7 @@
#include <linux/compat.h>
#include <common.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/printk.h>
#include <linux/string.h>
#endif
diff --git a/lib/lz4_wrapper.c b/lib/lz4_wrapper.c
index edce13da6bde..c5ebe9624619 100644
--- a/lib/lz4_wrapper.c
+++ b/lib/lz4_wrapper.c
@@ -7,6 +7,7 @@
#include <compiler.h>
#include <image.h>
#include <lz4.h>
+#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/types.h>
diff --git a/lib/membuff.c b/lib/membuff.c
index b0fc716a04be..6abac4114f96 100644
--- a/lib/membuff.c
+++ b/lib/membuff.c
@@ -10,6 +10,7 @@
#include <errno.h>
#include <log.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include "membuff.h"
diff --git a/lib/of_live.c b/lib/of_live.c
index c27a7a6e24fe..fd83a6ba420f 100644
--- a/lib/of_live.c
+++ b/lib/of_live.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <log.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <of_live.h>
#include <malloc.h>
diff --git a/lib/optee/optee.c b/lib/optee/optee.c
index c902eee3bc44..8493ca6c6211 100644
--- a/lib/optee/optee.c
+++ b/lib/optee/optee.c
@@ -10,6 +10,7 @@
#include <log.h>
#include <malloc.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <tee/optee.h>
diff --git a/lib/rsa/rsa-keyprop.c b/lib/rsa/rsa-keyprop.c
index 4114e33d36e0..e5ece6152451 100644
--- a/lib/rsa/rsa-keyprop.c
+++ b/lib/rsa/rsa-keyprop.c
@@ -14,6 +14,7 @@
#include <malloc.h>
#include <asm/byteorder.h>
#include <crypto/internal/rsa.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <u-boot/rsa-mod-exp.h>
diff --git a/lib/strto.c b/lib/strto.c
index e6f69b31e478..9636c797ea5a 100644
--- a/lib/strto.c
+++ b/lib/strto.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <vsprintf.h>
#include <linux/ctype.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* from lib/kstrtox.c */
diff --git a/lib/trace.c b/lib/trace.c
index 37f53dad235b..8ab4258b35a9 100644
--- a/lib/trace.c
+++ b/lib/trace.c
@@ -12,6 +12,7 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/sections.h>
+#include <linux/errno.h>
#include <linux/string.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/uuid.c b/lib/uuid.c
index 91f99bcb5ff0..3a6cd7e87fda 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -17,6 +17,7 @@
#include <asm/io.h>
#include <part_efi.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/string.h>
/*
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 18d4bc5a27bc..7be3127c2a10 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -24,6 +24,7 @@
#include <vsprintf.h>
#include <linux/ctype.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <linux/types.h>
#include <linux/string.h>
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index 9af7971fc492..a20b896170cd 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -16,6 +16,7 @@
#include <asm/global_data.h>
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/pcap.h>
#include "eth_internal.h"
diff --git a/net/mdio-mux-uclass.c b/net/mdio-mux-uclass.c
index 6674eb6bee78..1325484e0d99 100644
--- a/net/mdio-mux-uclass.c
+++ b/net/mdio-mux-uclass.c
@@ -11,6 +11,7 @@
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#include <dm/lists.h>
+#include <linux/errno.h>
#define MDIO_MUX_CHILD_DRV_NAME "mdio-mux-bus-drv"
diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c
index 1c9ce801dc86..3e39a9b74f88 100644
--- a/net/mdio-uclass.c
+++ b/net/mdio-uclass.c
@@ -13,6 +13,7 @@
#include <dm/device_compat.h>
#include <dm/uclass-internal.h>
#include <linux/compat.h>
+#include <linux/errno.h>
#include <linux/string.h>
/* DT node properties for MAC-PHY interface */
diff --git a/net/net.c b/net/net.c
index 1aa977d00879..c05117cf6b61 100644
--- a/net/net.c
+++ b/net/net.c
@@ -100,6 +100,7 @@
#include <stdio.h>
#include <time.h>
#include <vsprintf.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/fastboot.h>
#include <net/tftp.h>
diff --git a/net/pcap.c b/net/pcap.c
index 31cfc1ca8481..907aa1cda095 100644
--- a/net/pcap.c
+++ b/net/pcap.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <net.h>
#include <stdio.h>
+#include <linux/errno.h>
#include <linux/string.h>
#include <net/pcap.h>
#include <time.h>
diff --git a/test/bloblist.c b/test/bloblist.c
index b93e2713dfd3..19b8f65b81b9 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -8,6 +8,7 @@
#include <log.h>
#include <mapmem.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
#include <test/suites.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 9ded00ad168f..003b0f4ca979 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -20,6 +20,7 @@
#include <asm/global_data.h>
#include <dm/acpi.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
#include "acpi.h"
diff --git a/test/dm/acpi_dp.c b/test/dm/acpi_dp.c
index e0fa61263c8a..ce96441faa5a 100644
--- a/test/dm/acpi_dp.c
+++ b/test/dm/acpi_dp.c
@@ -14,6 +14,7 @@
#include <asm/unaligned.h>
#include <dm/acpi.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
#include "acpi.h"
diff --git a/test/dm/acpigen.c b/test/dm/acpigen.c
index 1b2767e732d3..51c846081f90 100644
--- a/test/dm/acpigen.c
+++ b/test/dm/acpigen.c
@@ -18,6 +18,7 @@
#include <dm/acpi.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <test/ut.h>
#include "acpi.h"
diff --git a/test/dm/adc.c b/test/dm/adc.c
index 8c6e4b0604e9..c28121389932 100644
--- a/test/dm/adc.c
+++ b/test/dm/adc.c
@@ -14,6 +14,7 @@
#include <dm/test.h>
#include <errno.h>
#include <fdtdec.h>
+#include <linux/errno.h>
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
#include <sandbox-adc.h>
diff --git a/test/dm/blk.c b/test/dm/blk.c
index c2634d0a0167..db7cea932df3 100644
--- a/test/dm/blk.c
+++ b/test/dm/blk.c
@@ -12,6 +12,7 @@
#include <asm/state.h>
#include <dm/test.h>
#include <test/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/dm/bus.c b/test/dm/bus.c
index 3808305f24fe..b81f429ffad5 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -16,6 +16,7 @@
#include <dm/uclass-internal.h>
#include <dm/util.h>
#include <test/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/dm/button.c b/test/dm/button.c
index 911780173657..3497a11041ca 100644
--- a/test/dm/button.c
+++ b/test/dm/button.c
@@ -10,6 +10,7 @@
#include <button.h>
#include <asm/gpio.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
/* Base test of the button uclass */
diff --git a/test/dm/core.c b/test/dm/core.c
index cac3c00cd433..7f45bc506ea4 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -19,6 +19,7 @@
#include <dm/test.h>
#include <dm/uclass-internal.h>
#include <test/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/test/dm/eth.c b/test/dm/eth.c
index fa8a69da7013..48142c8117a1 100644
--- a/test/dm/eth.c
+++ b/test/dm/eth.c
@@ -18,6 +18,7 @@
#include <dm/device-internal.h>
#include <dm/uclass-internal.h>
#include <test/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
#define DM_TEST_ETH_NUM 4
diff --git a/test/dm/gpio.c b/test/dm/gpio.c
index 4848152644aa..8abf8c7964ed 100644
--- a/test/dm/gpio.c
+++ b/test/dm/gpio.c
@@ -14,6 +14,7 @@
#include <dm/test.h>
#include <dm/util.h>
#include <test/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
/* Test that sandbox GPIOs work correctly */
diff --git a/test/dm/i2c.c b/test/dm/i2c.c
index 681ce45107c3..6ca1c24089ad 100644
--- a/test/dm/i2c.c
+++ b/test/dm/i2c.c
@@ -16,6 +16,7 @@
#include <dm/uclass-internal.h>
#include <dm/util.h>
#include <hexdump.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/irq.c b/test/dm/irq.c
index 51dd5e4abb41..14bb2e9aee2c 100644
--- a/test/dm/irq.c
+++ b/test/dm/irq.c
@@ -11,6 +11,7 @@
#include <acpi/acpi_device.h>
#include <asm/test.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
/* Base test of the irq uclass */
diff --git a/test/dm/k210_pll.c b/test/dm/k210_pll.c
index 54764f269c58..94740ce09261 100644
--- a/test/dm/k210_pll.c
+++ b/test/dm/k210_pll.c
@@ -4,6 +4,7 @@
*/
#include <common.h>
+#include <linux/errno.h>
/* For DIV_ROUND_DOWN_ULL, defined in linux/kernel.h */
#include <div64.h>
#include <dm/test.h>
diff --git a/test/dm/led.c b/test/dm/led.c
index 8b587d0a22a8..4d044a1194dc 100644
--- a/test/dm/led.c
+++ b/test/dm/led.c
@@ -8,6 +8,7 @@
#include <led.h>
#include <asm/gpio.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/mailbox.c b/test/dm/mailbox.c
index 7ad8a1cbba28..60e1c9fd8548 100644
--- a/test/dm/mailbox.c
+++ b/test/dm/mailbox.c
@@ -8,6 +8,7 @@
#include <malloc.h>
#include <dm/test.h>
#include <asm/mbox.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/nop.c b/test/dm/nop.c
index 2cd92c52402e..32e2d46f4fe7 100644
--- a/test/dm/nop.c
+++ b/test/dm/nop.c
@@ -13,6 +13,7 @@
#include <dm/device.h>
#include <dm/test.h>
#include <misc.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/pch.c b/test/dm/pch.c
index 53f7bbf180c9..eeb1c7f2a1f4 100644
--- a/test/dm/pch.c
+++ b/test/dm/pch.c
@@ -8,6 +8,7 @@
#include <pch.h>
#include <asm/test.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/phy.c b/test/dm/phy.c
index 75d05a14c030..a9e1964520d7 100644
--- a/test/dm/phy.c
+++ b/test/dm/phy.c
@@ -9,6 +9,7 @@
#include <generic-phy.h>
#include <log.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/pwm.c b/test/dm/pwm.c
index 0de6dba1ba64..fc4fd29fea37 100644
--- a/test/dm/pwm.c
+++ b/test/dm/pwm.c
@@ -7,6 +7,7 @@
#include <dm.h>
#include <pwm.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/regmap.c b/test/dm/regmap.c
index 16dd9b1eaff1..271ec80e57fc 100644
--- a/test/dm/regmap.c
+++ b/test/dm/regmap.c
@@ -13,6 +13,7 @@
#include <asm/test.h>
#include <dm/test.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/regulator.c b/test/dm/regulator.c
index 0e7a232a7081..f713fb8c34fd 100644
--- a/test/dm/regulator.c
+++ b/test/dm/regulator.c
@@ -17,6 +17,7 @@
#include <dm/util.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <power/pmic.h>
#include <power/regulator.h>
#include <power/sandbox_pmic.h>
diff --git a/test/dm/remoteproc.c b/test/dm/remoteproc.c
index 1cc07bc80832..d45deec0a0ed 100644
--- a/test/dm/remoteproc.c
+++ b/test/dm/remoteproc.c
@@ -10,6 +10,7 @@
#include <remoteproc.h>
#include <asm/io.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/rtc.c b/test/dm/rtc.c
index 2ef8ff724e78..69f712752359 100644
--- a/test/dm/rtc.c
+++ b/test/dm/rtc.c
@@ -15,6 +15,7 @@
#include <asm/rtc.h>
#include <asm/test.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/serial.c b/test/dm/serial.c
index 0662b5f09b8b..e73f9ea7fa9b 100644
--- a/test/dm/serial.c
+++ b/test/dm/serial.c
@@ -8,6 +8,7 @@
#include <serial.h>
#include <dm.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/sound.c b/test/dm/sound.c
index b73f6ab1113e..7088906a9970 100644
--- a/test/dm/sound.c
+++ b/test/dm/sound.c
@@ -8,6 +8,7 @@
#include <dm.h>
#include <sound.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/ut.h>
#include <test/test.h>
#include <asm/test.h>
diff --git a/test/dm/spi.c b/test/dm/spi.c
index fb180aed1f08..0f09dcdb5526 100644
--- a/test/dm/spi.c
+++ b/test/dm/spi.c
@@ -13,6 +13,7 @@
#include <dm/test.h>
#include <dm/uclass-internal.h>
#include <dm/util.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/syscon-reset.c b/test/dm/syscon-reset.c
index eeaddf88392c..8f84d17b4926 100644
--- a/test/dm/syscon-reset.c
+++ b/test/dm/syscon-reset.c
@@ -9,6 +9,7 @@
#include <regmap.h>
#include <reset.h>
#include <syscon.h>
+#include <linux/errno.h>
#include <test/ut.h>
#include <asm/test.h>
#include <linux/bitops.h>
diff --git a/test/dm/syscon.c b/test/dm/syscon.c
index be2329723362..ad9fb49fe1fd 100644
--- a/test/dm/syscon.c
+++ b/test/dm/syscon.c
@@ -11,6 +11,7 @@
#include <asm/test.h>
#include <dm/test.h>
#include <linux/err.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/sysreset.c b/test/dm/sysreset.c
index aec97b1cbb10..50cd64efe43d 100644
--- a/test/dm/sysreset.c
+++ b/test/dm/sysreset.c
@@ -9,6 +9,7 @@
#include <asm/state.h>
#include <asm/test.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/tee.c b/test/dm/tee.c
index ddbdcfb0cff1..2f786324df55 100644
--- a/test/dm/tee.c
+++ b/test/dm/tee.c
@@ -10,6 +10,7 @@
#include <dm/test.h>
#include <sandboxtee.h>
#include <tee.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
#include <tee/optee_ta_avb.h>
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index 08bdf011946f..0cc12849fb31 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -13,6 +13,7 @@
#include <malloc.h>
#include <asm/io.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 0dc824b938e7..6a83b5bc36d1 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -20,6 +20,7 @@
#include <dm/util.h>
#include <dm/lists.h>
#include <dm/of_access.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/test-uclass.c b/test/dm/test-uclass.c
index 760731b06675..98374328d81a 100644
--- a/test/dm/test-uclass.c
+++ b/test/dm/test-uclass.c
@@ -13,6 +13,7 @@
#include <errno.h>
#include <asm/io.h>
#include <dm/test.h>
+#include <linux/errno.h>
#include <linux/list.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/usb.c b/test/dm/usb.c
index 7ad280f215ce..345111775bef 100644
--- a/test/dm/usb.c
+++ b/test/dm/usb.c
@@ -15,6 +15,7 @@
#include <dm/device-internal.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/video.c b/test/dm/video.c
index 1af948dca3e1..f9bd904b070b 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -15,6 +15,7 @@
#include <video_console.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/dm/virtio.c b/test/dm/virtio.c
index 2e876c36e43f..f7a28a649493 100644
--- a/test/dm/virtio.c
+++ b/test/dm/virtio.c
@@ -12,6 +12,7 @@
#include <dm/root.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
+#include <linux/errno.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/env/attr.c b/test/env/attr.c
index 8d5c0f1c3df4..64eb14475e8e 100644
--- a/test/env/attr.c
+++ b/test/env/attr.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
#include <env_attr.h>
+#include <linux/errno.h>
#include <test/env.h>
#include <test/ut.h>
diff --git a/test/lib/test_errno_str.c b/test/lib/test_errno_str.c
index 8a9f1fd9805a..1a02e712048b 100644
--- a/test/lib/test_errno_str.c
+++ b/test/lib/test_errno_str.c
@@ -12,6 +12,7 @@
#include <common.h>
#include <command.h>
#include <errno.h>
+#include <linux/errno.h>
#include <test/lib.h>
#include <test/test.h>
#include <test/ut.h>
diff --git a/test/optee/cmd_ut_optee.c b/test/optee/cmd_ut_optee.c
index 9fa4c91e0dd0..9153d7159188 100644
--- a/test/optee/cmd_ut_optee.c
+++ b/test/optee/cmd_ut_optee.c
@@ -9,6 +9,7 @@
#include <fdt_support.h>
#include <log.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <tee/optee.h>
#include <linux/sizes.h>
diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index c001fb183fe8..ee8c4944e401 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -11,6 +11,7 @@
#include <image.h>
#include <log.h>
#include <malloc.h>
+#include <linux/errno.h>
#include <linux/sizes.h>
diff --git a/test/time_ut.c b/test/time_ut.c
index 701b6cb4a7ed..1670c5d2184b 100644
--- a/test/time_ut.c
+++ b/test/time_ut.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <time.h>
#include <linux/delay.h>
+#include <linux/errno.h>
static int test_get_timer(void)
{
--
2.17.1
More information about the U-Boot
mailing list