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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 1DF0BC433B4 for ; Fri, 16 Apr 2021 16:32:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 DD77F6115B for ; Fri, 16 Apr 2021 16:32:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD77F6115B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=WEOGnbNj65qrJ0RVtBNpPvEM6aXgWjV2/QHFSJDxV/M=; b=FZ1MiMRrjIYDFb19cKJbatzUgH 4xugboJZ/7elbk7yBDrx79UbqzTLTFJ9VgaZm5U+197SU/MmS9ioPePcV6ZiOGB8kOUKCdvxxdzGv Cp8+ZnkvOUuJsuyAj2ahsJUzUA5yALo0JBVnT64DMiriBHaNHt0MwsktK2kyH4J9YTgHfmO9NHSAl 2mEIhCD/fXPKKV9PXb5o44R+o5Vzoo6fB6+Or1qNakYwJv6nlD2oBSVxLrLMlup/5dRaKRRL3zn/a DILIu3YADsASZWL00f3DkiBf2UkKOmJEyAA8H71qlNeLLHb+In0bbOOzPMjxvB/sbxx6TN/jwpLNc mTRG7j/w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXRMq-002mkl-K3; Fri, 16 Apr 2021 16:30:52 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXRMl-002mkC-AV for linux-arm-kernel@desiato.infradead.org; Fri, 16 Apr 2021 16:30:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=mnoZkPhlYI5Gzx6kcd1Vwb0qUcLfj6MJOI6iqRHTyB4=; b=ul9lvuajDK//dDMuChibJw4v1q YX7qHvo0dlvHJhS9ZLW0M422TSGueRBFvGCD5uQQhN/2NJbIHx/BZIBo49O8tfTjyIXjHorepEm3S CXo51eBL6xv9Wf/SBlZ09aeI3ZejpAY3PbFsKguXovHd2+FXxWJ87BIHwf7k3ZKrzsgYZmX84wjwM Zu1CXLTH+LOZ/TyU2qxY6cmYeKfpcTP/U5rgRivlMig3JpFw9dj9CDG4QKYqvkhYGlnfEBJlJEUVR yt7oz1bGf1XRuFPXX9/1FVpxW2sIRIzti73ARh0tgPek+1Ri4/0MTuvDKoBrTB76/OKcVAd7m5Hdg wDbO3CGw==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXRMh-009YX1-PA for linux-arm-kernel@lists.infradead.org; Fri, 16 Apr 2021 16:30:45 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7B35C11B3; Fri, 16 Apr 2021 09:30:42 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BFDC13F99C; Fri, 16 Apr 2021 09:30:41 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland , Catalin Marinas , Will Deacon Subject: [PATCH] arm64: alternative: simplify passing alt_region Date: Fri, 16 Apr 2021 17:30:32 +0100 Message-Id: <20210416163032.10857-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210416_093043_878894_9F74D756 X-CRM114-Status: GOOD ( 10.28 ) 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: , MIME-Version: 1.0 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 In __apply_alternatives() we take a pointer to void which we later assign to a pointer to struct alt_region. As all callers are passing a pointer to struct alt_region to begin with, it's simpler and more robust to take a pointer to struct alt region, so let's do so and avoid the need for a temporary variable. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/alternative.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/alternative.c b/arch/arm64/kernel/alternative.c index 1184c44ea2c7..f6fd16185040 100644 --- a/arch/arm64/kernel/alternative.c +++ b/arch/arm64/kernel/alternative.c @@ -133,11 +133,10 @@ static void clean_dcache_range_nopatch(u64 start, u64 end) } while (cur += d_size, cur < end); } -static void __apply_alternatives(void *alt_region, bool is_module, +static void __apply_alternatives(struct alt_region *region, bool is_module, unsigned long *feature_mask) { struct alt_instr *alt; - struct alt_region *region = alt_region; __le32 *origptr, *updptr; alternative_cb_t alt_cb; -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel