From patchwork Thu Jul 20 13:15:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Jinchao X-Patchwork-Id: 123293 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3125473vqt; Thu, 20 Jul 2023 06:39:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZWyBHqvq5q0abZD8h45YxoXipEzDinw9dvYZrTN+8vvQEl+GpIE4vLnuIBip8+u42ieOD X-Received: by 2002:a05:6a00:1da1:b0:682:5e8f:d8ba with SMTP id z33-20020a056a001da100b006825e8fd8bamr6462251pfw.11.1689860360786; Thu, 20 Jul 2023 06:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689860360; cv=none; d=google.com; s=arc-20160816; b=DQ/m6ITxFRa4cKLnAV0WpOknwVHiNLN5L1Cp/TJ0pR6ciM5VqBMOBdlsnwjk2ixb5h yPyylTV3R30E7Ohb6qxLJtFG0KZYPMtJ/yS2fU4DtD0zVoVquvBoTbKUEyfjqkqKUHBr u0pFyKoZBKXi5SlX5cp4ilJKnFJX0+3Q4AyzvjiYn1ExDNJw5iCYT7f9McCD4+FB5lBg /A5yF8DDt0kWl5qiqy31paCmmFFME5UVSe8Cc6XiJx9YTzq2Yr9G6aV/rhw9i3yGsu+l d4p+3+jEJiTa7Wh2LqZ127SPQBP1btb7RN/RJ22vdB1VYCg0R27+mB26MREG1UvCSL7q Wlpw== 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=JmXP5WAZRyd/dTy5DIQdP0bTilfRIZKCXs2GASnUxp8=; b=n5yRN7wVJjdzAiIA94GxjFhTKwmZF4VbdpUcy/Zo9X9QMnz6zE3fCAU5BiT/Poxjis wfJY43ahn+ULhsOz05HD5xpU/k6LWRTCZgXJ8/QyaAJcU9L7F7bWQwec2cUfwazGbMqP vanCBFf4Pf/iAMqHx6XzfctU39gdr1UMug5TIwQRmxoDAjDvvSWgf5ksEDxG8hOVeoSG I2y9CVMxakn2XQ/gog9vhtF99sEJIycHGcTiZEClPS8z759Ojb+Le+az877iqCiH6q69 KddLrWrTnHT60bR5OE9CYAqZbHFkUkZquK7ByJ0c5N1Gftfq4tqTpe4SNFT2vYxAlFdy NmuA== 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 ca13-20020a056a00418d00b006823a64b0a6si911009pfb.350.2023.07.20.06.39.07; Thu, 20 Jul 2023 06:39:20 -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 S231783AbjGTNPp (ORCPT + 99 others); Thu, 20 Jul 2023 09:15:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231750AbjGTNPm (ORCPT ); Thu, 20 Jul 2023 09:15:42 -0400 Received: from wxsgout04.xfusion.com (wxsgout03.xfusion.com [36.139.52.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFFC710CB; Thu, 20 Jul 2023 06:15:39 -0700 (PDT) Received: from wuxshcsitd00600.xfusion.com (unknown [10.32.133.213]) by wxsgout04.xfusion.com (SkyGuard) with ESMTPS id 4R6Cp31Jwzz9xgYX; Thu, 20 Jul 2023 21:14:35 +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, 20 Jul 2023 21:15:26 +0800 Date: Thu, 20 Jul 2023 21:15:24 +0800 From: Wang Jinchao To: Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , , 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: 1771947018041129714 X-GMAIL-MSGID: 1771947018041129714 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;