From patchwork Mon Jan 17 14:56:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhavan T. Venkataraman" X-Patchwork-Id: 12715507 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11D37C433EF for ; Mon, 17 Jan 2022 14:59:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=L8QonyB3PBEFlRaWGtw/jrXySg0s5a599HZg96Sz6zI=; b=nRdLzVLa9vUBfu ACXsJUdS0VA4hF8ewcU76ueEJCv15FqwStXeKGdH+/lXjRAt7Ou4lW/KZzTBV5fNLwGgg/UneLQtU fINZWPxTFnxygbOWQVoVsW0eC0kCep/e2JL9/KGvICKAR0V8btrmGqG1MI9tjHvvkYctu5YNXlSB/ yC/FmMrsqgPejWOQDtFZJlR+w8C2QT8e9TRi40x0I/DozBIh5yuYQZMqeOFcv2d3xJqsvtzvEt3Ee DmqgmxGNgxDI8RBOzYGZHGmXxFamff9HozhFinz3nXdqhsKU+iwZIkl2KZ6rIBxHp4mOV7gQWQJvj 2WaCwJGA23kLXXiXsf4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9TS5-00FGqc-CB; Mon, 17 Jan 2022 14:57:45 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9TQt-00FGMZ-2r for linux-arm-kernel@lists.infradead.org; Mon, 17 Jan 2022 14:56:32 +0000 Received: from x64host.home (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id DFFED20B913A; Mon, 17 Jan 2022 06:56:29 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DFFED20B913A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1642431390; bh=2pCZVm8MtKA36IH8thLS7DpFXD0j/nj2Mxtd3QCoxKQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rCer+V83dEQpthi9Cg459ZrRToi90T/9efdI9SsiNnY3oGwYq+jHVn1Ea4f0nP6Wp l0Xr7Jr/1FzTl4uAoV95W35x1OudhGCfym/KFARfkD+BdDdT/TxSQZCexRc2kSI8Ho JYoYU2L6FszLjyeS4Nsr7MEY2xCmGTgayB1HJ4FA= From: madvenka@linux.microsoft.com To: mark.rutland@arm.com, broonie@kernel.org, jpoimboe@redhat.com, ardb@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jmorris@namei.org, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, madvenka@linux.microsoft.com Subject: [PATCH v13 06/11] arm64: Use stack_trace_consume_fn and rename args to unwind() Date: Mon, 17 Jan 2022 08:56:03 -0600 Message-Id: <20220117145608.6781-7-madvenka@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220117145608.6781-1-madvenka@linux.microsoft.com> References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220117145608.6781-1-madvenka@linux.microsoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220117_065631_245096_2B551F45 X-CRM114-Status: GOOD ( 10.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Madhavan T. Venkataraman" Rename the arguments to unwind() for better consistency. Also, use the typedef stack_trace_consume_fn for the consume_entry function as it is already defined in linux/stacktrace.h. Signed-off-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown Reviewed-by: Mark Rutland --- arch/arm64/kernel/stacktrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 1b32e55735aa..f772dac78b11 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -181,12 +181,12 @@ static int notrace unwind_next(struct unwind_state *state) NOKPROBE_SYMBOL(unwind_next); static void notrace unwind(struct unwind_state *state, - bool (*fn)(void *, unsigned long), void *data) + stack_trace_consume_fn consume_entry, void *cookie) { while (1) { int ret; - if (!fn(data, state->pc)) + if (!consume_entry(cookie, state->pc)) break; ret = unwind_next(state); if (ret < 0)