From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4923C445AFE for ; Mon, 7 Sep 2026 10:38:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788777485; cv=none; b=K7E2fPeuChGFSOBIpjYOAt5QIVZj9ZsolpuS/Zfv6z0bJ83ia/WmxMP2XDJwTiz73vSs/zyviuGYjXjVKqHIGMXwJ/DasMMar0TTBnycKfodZV9XLrjM64CsU+3g95KSRnqiqVNGILAm8K3hTHyZfHy66wwjDY+89EKJAWPHB4Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788777485; c=relaxed/simple; bh=QmR/Yx3GrmMipQLhapvopexweDGgNDUHESy75coOzxM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dNn5rzAD6c44V2NqOuX/19ebcfdFRFz+I+IJnwUv0pPJewHiB5Hzww8v+9+TKZ6C8f9PsBBltwtxzxnJhVh75Esftnd6K9Mu7cByn8wOxpIdDQwytKFJMMSs6GUxUAIqbV/zyXWc2c4F2VTkwAofttWQBpuH295AKkuI5Nj6sy8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jRysfNPx; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jRysfNPx" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-49cf4f81d86so26504275e9.2 for ; Mon, 07 Sep 2026 03:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1788777481; x=1789382281; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=f3dNc7Al5lEDIZNoArJSIQ8XFdfYUdjRGc8JYGTevN8=; b=jRysfNPxAaRespYuYAXv0Wh42dSEnnYk463AOwDHEO5PUTfbri8mkeAVb65wSpeMJL Vj+uFukEVJVJDafsY+mangsQ2asvI5BaLPDL5TLQGrpZLZZDTTVnZPr2NBxAH9MpFhAY fy0N+/U3MHLgKaZYuzwi7apltQPeeg8QqQ5kAgT/bt3qB9D7OK1xCfBHNc42p6z0rmk8 OCn3E1tJd/1/zo17U1UA1j2+Vq9+TKLd91wAbKQOUOCrhbu0c6cxeaBuEK4mNGpsBKd/ fBDqtAACalLoRBBGJxJlshf7W1Q0DMki2hemYXTromSt4wpwAf6rCMpC8uvrYWa1Zjsq Tt9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788777481; x=1789382281; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=f3dNc7Al5lEDIZNoArJSIQ8XFdfYUdjRGc8JYGTevN8=; b=IdXj/CSQ2EHjLmyla6gXpeJGJWk0Nb7CkQ+8zYnFlmP834UfKJqyeCbdHj0XMc1nKj XnG9WHDNqE16SD3mavHxASIuZ2OyPf41s7wEMJPLnOr7IV26g48lK9CVq9opy1+xznoM xlajB2bRmWXD9F+X9oE5aqXsGP1e5e9C1/BfP0xDOwRQN7K0x8FWnDAZ4P7KwAw+9nC0 lqJvTYA7VqT4Mak8UmT5AWqCKx9xo6W/FRg88LadHhIr+qtgVn6ik6+6SQ4MhLq89rEo KtN3RoYEWgZSgDW5wG0Ejvn3XPThBsM7pd6g3d519zNXMh/rmpfx+cFLOyHdOE2kB45q qVng== X-Forwarded-Encrypted: i=1; AKwUvByqiCqL1Vc2fHaj8dRiUTuTQr5PM8Sl8YDObuRzpNn9m6QzrvbF/o9dUVue5qnPgHkcTzQLSQXTV5w=@vger.kernel.org X-Gm-Message-State: AFuF++kMBFega/juABQVt5RffO7CiCZMN/rpppgjo1zuh+KB5UysaqqE dwjbYpOi8ZeZLJvddFOsoMPos599fjjgeSLEmptzo4NbrradCGHN5G66 X-Gm-Gg: AYBFou2MrB4nrohe6/BbA14iKnr4aWnp8T4lMkxilGY9KlTymvM+vmvcIYMKH46p7MJ obwk040YZOoKmNRYmQyPWKXRBKgq3cvZgC8v+ALK4npspKT3Bt0IYNIrNrGsd9/21kOnieSgIhN kkgMGlFGFCsQQqvKQ5DhvMFX2R2/Ct1BnWUCYMed7LnNOf/G4KJNMF8yW9v5tOwLAKm+d52getN YrYHl2CRZOJ+vMvrDMOJpHsUwf3R2UMKw1DRYAoC6ukICNsRINyZJTGIiosann5QFOfRdQhj+Uc DWwNwvQkrRAME5nJ1+H/K3X3VC6vtKcPlxFoUmNa6Tb1klICuEQfF5vgjj4e/BgsqkacbbpbOFg EsjNvjZdWRzXqnkxr2uBNt9a/GjBaYE2aGJS2yINqcuwanAk3xU1WT/cj/lu5Uhr1ceGfOmJ5n+ BNIN69o5q577F4MXu6mXQAd7desYltt4tHAu8YcSj25vxBnr8M3MWz2Vsj6iXuL7K7b9WDayFlE ZxDo3JI9CJj20vkil5A0j4vGmMxyxGTENrXMzNEmA5493MHndmEzc8S5ww+Ig== X-Received: by 2002:a05:600d:8481:20b0:49c:fde6:8b39 with SMTP id 5b1f17b1804b1-49cfde68bacmr131347985e9.29.1788777481081; Mon, 07 Sep 2026 03:38:01 -0700 (PDT) Received: from localhost.localdomain ([95.3.12.38]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49ce5533ffbsm311944285e9.3.2026.09.07.03.37.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Sep 2026 03:38:00 -0700 (PDT) From: Erkan Erdem To: Nathan Chancellor , Nicolas Schier Cc: Erkan Erdem , Julian Braha , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Shuah Khan , Randy Dunlap , linux-doc@vger.kernel.org, Nick Desaulniers , Bill Wendling , Justin Stitt , Kees Cook , Masahiro Yamada , llvm@lists.linux.dev Subject: [PATCH v2] docs: kconfig: fix shell function syntax in caveats Date: Mon, 7 Sep 2026 13:37:37 +0300 Message-ID: <20260907103739.23212-1-hexvalid@gmail.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Kconfig separates a function name from its arguments with a comma, but the caveats section uses Make-style whitespace in its shell calls. These expressions expand as undefined variables rather than invoking the shell function, so the supposedly working CC_HAS_ENDIAN_FLAG example fails to parse. Add the missing commas to the shell calls in this section. Keep the Make examples unchanged. Fixes: 316d55d55f49 ("Documentation: kconfig: document a new Kconfig macro language") Assisted-by: LLM Signed-off-by: Erkan Erdem --- Changes in v2, addressing Julian Braha's review: - Remove whitespace after the comma in the three remaining shell calls. v1: https://lore.kernel.org/all/20260905124045.42713-1-hexvalid@gmail.com/ The issue, patch and changelog were prepared with an AI coding assistant. The assistant also prepared the v2 revision and ran the checks below. Validation: - Re-ran the documented working CC_HAS_ENDIAN_FLAG example using the Kconfig conf tool built with Clang on macOS. With a test helper returning y for either endian flag, the original example fails to parse; v2 executes both probes and sets CC_HAS_ENDIAN_FLAG=y for both endiannesses. - Rebuilt the changed page alone with Sphinx, treating warnings as errors. - The complete kernel documentation set and kernel were not built. Documentation/kbuild/kconfig-macro-language.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/kbuild/kconfig-macro-language.rst b/Documentation/kbuild/kconfig-macro-language.rst index 6163467f6..c427bece3 100644 --- a/Documentation/kbuild/kconfig-macro-language.rst +++ b/Documentation/kbuild/kconfig-macro-language.rst @@ -225,7 +225,7 @@ not work:: $(MY_TYPE) "foo" default y -Obviously from the design, $(shell command) is expanded in the textual +Obviously from the design, $(shell,command) is expanded in the textual substitution phase. You cannot pass symbols to the 'shell' function. The following does not work as expected:: @@ -236,12 +236,12 @@ The following does not work as expected:: default "-mlittle-endian" if CPU_LITTLE_ENDIAN config CC_HAS_ENDIAN_FLAG - def_bool $(shell $(srctree)/scripts/gcc-check-flag ENDIAN_FLAG) + def_bool $(shell,$(srctree)/scripts/gcc-check-flag ENDIAN_FLAG) Instead, you can do like follows so that any function call is statically expanded:: config CC_HAS_ENDIAN_FLAG bool - default $(shell $(srctree)/scripts/gcc-check-flag -mbig-endian) if CPU_BIG_ENDIAN - default $(shell $(srctree)/scripts/gcc-check-flag -mlittle-endian) if CPU_LITTLE_ENDIAN + default $(shell,$(srctree)/scripts/gcc-check-flag -mbig-endian) if CPU_BIG_ENDIAN + default $(shell,$(srctree)/scripts/gcc-check-flag -mlittle-endian) if CPU_LITTLE_ENDIAN base-commit: 4d7d9486c04d917265f64c55bd23b2cc4fe7749c -- 2.50.1 (Apple Git-155)