summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2024-05-27 11:20:07 +0200
committerElyes Haouas <ehaouas@noos.fr>2024-05-29 10:33:54 +0000
commitbdd03c20d5b1cd7ca17e2559a44ddcf1da06f3be (patch)
tree3efad8a2559fba312165272eb2abdb7b72b146db /src/drivers
parent93ca6b676cd0ac4c3755bb69cf690dc23a28b22a (diff)
tree: Use <stdio.h> for snprintf
<stdio.h> header is used for input/output operations (such as printf, scanf, fopen, etc.). Although some input/output functions can manipulate strings, they do not need to directly include <string.h> because they are declared independently. Change-Id: Ibe2a4ff6f68843a6d99cfdfe182cf2dd922802aa Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/82665 Reviewed-by: Yidi Lin <yidilin@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/acpi/thermal_zone/thermal_zone.c1
-rw-r--r--src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c1
-rw-r--r--src/drivers/generic/gpio_keys/gpio_keys.c1
-rw-r--r--src/drivers/i2c/cs35l53/cs35l53.c1
-rw-r--r--src/drivers/i2c/generic/generic.c1
-rw-r--r--src/drivers/i2c/gpiomux/bus/bus.c1
-rw-r--r--src/drivers/i2c/gpiomux/mux/mux.c1
-rw-r--r--src/drivers/i2c/hid/hid.c1
-rw-r--r--src/drivers/i2c/max98390/max98390.c1
-rw-r--r--src/drivers/i2c/max98396/max98396.c1
-rw-r--r--src/drivers/i2c/rt1011/rt1011.c1
-rw-r--r--src/drivers/i2c/rt5645/rt5645.c2
-rw-r--r--src/drivers/i2c/sx9310/sx9310.c1
-rw-r--r--src/drivers/i2c/sx9324/sx9324.c1
-rw-r--r--src/drivers/i2c/sx9360/sx9360.c1
-rw-r--r--src/drivers/intel/dptf/dptf.c1
-rw-r--r--src/drivers/intel/fsp2_0/util.c1
-rw-r--r--src/drivers/intel/gma/acpi.c1
-rw-r--r--src/drivers/intel/mipi_camera/camera.c2
-rw-r--r--src/drivers/intel/pmc_mux/conn/conn.c1
-rw-r--r--src/drivers/intel/usb4/retimer/retimer.c1
-rw-r--r--src/drivers/nxp/uwb/uwb.c1
-rw-r--r--src/drivers/ocp/dmi/smbios.c1
-rw-r--r--src/drivers/spi/acpi/acpi.c1
-rw-r--r--src/drivers/uart/acpi/acpi.c1
-rw-r--r--src/drivers/usb/hub/acpi.c1
-rw-r--r--src/drivers/usb/pci_xhci/pci_xhci.c1
-rw-r--r--src/drivers/wifi/generic/acpi.c1
28 files changed, 30 insertions, 0 deletions
diff --git a/src/drivers/acpi/thermal_zone/thermal_zone.c b/src/drivers/acpi/thermal_zone/thermal_zone.c
index ef95bed23a..b1016cd661 100644
--- a/src/drivers/acpi/thermal_zone/thermal_zone.c
+++ b/src/drivers/acpi/thermal_zone/thermal_zone.c
@@ -5,6 +5,7 @@
#include <commonlib/bsd/helpers.h>
#include <console/console.h>
#include <device/device.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c b/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c
index 16ae48dd4b..28377a17cc 100644
--- a/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c
+++ b/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c
@@ -3,6 +3,7 @@
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
#include <console/console.h>
diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c
index 37b90cabd9..97a4e05fad 100644
--- a/src/drivers/generic/gpio_keys/gpio_keys.c
+++ b/src/drivers/generic/gpio_keys/gpio_keys.c
@@ -3,6 +3,7 @@
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/i2c/cs35l53/cs35l53.c b/src/drivers/i2c/cs35l53/cs35l53.c
index 479ef7fdcd..974a647705 100644
--- a/src/drivers/i2c/cs35l53/cs35l53.c
+++ b/src/drivers/i2c/cs35l53/cs35l53.c
@@ -6,6 +6,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
+#include <stdio.h>
#include "chip.h"
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index a2d510bcf2..a3d8ef257e 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -7,6 +7,7 @@
#include <device/i2c_simple.h>
#include <device/device.h>
#include <gpio.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/i2c/gpiomux/bus/bus.c b/src/drivers/i2c/gpiomux/bus/bus.c
index 5487f6df91..8efcf217fd 100644
--- a/src/drivers/i2c/gpiomux/bus/bus.c
+++ b/src/drivers/i2c/gpiomux/bus/bus.c
@@ -4,6 +4,7 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/i2c/gpiomux/mux/mux.c b/src/drivers/i2c/gpiomux/mux/mux.c
index 91d4ebf1df..a7dcd64f6d 100644
--- a/src/drivers/i2c/gpiomux/mux/mux.c
+++ b/src/drivers/i2c/gpiomux/mux/mux.c
@@ -4,6 +4,7 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index fb3a439a53..06b31d129d 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -4,6 +4,7 @@
#include <acpi/acpi_device.h>
#include <assert.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
#include <gpio.h>
diff --git a/src/drivers/i2c/max98390/max98390.c b/src/drivers/i2c/max98390/max98390.c
index f4912c17df..dced1202ff 100644
--- a/src/drivers/i2c/max98390/max98390.c
+++ b/src/drivers/i2c/max98390/max98390.c
@@ -7,6 +7,7 @@
#include <device/device.h>
#include <identity.h>
#include <stdint.h>
+#include <stdio.h>
#include <vendorcode/google/dsm_calib.h>
#include "chip.h"
diff --git a/src/drivers/i2c/max98396/max98396.c b/src/drivers/i2c/max98396/max98396.c
index ca07dbdd4b..f71873a26d 100644
--- a/src/drivers/i2c/max98396/max98396.c
+++ b/src/drivers/i2c/max98396/max98396.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
+#include <stdio.h>
#include "chip.h"
diff --git a/src/drivers/i2c/rt1011/rt1011.c b/src/drivers/i2c/rt1011/rt1011.c
index e8ee8dfdf9..08a0fac7d3 100644
--- a/src/drivers/i2c/rt1011/rt1011.c
+++ b/src/drivers/i2c/rt1011/rt1011.c
@@ -6,6 +6,7 @@
#include <device/i2c.h>
#include <device/device.h>
#include <stdint.h>
+#include <stdio.h>
#include <vendorcode/google/dsm_calib.h>
#include "chip.h"
diff --git a/src/drivers/i2c/rt5645/rt5645.c b/src/drivers/i2c/rt5645/rt5645.c
index 28434ee456..ea3837f724 100644
--- a/src/drivers/i2c/rt5645/rt5645.c
+++ b/src/drivers/i2c/rt5645/rt5645.c
@@ -4,6 +4,8 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
+#include <stdio.h>
+
#include "chip.h"
#define RT5645_ACPI_NAME "RT58"
diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c
index e5142bca36..a4bdb153dc 100644
--- a/src/drivers/i2c/sx9310/sx9310.c
+++ b/src/drivers/i2c/sx9310/sx9310.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/i2c/sx9324/sx9324.c b/src/drivers/i2c/sx9324/sx9324.c
index 966726fc8d..041991eb4a 100644
--- a/src/drivers/i2c/sx9324/sx9324.c
+++ b/src/drivers/i2c/sx9324/sx9324.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/i2c/sx9360/sx9360.c b/src/drivers/i2c/sx9360/sx9360.c
index df154f4ab7..d72f28db6f 100644
--- a/src/drivers/i2c/sx9360/sx9360.c
+++ b/src/drivers/i2c/sx9360/sx9360.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/intel/dptf/dptf.c b/src/drivers/intel/dptf/dptf.c
index 5bbbc1bb7f..b6f5005d72 100644
--- a/src/drivers/intel/dptf/dptf.c
+++ b/src/drivers/intel/dptf/dptf.c
@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/device.h>
#include <intelblocks/pmc_ipc.h>
+#include <stdio.h>
#include <soc/dptf.h>
#include <soc/pci_devs.h>
#include "chip.h"
diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c
index 47dc3e8229..d09b39b711 100644
--- a/src/drivers/intel/fsp2_0/util.c
+++ b/src/drivers/intel/fsp2_0/util.c
@@ -8,6 +8,7 @@
#include <commonlib/fsp.h>
#include <console/console.h>
#include <fsp/util.h>
+#include <stdio.h>
#include <string.h>
#include <types.h>
#include <assert.h>
diff --git a/src/drivers/intel/gma/acpi.c b/src/drivers/intel/gma/acpi.c
index 2ee1d63a8e..534c0d8e10 100644
--- a/src/drivers/intel/gma/acpi.c
+++ b/src/drivers/intel/gma/acpi.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpigen.h>
+#include <stdio.h>
#include <string.h>
#include "i915.h"
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c
index 190adc7349..63a409a300 100644
--- a/src/drivers/intel/mipi_camera/camera.c
+++ b/src/drivers/intel/mipi_camera/camera.c
@@ -9,6 +9,8 @@
#include <device/i2c_simple.h>
#include <device/device.h>
#include <device/pci_def.h>
+#include <stdio.h>
+
#include "chip.h"
#define CSI2_DATA_STREAM_INTERFACE_GUID \
diff --git a/src/drivers/intel/pmc_mux/conn/conn.c b/src/drivers/intel/pmc_mux/conn/conn.c
index 4b1b08c9aa..dda1fe0e4b 100644
--- a/src/drivers/intel/pmc_mux/conn/conn.c
+++ b/src/drivers/intel/pmc_mux/conn/conn.c
@@ -7,6 +7,7 @@
#include <console/console.h>
#include <drivers/usb/acpi/chip.h>
#include <intelblocks/acpi.h>
+#include <stdio.h>
#include "chip.h"
diff --git a/src/drivers/intel/usb4/retimer/retimer.c b/src/drivers/intel/usb4/retimer/retimer.c
index 9e627de348..3c867d479b 100644
--- a/src/drivers/intel/usb4/retimer/retimer.c
+++ b/src/drivers/intel/usb4/retimer/retimer.c
@@ -7,6 +7,7 @@
#include <device/device.h>
#include <drivers/usb/acpi/chip.h>
#include <gpio.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
#include "retimer.h"
diff --git a/src/drivers/nxp/uwb/uwb.c b/src/drivers/nxp/uwb/uwb.c
index 590b3f5154..3c4fac13ff 100644
--- a/src/drivers/nxp/uwb/uwb.c
+++ b/src/drivers/nxp/uwb/uwb.c
@@ -6,6 +6,7 @@
#include <device/device.h>
#include <device/spi.h>
#include <spi-generic.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/ocp/dmi/smbios.c b/src/drivers/ocp/dmi/smbios.c
index ead9b4d134..0ac3334751 100644
--- a/src/drivers/ocp/dmi/smbios.c
+++ b/src/drivers/ocp/dmi/smbios.c
@@ -6,6 +6,7 @@
#include <delay.h>
#include <cpu/x86/mp.h>
#include <timer.h>
+#include <stdio.h>
#include <string.h>
#include <soc/soc_util.h>
#include <soc/util.h>
diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c
index e87946f31b..75d6dc98dc 100644
--- a/src/drivers/spi/acpi/acpi.c
+++ b/src/drivers/spi/acpi/acpi.c
@@ -6,6 +6,7 @@
#include <device/device.h>
#include <device/spi.h>
#include <spi-generic.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/uart/acpi/acpi.c b/src/drivers/uart/acpi/acpi.c
index a245f2cf0e..716d522285 100644
--- a/src/drivers/uart/acpi/acpi.c
+++ b/src/drivers/uart/acpi/acpi.c
@@ -3,6 +3,7 @@
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <console/console.h>
+#include <stdio.h>
#include <string.h>
#include "chip.h"
diff --git a/src/drivers/usb/hub/acpi.c b/src/drivers/usb/hub/acpi.c
index ebbe4b2cf5..15732a8616 100644
--- a/src/drivers/usb/hub/acpi.c
+++ b/src/drivers/usb/hub/acpi.c
@@ -2,6 +2,7 @@
#include <acpi/acpigen.h>
#include <acpi/acpi_device.h>
+#include <stdio.h>
#include "chip.h"
diff --git a/src/drivers/usb/pci_xhci/pci_xhci.c b/src/drivers/usb/pci_xhci/pci_xhci.c
index 47f69c046c..b898642f12 100644
--- a/src/drivers/usb/pci_xhci/pci_xhci.c
+++ b/src/drivers/usb/pci_xhci/pci_xhci.c
@@ -7,6 +7,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/xhci.h>
+#include <stdio.h>
#include <stdlib.h>
#define PCI_XHCI_CLASSCODE 0x0c0330 /* USB3.0 xHCI controller */
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c
index 9e2936d037..fd1da06934 100644
--- a/src/drivers/wifi/generic/acpi.c
+++ b/src/drivers/wifi/generic/acpi.c
@@ -7,6 +7,7 @@
#include <device/pci_ids.h>
#include <mtcl.h>
#include <sar.h>
+#include <stdio.h>
#include <stdlib.h>
#include <wrdd.h>