From patchwork Mon Jan 29 07:59:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sia Jee Heng X-Patchwork-Id: 13535139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 990A7C47DDB for ; Mon, 29 Jan 2024 08:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=AFR3z6UBtVLsv7UuwsmG6qYXB045gwLIcC90XSpHF5s=; b=qpkmK5QHNvz1sm DBvtjaoeKIntCbtBaqDzzmYfoNNaj+AlBSIPfIk+YXMftTS1x9m/Q2njijoF0epOHrntjGXM/ipOg lyBdY/iaiJuxSCAXyQePojqSrH3+Nqn44YUi/FKtcbhUnFIVHhBxyAaB2h41bBzqQEuTkfpSAthAB bfVjY1dzTJ6J2H5/87E8dEHDUmF22HLrf4G0avfuGjTXRuNHxlIgwNWsJKaM+eggkbCreNg6tmsyc ggTG7sJYqlAJFlMdm+HZJNUSaRIfhPw1ge6mijjEfnmy3Dh3UN7+0DS4kpGIdrhEWojw9sfRqTDLD wyKx9pUU5EqIXKSnxEXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUMZ6-0000000Bh97-2lyi; Mon, 29 Jan 2024 08:00:24 +0000 Received: from mail-bjschn02on20606.outbound.protection.partner.outlook.cn ([2406:e500:4440:2::606] helo=CHN02-BJS-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUMZ2-0000000Bh6j-1vZG for linux-riscv@lists.infradead.org; Mon, 29 Jan 2024 08:00:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BDuYMJorbRW9nAmxpsnXuIl2ioCm/1v+79SGjZjvEw1/O/vX9riwgglxKjUanGiJJEaaxjuoWoeimuI380W6EEaVat1QGNSRlrz4+mR0UiGFE7T3r5SAIGVoaQO3+F8+dxDzGdrssAl5qhQkg7RnDz0zBhvfBId6XW4gZOR75DaKzwSFI9aqGtBpAaZ7shd1qkCY7huU2VEqQUJ5cimiLjQj8BWYR1l5uL0WRAX1Ku/ARgNhZ7RiQiVz/Qmnz6muuqMQVfg1ITDxqQdqLiPHd3COSw7VN5LWlwwZUdh61So7LuCSGpO71l3YEulHm76bI4S9TVicTt/lt/oHGJSXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hQZtdNYJ56KwD1I/52FjiLmuaG1QJCswXe4mYk0EikI=; b=D7OlLbrjB9jBooNKhDqjnxr+kMnrP8egImtkhWiIpNMikH15g37sfm6QIQexk4wkg1pbIgL0jUjMKoc7J/bIuOFz59MkJYxj0Y5tJOOryoLn83Puw4HhPjxD+PZpznNlF6kAXYM9KPQryxDhVpuxtLB/RUoK1SjZZxQtgawbbbqCqGzdRipQBtnaBaJ00iVlGMH8c+YKkOy9/lXJXl+Md57KWfYVtb+rKJct8h1JA8/iLT5DBLKMeDnnl8hhMGhinzclw9X+zNrolzIe+TJIBBxB7QBzbo0Bo9ghSdBTKATOnxZ83U97cEQ2P8k3ki9DHlUm0TH0IzcD/xdv6C6LEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:f::16) by BJSPR01MB0545.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.31; Mon, 29 Jan 2024 08:00:16 +0000 Received: from BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn ([fe80::3862:65b4:c857:c4a6]) by BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn ([fe80::3862:65b4:c857:c4a6%4]) with mapi id 15.20.7228.029; Mon, 29 Jan 2024 08:00:16 +0000 From: Sia Jee Heng To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, sudeep.holla@arm.com, jeeheng.sia@starfivetech.com, robh@kernel.org, conor.dooley@microchip.com, suagrfillet@gmail.com Subject: [RFC v1 1/2] riscv: cacheinfo: Remove unused parameter Date: Sun, 28 Jan 2024 23:59:56 -0800 Message-Id: <20240129075957.116033-2-jeeheng.sia@starfivetech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129075957.116033-1-jeeheng.sia@starfivetech.com> References: <20240129075957.116033-1-jeeheng.sia@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0031.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::14) To BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn (2406:e500:c211:f::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BJSPR01MB0561:EE_|BJSPR01MB0545:EE_ X-MS-Office365-Filtering-Correlation-Id: 048c09d5-343a-4e89-2980-08dc20a0540f X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JPcLGyvgzHMGte3IfQL86liL5UWCsgeyb7Ss2uuSoOn0TQRsi72EcmWlt8nIfYPF/EZTlKulIbQrMPxPNX8mlVywRppkdKKzpsN6BEVa8nD1oZ4Ur6HYGiXVt/PvLKcwgMac/JvesCvQzkJhsIS+9PKis75Cg2QOMM0rMoIKzewVYDeSa8iQuMZ00EH02dydskSi22udEDQY5ECKg0lL4tu2ou6Ar0IW2sV4L6zG2+ABwJqZ7jG87KaJw2hXrS4lNwKTcGYoGeVd0a6vYdQJYzmvdnEV9rHr4AU3fnPgaj7l6hC5vzSAd2SS6luEFmRhUDQvSKKgxAVigiKQtigNx90QYGYG8KyW7kzxB9Nut8ishKxZv3N+XfRwhedV8nCnS7se1tpuDVPWKW9kVtgracLGEcjiaWP0UxwjYQ7NY/PBLxqCs9wavJDsz6O9OTE0FbhfdV8usAwdAoRF8gT6fyAQSdERqqwxUgbGgXsk5E3qj98NYcrCIrHBBhBepcTPEewpcPFg8LeVoZiUjfPIwRGU7kahqMgyBKsmnxBnddN7Kzv11ab4uh/R37L1NfNy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(366004)(136003)(346002)(396003)(39830400003)(230922051799003)(186009)(1800799012)(64100799003)(451199024)(38350700005)(41320700001)(2616005)(2906002)(52116002)(5660300002)(6666004)(66946007)(66556008)(4326008)(26005)(1076003)(66476007)(8676002)(8936002)(38100700002)(83380400001)(508600001)(41300700001)(40180700001)(86362001)(40160700002)(36756003);DIR:O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HFyoUG+tCiiVCnoOmb2SeuHFm6dbaZuUJinb5cg4akyzCMSftRNkrwEsHjKL4577QLKqi9tA+XaTfBYCX1/FqkqmDDB4lNmkU1ElmDPIxcvKSVa8sVkdyZRJOsmOHcyPFMUYLPTryfbymhDYObb2PnUQMv07/uGHtqGbQoB+bL7+8CERWYN8epnFRycY2n0THi15C81S1iYDkoqbUgVUGbQMCryn/U7tI4mIfuE1K3u1PnxuhZWTsKbOgqOzRjLx6u7ChaUvch8tS64T6r0GEyIPFyy/4gdeCZ/NwmCgstz0x6juxtI1EMwXLE+sAx8YHwm+B0vCH+gpBD2kIQD8FHjCNvmb2dhsOWmX21CczF5bm3HlnpQ5C85WxKr+yYBPMD8JR40ZBquA2l7DoEcqf4jwc5e2G1HEAM8jfXfD6mk3FIDzZkSpyGuVa4AB1iV/tgP3kzCaphpXVXavZP6/KK5skX2CClrjT9D9GoRfIokpMxihtFVV0cxebwivot3HCz2IZ8oH4kaIidTV2Jj0T+8oKrbZ+H68X4va2yhhS+Pn4tP1UPf4Hdnx9trx1Xy+lgKZqsGty/DHszs3W8hKDuNfInD9IVIW8PigEWDBwDkg== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 048c09d5-343a-4e89-2980-08dc20a0540f X-MS-Exchange-CrossTenant-AuthSource: BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2024 08:00:15.9754 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i4tzgcZhp0TEraiF5mDFOXtxYsmQ3v30xS5MMbJAMaUsLw8Wn2pMG/xuhVoVFCIEGMzGJVxyhjz0IOV4FumOeAzF6nSVJWQrXpD/RHQYQig= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BJSPR01MB0545 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240129_000020_521888_9AE0EFBB X-CRM114-Status: UNSURE ( 7.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Removing the unused parameter in ci_leaf_init() to simplify the code. Signed-off-by: Sia Jee Heng --- arch/riscv/kernel/cacheinfo.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/riscv/kernel/cacheinfo.c b/arch/riscv/kernel/cacheinfo.c index 09e9b88110d1..30a6878287ad 100644 --- a/arch/riscv/kernel/cacheinfo.c +++ b/arch/riscv/kernel/cacheinfo.c @@ -64,7 +64,6 @@ uintptr_t get_cache_geometry(u32 level, enum cache_type type) } static void ci_leaf_init(struct cacheinfo *this_leaf, - struct device_node *node, enum cache_type type, unsigned int level) { this_leaf->level = level; @@ -80,11 +79,11 @@ int populate_cache_leaves(unsigned int cpu) int levels = 1, level = 1; if (of_property_read_bool(np, "cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); if (of_property_read_bool(np, "i-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); if (of_property_read_bool(np, "d-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); prev = np; while ((np = of_find_next_cache_node(np))) { @@ -97,11 +96,11 @@ int populate_cache_leaves(unsigned int cpu) if (level <= levels) break; if (of_property_read_bool(np, "cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_UNIFIED, level); if (of_property_read_bool(np, "i-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); if (of_property_read_bool(np, "d-cache-size")) - ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); + ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); levels = level; } of_node_put(np);