Received: by 2002:ab2:23c8:0:b0:1f2:fdbc:cb93 with SMTP id a8csp62002lqe; Tue, 26 Mar 2024 20:57:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmMXoHz8Ztnzr5plhNbpVrQ2jpWM6O/tdf+4qtXGEMOq9F7Xd+ap6E0n6OK1vHUwGpi4cbpfTWe1Ivp5NTHLGWwB6Qr50ajAOjGRLeIQ== X-Google-Smtp-Source: AGHT+IFRAzWBg3KHPGrR0JXr5gWfacAGhp+O0hI2bqSTMxz1OCBG06EPdoydZLmUHIO2nXuHVtQF X-Received: by 2002:a05:620a:2910:b0:78a:656e:9c12 with SMTP id m16-20020a05620a291000b0078a656e9c12mr5425069qkp.19.1711511878672; Tue, 26 Mar 2024 20:57:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711511878; cv=pass; d=google.com; s=arc-20160816; b=COzpp6YCdln2APne1QP8mCljy17ptAlft3aWEYo6a/nMXnzpxzBYlyUtqHXC1mVFjw I0y0EXTCHQajIk4wP5oyBY+p6ywLk4itN+Tb0ZAg+xVUNSOAD8vM4ZClT9wMsZfnVZ2w Qni+7bbBTx6wQaRWTDBAFGwG5MvqyQJIh9gRawWW98+mVgXfzcOJVXt4bnDfKejUAjL7 Ciu57WGU/BEUpyWiGCDGKu2z+mr0jXnb4yNB4hjxT2DWl4i4WNgoD0txn7psnx9it2xW UZ3V8I4olaZ1WpLWyR97HTYXUqH+FBbzFiqnoLDtcsy1UyR96m1r5asrfZ6o5yd6fT+R EAng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=cKGBf+adoiCrnPE9QFI652wYHN6iBltm1Vxn30nfJ+s=; fh=rcP4vbyT0XETDsq+B09Xnx8WgMpTugPNVZyCuz4S35c=; b=E+IFXrfozlxW7OjhicEnWplPgGtUtc9eguXcBQwzx8iJ8FYeFLAtBs/0KhydCiQMDr aEYP5zQk4s+NKLd43WNIORW7RFox7fr+Ng+QipyPgmGWZRQ5kAtafFAcf8L+dogk7J1T 4TNg9izEx0nH1dT+EkK/sGDKb75YjsPRT2BUZIkVhEH7N0nZPvrCxQbhCIkenSp5/Jv9 zJtGUschVxDVfCKJL8u1g22pVp983quYuSoluBM7Xpr8m+CW8Dlf7ICWS7iaB2U02wB/ +uv+fbv4UdjVdLl9k5x5meO3Crac9KICxYgM0VJRltVak5KVrMpg9aaXfSUd1pRSn2VR ZTVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Adddd1rL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a12-20020a05622a064c00b0043130006c47si8990267qtb.691.2024.03.26.20.57.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 20:57:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Adddd1rL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-120280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120280-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 65DBD1C24E9D for ; Wed, 27 Mar 2024 03:57:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FB1A241E9; Wed, 27 Mar 2024 03:57:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Adddd1rL" 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 B9E9723748 for ; Wed, 27 Mar 2024 03:57:43 +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=1711511863; cv=none; b=Su6avHnBbTU9w7akB3rUaPiNB5XbHUMP8k/15Yd206bjD0i4dclqAkk3Sy9u7rqqvLLEtqRXLnEdgLOlJVwm3EB3wSSKD1WFG8mijymYEXRSpj7vOc7qtw3lUD7orrG5FanJLt/uHsK5+d9bj1d6DfapojVT5TlcWTqyeDEV3XY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711511863; c=relaxed/simple; bh=hFyZI6JIOVqAKDWWNwsqHoUwPVj8nbkInCOWf9ACfHE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ouc4vwsVBfdP1NfgxLBA0GBmoPf/HAkXquKZPAD9FHU/plDKeyuXQAXwJzRkMqzeVm0lgsZfNnWTc9fi77iBHjzGE20Ioa6V7A8/Vg0+vI1hdTMgUFr2L6qoIV54feid20r0wnrMFZr+mehpL1GSYr8pHGE7RAcZrgav1b71xcw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Adddd1rL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53BB4C433C7; Wed, 27 Mar 2024 03:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711511863; bh=hFyZI6JIOVqAKDWWNwsqHoUwPVj8nbkInCOWf9ACfHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Adddd1rL98guyiZFj5FfObOrFOobEIRw6q4ipEBoapNyoe/xKQ0WdShxIXzZARJA+ SkQPX3SZkjxwRahusbq70SGVkRFrJsjE0vR3djmHzsdI+/Bymr33Dnf0ES8JjW2eHx yrWCdkOf2401DsX797QLPKP6tdmKjyN1OJ7aq6hetU4Im+Nhw5ewV97FC/FLqiG4ec fIeT3vAF1Y9ExtrbrZHt7XM42pGY1Z7lbNnQonRVSC+RuGzkD5pRbJZfObQR66AOA7 QkZAwWzmCqRmqQYKs2E4wxKI2aKnoao0evoqgIq6yByEpKIJA4g24JqZ1LV4eG97zV P6PAqF+KG5PeQ== From: alexs@kernel.org To: Josh Poimboeuf , Peter Zijlstra , linux-kernel@vger.kernel.org (open list) Cc: linux-kernel@vger.kernel.org, "Alex Shi (tencent)" Subject: [PATCH v2 2/2] objtool: remove unused parameter for has_modified_stack_frame Date: Wed, 27 Mar 2024 12:00:47 +0800 Message-ID: <20240327040047.478695-2-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240327040047.478695-1-alexs@kernel.org> References: <20240327040047.478695-1-alexs@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Alex Shi (tencent)" Remove unused 'truct instruction *insn' to save a bit code text. Signed-off-by: Alex Shi Cc: Peter Zijlstra Cc: Josh Poimboeuf --- tools/objtool/check.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 88ac3e2be2bd..ecc56a5ad174 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2680,7 +2680,7 @@ static bool is_special_call(struct instruction *insn) return false; } -static bool has_modified_stack_frame(struct instruction *insn, struct insn_state *state) +static bool has_modified_stack_frame(struct insn_state *state) { struct cfi_state *cfi = &state->cfi; int i; @@ -3473,7 +3473,7 @@ static int validate_sibling_call(struct objtool_file *file, struct instruction *insn, struct insn_state *state) { - if (insn_func(insn) && has_modified_stack_frame(insn, state)) { + if (insn_func(insn) && has_modified_stack_frame(state)) { WARN_INSN(insn, "sibling call from callable instruction with modified stack frame"); return 1; } @@ -3503,7 +3503,7 @@ static int validate_return(struct symbol *func, struct instruction *insn, struct return 1; } - if (func && has_modified_stack_frame(insn, state)) { + if (func && has_modified_stack_frame(state)) { WARN_INSN(insn, "return with modified stack frame"); return 1; } -- 2.43.0