From patchwork Fri Jan 27 16:40:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13118992 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03400C38142 for ; Fri, 27 Jan 2023 16:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234040AbjA0Qk4 (ORCPT ); Fri, 27 Jan 2023 11:40:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234054AbjA0Qkz (ORCPT ); Fri, 27 Jan 2023 11:40:55 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 528317CC98; Fri, 27 Jan 2023 08:40:51 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1A96CB82013; Fri, 27 Jan 2023 16:40:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15C12C433EF; Fri, 27 Jan 2023 16:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674837648; bh=gL29Zrz0/D+2aRM80IoOkzpVQZltIiXkr3UTM6jkxQI=; h=From:To:Cc:Subject:Date:From; b=FEAY7lRPlS71P4vd1mnOb99+zfCXZaNiJYGX4C2auV8u6+E/Fr/+xnTia4it9Lg/A TKsdC0BkfD8EveWUIgnGydssTz39HY/6ecVefBUWWopPuSN1IYZ9Zt/GNhb+RCInDF J1nViTa+lFvrk29dS6qrYa9O6m+V9Bmtgrk7u34UfAWvNMizFXZkZyXOCHrkzlMou2 +7QkQ9lUnQkg4aQKEAEpzlOUHOPjexk/clFb6WhiwIFtfQ5dX+on8ey9bg4rjE/G6w bq5Qrj4hsjAPdMn4lsiac0f94e1c62dTuL0XUjSLFW1Yw7ptqEtyKwpDu46SFACjvf ig2SpHcdkRvMg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH] setlocalversion: remove unneeded check and set -e Date: Sat, 28 Jan 2023 01:40:41 +0900 Message-Id: <20230127164041.548225-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Kbuild creates include/config/auto.conf before running this script, so include/config/auto.conf always exists unless the user directly runs this script. Remove the redundant check. Instead, set -e. Signed-off-by: Masahiro Yamada --- scripts/setlocalversion | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 7c7cbefa5aa4..3df25b045e81 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -10,6 +10,8 @@ # # +set -e + usage() { echo "Usage: $0 [srctree]" >&2 exit 1 @@ -103,11 +105,6 @@ collect_files() echo "$res" } -if ! test -e include/config/auto.conf; then - echo "Error: kernelrelease not valid - run 'make prepare' to update it" >&2 - exit 1 -fi - if [ -z "${KERNELVERSION}" ]; then echo "KERNELVERSION is not set" >&2 exit 1