Skip to content

Commit 696ab9b

Browse files
bjdooks-sifivepalmer-dabbelt
authored andcommitted
soc: sifive: ccache: use pr_fmt() to remove CCACHE: prefixes
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 <ben.dooks@sifive.com> Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20220913061817.22564-6-zong.li@sifive.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent 3fb787e commit 696ab9b

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

drivers/soc/sifive/sifive_ccache.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Copyright (C) 2018-2022 SiFive, Inc.
66
*
77
*/
8+
9+
#define pr_fmt(fmt) "CCACHE: " fmt
10+
811
#include <linux/debugfs.h>
912
#include <linux/interrupt.h>
1013
#include <linux/of_irq.h>
@@ -85,13 +88,13 @@ static void ccache_config_read(void)
8588

8689
cfg = readl(ccache_base + SIFIVE_CCACHE_CONFIG);
8790

88-
pr_info("CCACHE: %u banks, %u ways, sets/bank=%llu, bytes/block=%llu\n",
91+
pr_info("%u banks, %u ways, sets/bank=%llu, bytes/block=%llu\n",
8992
(cfg & 0xff), (cfg >> 8) & 0xff,
9093
BIT_ULL((cfg >> 16) & 0xff),
9194
BIT_ULL((cfg >> 24) & 0xff));
9295

9396
cfg = readl(ccache_base + SIFIVE_CCACHE_WAYENABLE);
94-
pr_info("CCACHE: Index of the largest way enabled: %u\n", cfg);
97+
pr_info("Index of the largest way enabled: %u\n", cfg);
9598
}
9699

97100
static const struct of_device_id sifive_ccache_ids[] = {
@@ -155,7 +158,7 @@ static irqreturn_t ccache_int_handler(int irq, void *device)
155158
if (irq == g_irq[DIR_CORR]) {
156159
add_h = readl(ccache_base + SIFIVE_CCACHE_DIRECCFIX_HIGH);
157160
add_l = readl(ccache_base + SIFIVE_CCACHE_DIRECCFIX_LOW);
158-
pr_err("CCACHE: DirError @ 0x%08X.%08X\n", add_h, add_l);
161+
pr_err("DirError @ 0x%08X.%08X\n", add_h, add_l);
159162
/* Reading this register clears the DirError interrupt sig */
160163
readl(ccache_base + SIFIVE_CCACHE_DIRECCFIX_COUNT);
161164
atomic_notifier_call_chain(&ccache_err_chain,
@@ -175,7 +178,7 @@ static irqreturn_t ccache_int_handler(int irq, void *device)
175178
if (irq == g_irq[DATA_CORR]) {
176179
add_h = readl(ccache_base + SIFIVE_CCACHE_DATECCFIX_HIGH);
177180
add_l = readl(ccache_base + SIFIVE_CCACHE_DATECCFIX_LOW);
178-
pr_err("CCACHE: DataError @ 0x%08X.%08X\n", add_h, add_l);
181+
pr_err("DataError @ 0x%08X.%08X\n", add_h, add_l);
179182
/* Reading this register clears the DataError interrupt sig */
180183
readl(ccache_base + SIFIVE_CCACHE_DATECCFIX_COUNT);
181184
atomic_notifier_call_chain(&ccache_err_chain,
@@ -185,7 +188,7 @@ static irqreturn_t ccache_int_handler(int irq, void *device)
185188
if (irq == g_irq[DATA_UNCORR]) {
186189
add_h = readl(ccache_base + SIFIVE_CCACHE_DATECCFAIL_HIGH);
187190
add_l = readl(ccache_base + SIFIVE_CCACHE_DATECCFAIL_LOW);
188-
pr_err("CCACHE: DataFail @ 0x%08X.%08X\n", add_h, add_l);
191+
pr_err("DataFail @ 0x%08X.%08X\n", add_h, add_l);
189192
/* Reading this register clears the DataFail interrupt sig */
190193
readl(ccache_base + SIFIVE_CCACHE_DATECCFAIL_COUNT);
191194
atomic_notifier_call_chain(&ccache_err_chain,
@@ -218,7 +221,7 @@ static int __init sifive_ccache_init(void)
218221

219222
intr_num = of_property_count_u32_elems(np, "interrupts");
220223
if (!intr_num) {
221-
pr_err("CCACHE: no interrupts property\n");
224+
pr_err("No interrupts property\n");
222225
return -ENODEV;
223226
}
224227

@@ -227,7 +230,7 @@ static int __init sifive_ccache_init(void)
227230
rc = request_irq(g_irq[i], ccache_int_handler, 0, "ccache_ecc",
228231
NULL);
229232
if (rc) {
230-
pr_err("CCACHE: Could not request IRQ %d\n", g_irq[i]);
233+
pr_err("Could not request IRQ %d\n", g_irq[i]);
231234
return rc;
232235
}
233236
}

0 commit comments

Comments
 (0)