Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70ED7C83000 for ; Tue, 28 Apr 2020 12:36:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1E07B206D7 for ; Tue, 28 Apr 2020 12:36:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="eRm6jJkJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1E07B206D7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49BLjm2ryczDqrM for ; Tue, 28 Apr 2020 22:36:28 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49BLcL3ldxzDqq0 for ; Tue, 28 Apr 2020 22:31:46 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=eRm6jJkJ; dkim-atps=neutral Received: by ozlabs.org (Postfix) id 49BLcK0VjJz9sSb; Tue, 28 Apr 2020 22:31:45 +1000 (AEST) Received: by ozlabs.org (Postfix, from userid 1034) id 49BLcJ4vXTz9sSX; Tue, 28 Apr 2020 22:31:44 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1588077104; bh=wy03yepSpqsjCBPSF2K+kZ5N+dnTm77fuwzYpQt9v3w=; h=From:To:Subject:Date:From; b=eRm6jJkJVkRNtDm54jMAHcLetomVHw81B2TDCjgUGT2jLXfy4PdQCihdNl5kcMW2g 36+yvIKzbuVNjt+mE+xaILpKFf0Nz0J2v0ss5dVM97XvIUi5++6mrQyopfjmNlldVw 7MlB5SPqI8xTD6biX24gS8PCpzvXGzI4EXMH5wplCrNMzGOxNZzD+4qsrCNCERsT3h zOhN27Aeog9UUl+SEs2cfwmrAoQHT8NBaBGrQY3zQriDdOEHxYQvL8klst1a3gyg5R 6wzAWziDC4GftvB2vcaypoKwEghfemTB/jGPalGu4YXJz7FcUiZ8EZCamwOPCxAfMc 0zsr5FyHj8rPw== From: Michael Ellerman To: linuxppc-dev@ozlabs.org Subject: [PATCH] powerpc: Drop unneeded cast in task_pt_regs() Date: Tue, 28 Apr 2020 22:31:52 +1000 Message-Id: <20200428123152.73566-1-mpe@ellerman.id.au> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" There's no need to cast in task_pt_regs() as tsk->thread.regs should already be a struct pt_regs. If someone's using task_pt_regs() on something that's not a task but happens to have a thread.regs then we'll deal with them later. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index bfa336fbcfeb..8e855c78d780 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -307,7 +307,7 @@ struct thread_struct { } #endif -#define task_pt_regs(tsk) ((struct pt_regs *)(tsk)->thread.regs) +#define task_pt_regs(tsk) ((tsk)->thread.regs) unsigned long get_wchan(struct task_struct *p); -- 2.25.1