From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56423C38145 for ; Thu, 8 Sep 2022 14:45:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232680AbiIHOpG (ORCPT ); Thu, 8 Sep 2022 10:45:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232519AbiIHOpB (ORCPT ); Thu, 8 Sep 2022 10:45:01 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9B9E2E9C9 for ; Thu, 8 Sep 2022 07:44:46 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id j12so5706697pfi.11 for ; Thu, 08 Sep 2022 07:44:46 -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:cc:to:from:from:to :cc:subject:date; bh=xgOVXlD8a/2jMrK0U5RpTDdtMTpvUxrpu5XPMup9bGg=; b=ONOszZz3dussBKvbMTqNSh9IzzGWE5GlOwkJnbDUw2WvYamxUjF38P/DTJhPYjiZkk qp3u1SJcJXsK9ShklIGQoYbFwsr2iR+Ss+l5PHVlHLCVKRRoQaVcS7jLi/5WFmrLVH6+ yweamAw9LnOPGic8x4d8l0szyjR8TUNdQtz5nw5ZmjsUkjQwy5mx1tjSeloBYArSDSLE wrvWR5B3RFBt+h+2goofZgvlSf09WdI6qokNbOTICj98abj7+hmCvuJJFM+Ma6dLmB0b ZlKbbAenKUF5k8w26rc/tNCCwbAuQzJ0LVKhW9wPFcOgh7wJZH/T+vgHdEYlPVrjwytp Fv1w== 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:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=xgOVXlD8a/2jMrK0U5RpTDdtMTpvUxrpu5XPMup9bGg=; b=e9oFSqhwc4d0WileZj/fXodehGyGnZH2lWikxnOuiAbWKRoFgrtNI6LNTnOi6txfcp NboTxDly+f3ppPZhninxSRSa7uslvP1Z3KjEqvLlLV2eGhFVCANmGI61vPmIwNx0GcSs gpCTkpXGVzbDhNnWd2FfKu1vQwmnx70hAhaMRUmPZac4xpPQoR7c4SFrt4wZy02PEeQh ApNHAFGtKC+Ys8WFPZ/u+daJSF28baFlBFOHs5KF4OhRtd7motuYI40Ez3pXkigjekkv 2ZsZiqN4P2PtRdNhxvKtiI0k+S5DrTSvL9cYZON1Y5EApbhp8XgbLYAEOrq2wxGvdGJp MNZw== X-Gm-Message-State: ACgBeo2OTt20uUnkMQ4ceQDr/JU1VOM4Excu6Ok1Pmgfp79HPk/+n8Yn AF6sADiaFWRb7LZkGJ40Dqpryg== X-Google-Smtp-Source: AA6agR7yJ1si3K0yPA4aYKqpeD0253YNER3hIWQO6vc5O7b1sN3VgiAM1tIqaUreW8JvZUsD/PcdOw== X-Received: by 2002:a62:1795:0:b0:53e:6cb3:31ee with SMTP id 143-20020a621795000000b0053e6cb331eemr9093750pfx.63.1662648286205; Thu, 08 Sep 2022 07:44:46 -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 b4-20020a170902d40400b001750361f430sm4484728ple.155.2022.09.08.07.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 07:44:45 -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 Cc: Zong Li Subject: [PATCH v3 5/6] soc: sifive: ccache: use pr_fmt() to remove CCACHE: prefixes Date: Thu, 8 Sep 2022 14:44:23 +0000 Message-Id: <20220908144424.4232-6-zong.li@sifive.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220908144424.4232-1-zong.li@sifive.com> References: <20220908144424.4232-1-zong.li@sifive.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Signed-off-by: Zong Li Reviewed-by: Conor Dooley --- 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 58d14f11a63a..b3929c4d6d5b 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: %u\n", cfg); + pr_info("Index of the largest way enabled: %u\n", cfg); } static const struct of_device_id sifive_ccache_ids[] = { @@ -155,7 +158,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, @@ -175,7 +178,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, @@ -185,7 +188,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, @@ -227,7 +230,7 @@ static int __init sifive_ccache_init(void) 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