Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2841085rwb; Mon, 5 Sep 2022 02:18:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Mues1EfW6VqOoac0WQhs4T2d9aWeFC/Thye2QxdWSdz2GJamvrcPxVa+L8e6gSNl4gR23 X-Received: by 2002:a05:6402:1cc4:b0:440:5af8:41c9 with SMTP id ds4-20020a0564021cc400b004405af841c9mr42343206edb.339.1662369531233; Mon, 05 Sep 2022 02:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662369531; cv=none; d=google.com; s=arc-20160816; b=FYGgup/z/XuqK0XZ3K6COumr6NcmJnbTYYgcmqFBUY+jar8sJOX+v2pbDILcWltO1Y DuZ9WRbRDpl++v2tXjyt8vHDYP/e7hCOV40iNnexCW+lcsCBliUas+oO+Nhf3lKZNl8o l3YmTmsT8GwfX/tItfGl51L7E2zx+G2pz0cWbYYN9G1PSIYe2qSsCJ6H/I5BsBbpeQFw Hx6BHGsSW08Bbedn1/c8TL+q/rpOed+W12LknJx8bpbD3li/RsxCUOY/FH1pVXT1n1Ko ctjl0paCsViKndRXyH3ji0PgjRN/gkNmzERrDyV5Tm1/Fmms77NzFEyYwLF23OhNo6ek GzPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature; bh=kIMP7EgZ8iiUz1BDKoIQmsGMSo/q9OgC/PJgsgpnXAM=; b=euByQ7yeFGkFoCKamWiR0Iv3Nhbhx0unBnBb6r9OcPbqCTfu/4dShEBIGyoCPSVJAw 1aHk46/5Sx6g526tx9ZlU22iOhDe30wJ/D9Mncb06fWAGSxboW3GymYPbDxruMwJULl/ g9EPGMrRjR2xTAIr8tohs3BcXHVtJCSBrEH8m6XlwwWLQxe8XR6vU0brnKP2x2PwKBHA 8IXAgUukLUHBvwNvPREj4Uq+7hCciaLVsdAzaweRuF8+u1zA6X358ikWXf5MzMTOTrfW wr7S3zXWh/8ANsqU5WNR0Pj0gJaTY2ox00nNOXuM5HdfadjoPJBp4rVqC1z0eDUBXvhL poTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="HCYNmSw/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp4-20020a1709073e0400b0073d610ccf33si8688767ejc.296.2022.09.05.02.18.26; Mon, 05 Sep 2022 02:18:51 -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; dkim=pass header.i=@sifive.com header.s=google header.b="HCYNmSw/"; 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 S237275AbiIEIdI (ORCPT + 99 others); Mon, 5 Sep 2022 04:33:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237361AbiIEIc2 (ORCPT ); Mon, 5 Sep 2022 04:32:28 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A644C4F68D for ; Mon, 5 Sep 2022 01:31:48 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id p18so7860016plr.8 for ; Mon, 05 Sep 2022 01:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=references:in-reply-to:message-id:date:subject:to:from:from:to:cc :subject:date; bh=kIMP7EgZ8iiUz1BDKoIQmsGMSo/q9OgC/PJgsgpnXAM=; b=HCYNmSw/Rwe/rv62Parwo5Iwch03PYqWJlT/Tbova0G4i4dIuv34pCqtEQ1ToptIT6 +FgsUAogbaJ4L4gB4r2pV8TpxW/y25nObQAH+FvzY1xnrXySldzlIb7TbRV5D+csr2FA Nsy0cy4RMRtefuyBt9ew7D75oTBROuLw0GSrYDslXC4HwPnLDLHv2/hN0Id7jPpdDn89 PO9CGMGyMSkqXYL1RlwZJzuh4LXa+j02GdgR+MbbQ+z6nuDM0VjIcaAqp1+z2Whn2LPs FGWQEYN+nfzDcgaj9ohHouM9D55VYIJUHjfW6v9wLwpFIHxcbo8OyiptJCDCLxc8zKNO jjUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date; bh=kIMP7EgZ8iiUz1BDKoIQmsGMSo/q9OgC/PJgsgpnXAM=; b=gjDoMnfLlRcwP7hhKnfNSldWmQUWPWomkat9HNPnDarIR4qrgNL/P8Dt6485mJZxYs S1o7TUXN4R+FG8HDM8voT9V55w5kX0Hy3XDqBUJfgLFF3RfOjGPWYxVwzIbd6Iuweook t9HfVA0Kewg1ttuExERaAt797P3a3JszGf7tGiftg5sp2fCrbgghHnjDWfHLJXjFJHFX hN8TAy4nnfizQV+IiDMlEd7YVk1pQAMTBws5Fg6UrZvvL58wbma/3xx9Tzxg7QR/No75 AioBFztP3cC7NEee+jigw5tqZYQD5bvWWlg3NEO23JTM+USBr4GkFEH74rWEPkSQF5tp 4ozw== X-Gm-Message-State: ACgBeo1q5/SxFCbR25gKJ0CIET56ZCp5Uz6TEmCS3+XIOAxTtU2RgvnE HQn1caNWCqu+ltWXh2cYgeZduw== X-Received: by 2002:a17:902:7242:b0:171:398d:9e66 with SMTP id c2-20020a170902724200b00171398d9e66mr48506021pll.19.1662366707243; Mon, 05 Sep 2022 01:31:47 -0700 (PDT) Received: from localhost.localdomain (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id y3-20020aa79423000000b00537dfd6e67esm7089721pfo.48.2022.09.05.01.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 01:31:46 -0700 (PDT) From: Zong Li To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, greentime.hu@sifive.com, conor.dooley@microchip.com, ben.dooks@sifive.com, bp@alien8.de, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/6] soc: sifive: ccache: use pr_fmt() to remove CCACHE: prefixes Date: Mon, 5 Sep 2022 08:31:24 +0000 Message-Id: <20220905083125.29426-6-zong.li@sifive.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220905083125.29426-1-zong.li@sifive.com> References: <20220905083125.29426-1-zong.li@sifive.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Ben Dooks Use the pr_fmt() macro to prefix all the output with "CCACHE:" to avoid having to write it out each time, or make a large diff when the next change comes along. Signed-off-by: Ben Dooks --- drivers/soc/sifive/sifive_ccache.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/soc/sifive/sifive_ccache.c b/drivers/soc/sifive/sifive_ccache.c index 401c67a485e2..d749600c0bf8 100644 --- a/drivers/soc/sifive/sifive_ccache.c +++ b/drivers/soc/sifive/sifive_ccache.c @@ -5,6 +5,9 @@ * Copyright (C) 2018-2022 SiFive, Inc. * */ + +#define pr_fmt(fmt) "CCACHE: " fmt + #include #include #include @@ -85,13 +88,13 @@ static void ccache_config_read(void) cfg = readl(ccache_base + SIFIVE_CCACHE_CONFIG); - pr_info("CCACHE: %u banks, %u ways, sets/bank=%llu, bytes/block=%llu\n", + pr_info("%u banks, %u ways, sets/bank=%llu, bytes/block=%llu\n", (cfg & 0xff), (cfg >> 8) & 0xff, BIT_ULL((cfg >> 16) & 0xff), BIT_ULL((cfg >> 24) & 0xff)); cfg = readl(ccache_base + SIFIVE_CCACHE_WAYENABLE); - pr_info("CCACHE: Index of the largest way enabled: %d\n", cfg); + pr_info("Index of the largest way enabled: %d\n", cfg); } static const struct of_device_id sifive_ccache_ids[] = { @@ -154,7 +157,7 @@ static irqreturn_t ccache_int_handler(int irq, void *device) if (irq == g_irq[DIR_CORR]) { add_h = readl(ccache_base + SIFIVE_CCACHE_DIRECCFIX_HIGH); add_l = readl(ccache_base + SIFIVE_CCACHE_DIRECCFIX_LOW); - pr_err("CCACHE: DirError @ 0x%08X.%08X\n", add_h, add_l); + pr_err("DirError @ 0x%08X.%08X\n", add_h, add_l); /* Reading this register clears the DirError interrupt sig */ readl(ccache_base + SIFIVE_CCACHE_DIRECCFIX_COUNT); atomic_notifier_call_chain(&ccache_err_chain, SIFIVE_CCACHE_ERR_TYPE_CE, @@ -172,7 +175,7 @@ static irqreturn_t ccache_int_handler(int irq, void *device) if (irq == g_irq[DATA_CORR]) { add_h = readl(ccache_base + SIFIVE_CCACHE_DATECCFIX_HIGH); add_l = readl(ccache_base + SIFIVE_CCACHE_DATECCFIX_LOW); - pr_err("CCACHE: DataError @ 0x%08X.%08X\n", add_h, add_l); + pr_err("DataError @ 0x%08X.%08X\n", add_h, add_l); /* Reading this register clears the DataError interrupt sig */ readl(ccache_base + SIFIVE_CCACHE_DATECCFIX_COUNT); atomic_notifier_call_chain(&ccache_err_chain, SIFIVE_CCACHE_ERR_TYPE_CE, @@ -181,7 +184,7 @@ static irqreturn_t ccache_int_handler(int irq, void *device) if (irq == g_irq[DATA_UNCORR]) { add_h = readl(ccache_base + SIFIVE_CCACHE_DATECCFAIL_HIGH); add_l = readl(ccache_base + SIFIVE_CCACHE_DATECCFAIL_LOW); - pr_err("CCACHE: DataFail @ 0x%08X.%08X\n", add_h, add_l); + pr_err("DataFail @ 0x%08X.%08X\n", add_h, add_l); /* Reading this register clears the DataFail interrupt sig */ readl(ccache_base + SIFIVE_CCACHE_DATECCFAIL_COUNT); atomic_notifier_call_chain(&ccache_err_chain, SIFIVE_CCACHE_ERR_TYPE_UE, @@ -221,7 +224,7 @@ static int __init sifive_ccache_init(void) g_irq[i] = irq_of_parse_and_map(np, i); rc = request_irq(g_irq[i], ccache_int_handler, 0, "ccache_ecc", NULL); if (rc) { - pr_err("CCACHE: Could not request IRQ %d\n", g_irq[i]); + pr_err("Could not request IRQ %d\n", g_irq[i]); return rc; } } -- 2.17.1