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 712D813541B; Tue, 8 Oct 2024 19:15:50 +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=1728414950; cv=none; b=LtG/Wjp4Uc1vVS5t5XPYiAbD8r8sMVAOzbnySfraZ1nkiGIj53tAkLo0AtRQr9ff2IW1aQeA5bpR7V+sQGkuxiYjmLNjKkAaZS4fivLL2ErfdSd9Qrh+nOWximJobScay14aGyieNDpA7wVTWSA7bXWV9RgGcqIGrbe+gn+nTRY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728414950; c=relaxed/simple; bh=O8MjuzFLVlk/VicWstQS6pFfK2YteU+f/iH5wcaRa7Y=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d+3aJHLOO1wBuYuKh8jxdXXSWsN2BLapM2k/CP28Tz2wjINpri7H1kZtOFKQnqwX6M/qufRcpl5WSRndgX9vfiv6lA7aTcgXOy3tUbwRnEahSNYh4cEl46GAtnks2R+On5d3XU99gZhOpOjh0V93gE9vXUvndqM6YqjcTV9wYzA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F50EC4CEC7; Tue, 8 Oct 2024 19:15:45 +0000 (UTC) Date: Tue, 8 Oct 2024 15:15:48 -0400 From: Steven Rostedt To: Christophe Leroy Cc: LKML , Linux Trace Kernel , linux-arm-kernel@lists.infradead.org, loongarch@lists.linux.dev, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, "linux-arch@vger.kernel.org" , "x86@kernel.org" , Masami Hiramatsu , Mathieu Desnoyers , Mark Rutland , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Madhavan Srinivasan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen Subject: Re: [PATCH] ftrace: Make ftrace_regs abstract from direct use Message-ID: <20241008151548.6a721c20@gandalf.local.home> In-Reply-To: <8e99826f-b38a-4cb3-ba5e-a20512248853@csgroup.eu> References: <20241007204743.41314f1d@gandalf.local.home> <20241007205458.2bbdf736@gandalf.local.home> <8e99826f-b38a-4cb3-ba5e-a20512248853@csgroup.eu> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 8 Oct 2024 08:24:22 +0200 Christophe Leroy wrote: > >> + > >> +struct ftrace_regs; > >> +#define arch_ftrace_regs(fregs) ((struct __arch_ftrace_regs *)(fregs)) > >> + > > > > I just realized I can simplify it with: > > > > #define arch_ftrace_get_regs(fregs) ({ &arch_ftrace_regs(fregs)->regs; }) > > Is it possible to write it as a static inline function to enforce type > checking ? Will do. Thanks, -- Steve