From patchwork Thu Aug 3 09:44:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Jinchao X-Patchwork-Id: 130458 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1049385vqx; Thu, 3 Aug 2023 03:31:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlEywTkDb8l+iuH1ICrpPpzODPQehnbubq0qNzKDedNKBc8cCBRxNmIa5NbknZeQhMucwmLd X-Received: by 2002:a17:906:197:b0:97d:ee82:920a with SMTP id 23-20020a170906019700b0097dee82920amr6805644ejb.74.1691058693992; Thu, 03 Aug 2023 03:31:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691058693; cv=none; d=google.com; s=arc-20160816; b=j4Tobt9M3CSqsXNPrXfasbm50aKf7m4P1RgzftjZPp+OA24wniQKnbwDHDXAGbRJUn 4dfIEh3AFL8bbmKY8iyb+Y30dol7FMcjI95xJ4c9IQj+lbMey1NismUSDIfY2QN9AQTC y1hziUDmlaLSoL6b5Bn5bLB63PZrIUuDoaGumbgOkI8PTy/wp7evAjfJbQLnag8WuHjm gUqHF8JD9qhj/JOdOfBo1VtCWs26CTThSVQDRlfaitwCnG20k0QUT2dsYs1xKMut5t/Y p17IHnXv7tgETN5ZgqelJmauOPYwhlhfjKShBZAH5gnRiT7o0/va8bTB8sOJ5GFmD9vk 9s4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=i7uIbkzPv3ovVOohT9w87CzFdmhwcNc5QVuBqfM23po=; fh=zvzNAC7b2zjwK9OrTZ0lzCZi8tdP2u4UrsBFL42hfEM=; b=KJEiUHnI9SARKjcLofVmwdNy10ZNr6yfqDfRpzOAAO2RXjbhkphSRSZp3PfEW4Mf27 iWlTUm1LV4Fd07xh/ENzA4e4OTjnOo25d++geftxHWemnuN64t6t+r2mVdldy5mUVSgK 67WlXQNrpULj/cnhJyVpfc2jpyN3LVWuFTBZkShos0uKD+vGqQ2VRvmsTv8dFP88RscD 439qHZoJc4AqoF840kW8JzQD8+5ta0KtLa5VI85TL21FLqwkagNVrMrTLFpIiU94GRxg 8J/1fBjWYuziYeY3TJFkqwcPtHCkvvf125H1eG8I0gRXOm8Hb4H2FF/39uAL0E2Nkcbz whZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gq15-20020a170906e24f00b0099212b34e82si832507ejb.18.2023.08.03.03.31.03; Thu, 03 Aug 2023 03:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbjHCJow (ORCPT + 99 others); Thu, 3 Aug 2023 05:44:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234101AbjHCJo2 (ORCPT ); Thu, 3 Aug 2023 05:44:28 -0400 Received: from wxsgout04.xfusion.com (wxsgout04.xfusion.com [36.139.87.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D57B358B for ; Thu, 3 Aug 2023 02:44:25 -0700 (PDT) Received: from wuxshcsitd00600.xfusion.com (unknown [10.32.133.213]) by wxsgout04.xfusion.com (SkyGuard) with ESMTPS id 4RGkRN5BbTz9xxKC; Thu, 3 Aug 2023 17:42:56 +0800 (CST) Received: from fedora (10.82.147.3) by wuxshcsitd00600.xfusion.com (10.32.133.213) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 3 Aug 2023 17:44:02 +0800 Date: Thu, 3 Aug 2023 17:44:00 +0800 From: Wang Jinchao To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H. Peter Anvin" , CC: Subject: [PATCH] x86/head64: Harmonize the style of array-type parameter for fixup_pointer Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Originating-IP: [10.82.147.3] X-ClientProxiedBy: wuxshcsitd00602.xfusion.com (10.32.132.250) To wuxshcsitd00600.xfusion.com (10.32.133.213) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773203560798718429 X-GMAIL-MSGID: 1773203560798718429 The usage of '&' before the array parameter is redundant because '&array' is equivalent to 'array'. Therefore, there is no need to include '&' before the array parameter. In fact, using '&' can cause more confusion, especially for individuals who are not familiar with the address-of operation for arrays. They might mistakenly believe that one is different from the other and spend additional time realizing that they are actually the same. Harmonizing the style by removing the unnecessary '&' would save time for those individuals. Signed-off-by: Wang Jinchao --- arch/x86/kernel/head64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 49f7629b17f7..25a67a13a1fa 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -211,7 +211,7 @@ unsigned long __head __startup_64(unsigned long physaddr, /* Fixup the physical addresses in the page table */ - pgd = fixup_pointer(&early_top_pgt, physaddr); + pgd = fixup_pointer(early_top_pgt, physaddr); p = pgd + pgd_index(__START_KERNEL_map); if (la57) *p = (unsigned long)level4_kernel_pgt; @@ -220,11 +220,11 @@ unsigned long __head __startup_64(unsigned long physaddr, *p += _PAGE_TABLE_NOENC - __START_KERNEL_map + load_delta; if (la57) { - p4d = fixup_pointer(&level4_kernel_pgt, physaddr); + p4d = fixup_pointer(level4_kernel_pgt, physaddr); p4d[511] += load_delta; } - pud = fixup_pointer(&level3_kernel_pgt, physaddr); + pud = fixup_pointer(level3_kernel_pgt, physaddr); pud[510] += load_delta; pud[511] += load_delta;