From mboxrd@z Thu Jan 1 00:00:00 1970 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 22852C433EF for ; Tue, 15 Feb 2022 18:12:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242935AbiBOSNF (ORCPT ); Tue, 15 Feb 2022 13:13:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235191AbiBOSND (ORCPT ); Tue, 15 Feb 2022 13:13:03 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B2BB97A98A; Tue, 15 Feb 2022 10:12:53 -0800 (PST) Received: from [192.168.254.32] (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id A581420B9CF5; Tue, 15 Feb 2022 10:12:52 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A581420B9CF5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1644948773; bh=CrIgQUKb1HglN6AVYkIW+bL+3Y+CE5Nv6JIlctqQHXk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D0f/EsmVjfNeQ8g+rDkBc2/fwtcu3WJaAEgaU6AwIpiN27m1SMPKmugMMJUCjRkbt zKIdrYOEfzWAEpSKN4qkQQhula/OcmSfeXPE+KlJ+SOeTen/wYsCOAEGoi1QyPQsBk GRQSOqt/g8A8SsyFIKUhbsO0fuN9jSRMuOm2EEgQ= Message-ID: Date: Tue, 15 Feb 2022 12:12:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v13 06/11] arm64: Use stack_trace_consume_fn and rename args to unwind() Content-Language: en-US To: Mark Rutland Cc: 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 References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220117145608.6781-1-madvenka@linux.microsoft.com> <20220117145608.6781-7-madvenka@linux.microsoft.com> From: "Madhavan T. Venkataraman" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/15/22 07:39, Mark Rutland wrote: > On Mon, Jan 17, 2022 at 08:56:03AM -0600, madvenka@linux.microsoft.com wrote: >> 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 > > How about: > > | arm64: align with common stracktrace naming > | > | For historical reasons, the naming of parameters and their types in the arm64 > | stacktrace code differs from that used in generic code and other > | architectures, even though the types are equivalent. > | > | For consistency and clarity, use the generic names. > Will add this. Madhavan > Either way: > > Reviewed-by: Mark Rutland > > Mark. > >> --- >> 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) >> -- >> 2.25.1 >> From mboxrd@z Thu Jan 1 00:00:00 1970 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 19F69C433F5 for ; Tue, 15 Feb 2022 18:14:09 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Snc5SHv5ObYuR7qaLDgTXi5Dl1hG5PivQal6xXlLRPg=; b=w85M2SYnaZciD2 KaespwZ6tdPY1chLLcyast535BVk5gJwE2vzI6+AqQQfsGApoR6Vc3OhzQ8cwFVgHbIkmBO1Gr44o V67BcbB8tVxfOgNsMofncisdEMy6IcWuWMtITbJLbMtBxxZQOVbM38kJI9W+rxVCWx+mGBA1GyIKw K40julJNtin02Ermd04S1MsguDVWLOLEokHSVTvN/GGZFkfrmcNv3XB1BDjSAY5FVd6oRo9cwaaLn WHOspwy7w09oewJ9KFdf4FEeDwzXl+/i+V9o/mkXgrsvn58lmoYefVq72p2BqF3Ki9xFdIRdkRwT9 cEyz2V2a+4cQrK9z8Svg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK2Jt-0041yq-CC; Tue, 15 Feb 2022 18:12:57 +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 1nK2Jq-0041xw-6c for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 18:12:55 +0000 Received: from [192.168.254.32] (unknown [47.187.212.181]) by linux.microsoft.com (Postfix) with ESMTPSA id A581420B9CF5; Tue, 15 Feb 2022 10:12:52 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A581420B9CF5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1644948773; bh=CrIgQUKb1HglN6AVYkIW+bL+3Y+CE5Nv6JIlctqQHXk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D0f/EsmVjfNeQ8g+rDkBc2/fwtcu3WJaAEgaU6AwIpiN27m1SMPKmugMMJUCjRkbt zKIdrYOEfzWAEpSKN4qkQQhula/OcmSfeXPE+KlJ+SOeTen/wYsCOAEGoi1QyPQsBk GRQSOqt/g8A8SsyFIKUhbsO0fuN9jSRMuOm2EEgQ= Message-ID: Date: Tue, 15 Feb 2022 12:12:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v13 06/11] arm64: Use stack_trace_consume_fn and rename args to unwind() Content-Language: en-US To: Mark Rutland Cc: 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 References: <95691cae4f4504f33d0fc9075541b1e7deefe96f> <20220117145608.6781-1-madvenka@linux.microsoft.com> <20220117145608.6781-7-madvenka@linux.microsoft.com> From: "Madhavan T. Venkataraman" In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220215_101254_302308_CC1AF07F X-CRM114-Status: GOOD ( 16.47 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/15/22 07:39, Mark Rutland wrote: > On Mon, Jan 17, 2022 at 08:56:03AM -0600, madvenka@linux.microsoft.com wrote: >> 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 > > How about: > > | arm64: align with common stracktrace naming > | > | For historical reasons, the naming of parameters and their types in the arm64 > | stacktrace code differs from that used in generic code and other > | architectures, even though the types are equivalent. > | > | For consistency and clarity, use the generic names. > Will add this. Madhavan > Either way: > > Reviewed-by: Mark Rutland > > Mark. > >> --- >> 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) >> -- >> 2.25.1 >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel