From patchwork Mon Dec 1 17:04:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 779 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608875; bh=ASCnB/rrhlRci/NNbwHVTH+ze+VC5zSGCKMKbxc/BRs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qWuz3hj85RVFkz7e+AAltlwH5+w/pwgngQxr8hoGE/MAVyuCb03O7hJY57mXSiBfy nM4p6/ZPp13KbqfBPpNm0p93MwzjxRkxZGl8ndRxIXXBxi/9EkfgAt1WBwWkDsR0UC zVJjJPDKjrH++wz7rMpfqphx23xrajKKyM5VPpITCNSu8bha8yULOoqav6KOeoB8UV RcRBs8DPTd4VePinvk+FWNn0x4DzRMIMjlitjHR3SyOo5oBeS4fcDk0q2H1SULkJw+ r+TubZ+3ptM5y1ToJPJWL2d15R4NuNMYNP58bhhLuY1TgQEwmEbrTwDdUaUgxpi+tY nA2zx/vQ/3EGQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C325A5E439 for ; Mon, 1 Dec 2025 10:07:55 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id eVNM4c3jThEP for ; Mon, 1 Dec 2025 10:07:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608875; bh=ASCnB/rrhlRci/NNbwHVTH+ze+VC5zSGCKMKbxc/BRs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qWuz3hj85RVFkz7e+AAltlwH5+w/pwgngQxr8hoGE/MAVyuCb03O7hJY57mXSiBfy nM4p6/ZPp13KbqfBPpNm0p93MwzjxRkxZGl8ndRxIXXBxi/9EkfgAt1WBwWkDsR0UC zVJjJPDKjrH++wz7rMpfqphx23xrajKKyM5VPpITCNSu8bha8yULOoqav6KOeoB8UV RcRBs8DPTd4VePinvk+FWNn0x4DzRMIMjlitjHR3SyOo5oBeS4fcDk0q2H1SULkJw+ r+TubZ+3ptM5y1ToJPJWL2d15R4NuNMYNP58bhhLuY1TgQEwmEbrTwDdUaUgxpi+tY nA2zx/vQ/3EGQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B2B75688A7 for ; Mon, 1 Dec 2025 10:07:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608873; bh=wUB0C54cVEe9gmDWmFK546MbZeKmWPz3p8nj7bVYz7g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v6Cb4wGjVvz+8IGIa9L+zV8CSI3PTtR5j2m18EXJTNtKRzS/ebGLniZ7Ll3o/uRRo XgPy39ZKTvSzKrQhcC4CKRehVCHg0uiKx0IkS9WXC1v0DmBINDpgVeEJZqG6PeAY4r jsb807nwLvkhSdOdVJHCeY6WB1hI7RbqfQTiHX3QIPD7w1vJHOzEcCdabbkUpoPQ9R qVAz5O1Bwiq86YkdoVySv3W/rTHJNtT6yxxTlTpsojGPafb9FvVOMgTqHrM975vF7n DK/RqPzxcr98C50DZxAMaQBMtkWteC4BJB22yyjtN9I6UEIELQmTmy2jUdehfTiYx3 mfB0OYPPVo3cQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B585E68891; Mon, 1 Dec 2025 10:07:53 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id ceCGOmJDhOjT; Mon, 1 Dec 2025 10:07:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1764608868; bh=MmvdXpppQ8K/n9yw7zdIXF04T/iitSCtiv+sr8gbLJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XlXzVjzbhZesPtqHH8E8FwelJ0rwGu0BHKSlxcTtMkgaIcrgh4oQO+1agdevQA0ZW mj9ZwGsRzhZ3V8MdS9GiH4ijDzflibqiZw+s8Ki8Q1rTNkF5nC+y2/5TY+VzdqzJqC e/C91d9r5dkN4Kxkey8CGD4+POhi0RO1f4vgDukn3yIQqcJnc0215nKvYi1pG30FST YltbniI8Oj6E8HSGvoQxrUZJxaV4qJQAE9sFXwWy/d0PLO4ev7Tp8zyTHMpya3x9ye z/Y4M4tZbfCzn4lgs89ma0jNrzkwYgb6HRHc30iREAMFD5ztabOq6lOcpYAbaWvsm2 /13RbW/lMtRvw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3B82068821; Mon, 1 Dec 2025 10:07:48 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 1 Dec 2025 10:04:41 -0700 Message-ID: <20251201170529.3237986-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251201170529.3237986-1-sjg@u-boot.org> References: <20251201170529.3237986-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: JPQNZKZ5TYLP5BC6FOSRXJM32GIXM5V5 X-Message-ID-Hash: JPQNZKZ5TYLP5BC6FOSRXJM32GIXM5V5 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/37] treewide: Add missing string.h includes List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add string.h to files that use string functions like strdup, strcmp, strcpy, etc. These are implicitly available through the malloc.h header but that will soon change. For bouncebuf, take this opportunity to sort the headers correctly. Co-developed-by: Claude Signed-off-by: Simon Glass --- arch/arm/mach-zynq/slcr.c | 1 + board/ti/common/cape_detect.c | 1 + boot/expo_build_cb.c | 1 + cmd/printf.c | 1 + common/bouncebuf.c | 5 +++-- common/iomux.c | 1 + common/menu.c | 1 + drivers/crypto/fsl/desc_constr.h | 1 + drivers/crypto/fsl/error.c | 1 + drivers/crypto/fsl/fsl_blob.c | 1 + drivers/crypto/fsl/fsl_hash.c | 1 + drivers/dma/apbh_dma.c | 1 + drivers/fpga/versalpl.c | 1 + drivers/net/fsl-mc/dpio/qbman_portal.c | 1 + drivers/net/qe/uccf.c | 1 + drivers/spi/spi-mem-nodm.c | 1 + drivers/video/imx/ipu_common.c | 1 + lib/circbuf.c | 1 + lib/crypto/x509_helper.c | 2 ++ lib/dhry/dhry_1.c | 1 + lib/libavb/avb_sysdeps_posix.c | 1 + lib/linux_compat.c | 1 + lib/list_sort.c | 1 + lib/mbedtls/mscode_parser.c | 1 + lib/membuf.c | 1 + lib/strto.c | 1 + 26 files changed, 29 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index ef877df0fe8..b69d5aad961 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/board/ti/common/cape_detect.c b/board/ti/common/cape_detect.c index da805befabc..4984f7a3a22 100644 --- a/board/ti/common/cape_detect.c +++ b/board/ti/common/cape_detect.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "cape_detect.h" diff --git a/boot/expo_build_cb.c b/boot/expo_build_cb.c index 442ad760e79..6dd3dbd92b8 100644 --- a/boot/expo_build_cb.c +++ b/boot/expo_build_cb.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/cmd/printf.c b/cmd/printf.c index a1727ac15a2..52f21c8b842 100644 --- a/cmd/printf.c +++ b/cmd/printf.c @@ -89,6 +89,7 @@ #include #include #include +#include #include #define WANT_HEX_ESCAPES 0 diff --git a/common/bouncebuf.c b/common/bouncebuf.c index b2f87e4d939..5a7d3efa521 100644 --- a/common/bouncebuf.c +++ b/common/bouncebuf.c @@ -5,11 +5,12 @@ * Copyright (C) 2012 Marek Vasut */ +#include #include +#include #include #include -#include -#include +#include #include #include diff --git a/common/iomux.c b/common/iomux.c index 1224c15eb71..e488934b29f 100644 --- a/common/iomux.c +++ b/common/iomux.c @@ -7,6 +7,7 @@ #include #include #include +#include #if CONFIG_IS_ENABLED(CONSOLE_MUX) void iomux_printdevs(const int console) diff --git a/common/menu.c b/common/menu.c index 5a2126aa01a..b66803337d3 100644 --- a/common/menu.c +++ b/common/menu.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/crypto/fsl/desc_constr.h b/drivers/crypto/fsl/desc_constr.h index 209557c4ffa..ce938d49887 100644 --- a/drivers/crypto/fsl/desc_constr.h +++ b/drivers/crypto/fsl/desc_constr.h @@ -7,6 +7,7 @@ * Based on desc_constr.h file in linux drivers/crypto/caam */ +#include #include #include "desc.h" diff --git a/drivers/crypto/fsl/error.c b/drivers/crypto/fsl/error.c index dfcf5dbab35..9008dccb27c 100644 --- a/drivers/crypto/fsl/error.c +++ b/drivers/crypto/fsl/error.c @@ -9,6 +9,7 @@ #include #include +#include #include #include "desc.h" #include "jr.h" diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c index 0ecd6befd25..32beb03e8ae 100644 --- a/drivers/crypto/fsl/fsl_blob.c +++ b/drivers/crypto/fsl/fsl_blob.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include "jobdesc.h" diff --git a/drivers/crypto/fsl/fsl_hash.c b/drivers/crypto/fsl/fsl_hash.c index 79b32e2627c..ea90aece64b 100644 --- a/drivers/crypto/fsl/fsl_hash.c +++ b/drivers/crypto/fsl/fsl_hash.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "jobdesc.h" #include "desc.h" #include "jr.h" diff --git a/drivers/dma/apbh_dma.c b/drivers/dma/apbh_dma.c index 331815c469f..89ff00540ae 100644 --- a/drivers/dma/apbh_dma.c +++ b/drivers/dma/apbh_dma.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c index 1957e8dcaca..2fba888b8cc 100644 --- a/drivers/fpga/versalpl.c +++ b/drivers/fpga/versalpl.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/net/fsl-mc/dpio/qbman_portal.c b/drivers/net/fsl-mc/dpio/qbman_portal.c index f4e82b0507c..d338fac4def 100644 --- a/drivers/net/fsl-mc/dpio/qbman_portal.c +++ b/drivers/net/fsl-mc/dpio/qbman_portal.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include "qbman_portal.h" diff --git a/drivers/net/qe/uccf.c b/drivers/net/qe/uccf.c index badf4e5db3e..ab411361722 100644 --- a/drivers/net/qe/uccf.c +++ b/drivers/net/qe/uccf.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/spi/spi-mem-nodm.c b/drivers/spi/spi-mem-nodm.c index 6d9ab61769a..6a79fda625b 100644 --- a/drivers/spi/spi-mem-nodm.c +++ b/drivers/spi/spi-mem-nodm.c @@ -8,6 +8,7 @@ #include #include #include +#include int spi_mem_exec_op(struct spi_slave *slave, const struct spi_mem_op *op) diff --git a/drivers/video/imx/ipu_common.c b/drivers/video/imx/ipu_common.c index bd1ef0a800d..40d578d3980 100644 --- a/drivers/video/imx/ipu_common.c +++ b/drivers/video/imx/ipu_common.c @@ -13,6 +13,7 @@ /* #define DEBUG */ #include #include +#include #include #include #include diff --git a/lib/circbuf.c b/lib/circbuf.c index 461c240f788..043b5a60d36 100644 --- a/lib/circbuf.c +++ b/lib/circbuf.c @@ -6,6 +6,7 @@ #include #include +#include #include diff --git a/lib/crypto/x509_helper.c b/lib/crypto/x509_helper.c index 87e8ff67ae1..bf79d42cd60 100644 --- a/lib/crypto/x509_helper.c +++ b/lib/crypto/x509_helper.c @@ -5,6 +5,8 @@ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) */ + +#include #include #include #include diff --git a/lib/dhry/dhry_1.c b/lib/dhry/dhry_1.c index 275a89942ea..4287b57e316 100644 --- a/lib/dhry/dhry_1.c +++ b/lib/dhry/dhry_1.c @@ -44,6 +44,7 @@ char SCCSid[] = "@(#) @(#)dhry_1.c:3.4 -- 5/15/91 19:30:21"; #include #include +#include #include "dhry.h" diff --git a/lib/libavb/avb_sysdeps_posix.c b/lib/libavb/avb_sysdeps_posix.c index 6ffdb0b7eb3..1fde82be4d8 100644 --- a/lib/libavb/avb_sysdeps_posix.c +++ b/lib/libavb/avb_sysdeps_posix.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "avb_sysdeps.h" diff --git a/lib/linux_compat.c b/lib/linux_compat.c index 985e88eb397..4df9db689ed 100644 --- a/lib/linux_compat.c +++ b/lib/linux_compat.c @@ -1,6 +1,7 @@ #include #include +#include #include #include diff --git a/lib/list_sort.c b/lib/list_sort.c index a6e54d5bc46..cf5cac17720 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -8,6 +8,7 @@ #include #include #include +#include #endif #include #include diff --git a/lib/mbedtls/mscode_parser.c b/lib/mbedtls/mscode_parser.c index c3805c6503c..956a5a47243 100644 --- a/lib/mbedtls/mscode_parser.c +++ b/lib/mbedtls/mscode_parser.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/lib/membuf.c b/lib/membuf.c index 207dff5625b..02b0cc8c6b0 100644 --- a/lib/membuf.c +++ b/lib/membuf.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "membuf.h" diff --git a/lib/strto.c b/lib/strto.c index 206d1e91847..b7b3655f17f 100644 --- a/lib/strto.c +++ b/lib/strto.c @@ -11,6 +11,7 @@ #include #include +#include #include #include