From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49CD72C327E; Mon, 2 Jun 2025 14:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748875390; cv=none; b=SxcgWD2shNHcOISQoV9kB+wioYtK6yCF8L/Pn7/t3ow0/QEZ/O6gPJMJrB7jBiHu5NsFawJHvblaQUmVqQA6L+2n+uZyLsMz57xeelvx09u0kRxl6ywsdiC4lEjEh7/1qWPmnPpwSBACndLq5rjpBb84xkAdoUTnqJ5SwrdfQmU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748875390; c=relaxed/simple; bh=xSH79XWC6Er7XPZWdUCTAAxaIf79IufMF5C3cPj4dOE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CCraGz+zlgccy9laU5ARGoA0UzOt88SPKqzKDnrWQ1g29ba/Tp8F8RXYGc1yT99zGR/zriZbPam+/2cadvl9YTMa/hgWj83Gz9nVqZfr03UymAi6lC37GX70UY+LG59IOsWNBo9aHA51WoV0yRLNd/66TJwK8+mcFuORxoMG4DM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tnvXeRm9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tnvXeRm9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A18A9C4CEEB; Mon, 2 Jun 2025 14:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748875390; bh=xSH79XWC6Er7XPZWdUCTAAxaIf79IufMF5C3cPj4dOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tnvXeRm9f5z7S7C4jfe2Ry4fKSFVCjom8wTCWHdJtF5KIR1OwQ3BoxYCTh9dgzgj5 qtip4g1rL3I7EGEOf26naVNOajc2FZkhP1bmbBrpQ3dmNoRQhuW6zvuAUaPGk9JNbZ bRmM5eCg+itasJEMuBjB//xAAOx2eTq/9w3WRhpE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Daniel Gomez , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.10 119/270] kconfig: merge_config: use an empty file as initfile Date: Mon, 2 Jun 2025 15:46:44 +0200 Message-ID: <20250602134312.090531170@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250602134307.195171844@linuxfoundation.org> References: <20250602134307.195171844@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Gomez [ Upstream commit a26fe287eed112b4e21e854f173c8918a6a8596d ] The scripts/kconfig/merge_config.sh script requires an existing $INITFILE (or the $1 argument) as a base file for merging Kconfig fragments. However, an empty $INITFILE can serve as an initial starting point, later referenced by the KCONFIG_ALLCONFIG Makefile variable if -m is not used. This variable can point to any configuration file containing preset config symbols (the merged output) as stated in Documentation/kbuild/kconfig.rst. When -m is used $INITFILE will contain just the merge output requiring the user to run make (i.e. KCONFIG_ALLCONFIG=<$INITFILE> make or make olddefconfig). Instead of failing when `$INITFILE` is missing, create an empty file and use it as the starting point for merges. Signed-off-by: Daniel Gomez Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kconfig/merge_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index d7d5c58b8b6aa..557f37f481fdf 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -98,8 +98,8 @@ INITFILE=$1 shift; if [ ! -r "$INITFILE" ]; then - echo "The base file '$INITFILE' does not exist. Exit." >&2 - exit 1 + echo "The base file '$INITFILE' does not exist. Creating one..." >&2 + touch "$INITFILE" fi MERGE_LIST=$* -- 2.39.5