From patchwork Thu Feb 22 09:39:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 13566952 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 4C91EC48BF8 for ; Thu, 22 Feb 2024 09:41:04 +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=zbeZOmJgAhgYBLH9YWkMgdxUluOmvZfrzwVC1/jlmxw=; b=WRqtgx5WI03Ej8 qzVlKqsKZmD/j7gEVZ5Kodbtp0ifEamuWBfMC3mSjQQUxK/mD8jjDp5BmZL8tqsn8P50xrdbm3heR ympnMmVbtQ1IP5TRBmopuA2xdyQA+uwU08ZMsub0fys0rIX3qXSGkhUWUrALc7eMrrDNSXRnlF4/s 7uNXaDWf+7stjQHT04OEPtClEsMsKOB8feD42vlgk7T5X6RzFiYz6cW8aLY/5yngQ0FflHVN6AMIH EBi0gWHayv+9DVucVYX8fws7vEztT5+aG6q0O323iCwYvSiRiDI271LygEqTelEsE0Lzpq8M5IG57 7s6P5kZKRHxlJ4xGD7YQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rd5ZP-00000004Hz4-3tDu; Thu, 22 Feb 2024 09:40:47 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rd5ZF-00000004HqD-1pPC for linux-arm-kernel@lists.infradead.org; Thu, 22 Feb 2024 09:40:39 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3bbb4806f67so5088281b6e.3 for ; Thu, 22 Feb 2024 01:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1708594835; x=1709199635; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h6AtwHVNk/A02rm2BNjvTDG/J53NTzs7XDtfqSpV9KE=; b=cpmw/8js9/9Om3rcZIlD3ivMUYdCYh3ngn5SOTgX3fbiYEVru9cmaoYDWEz4M38vjg YYWxgGhJ4rfLSrieKQZajwDr8fMpQQ/ojri1dOknVI2wzZlZcOf7oj9Yei57CgkztBmL ydP26U3CP1rT7bJXRVAmUCwoGgwj0c6BmuTgHvHU8GyNuTbrj/1wFb3ACTqSm0Ad6PeN RzVb7d0ToG9qw8gwEcXBJlLOuRK+jqC+wtYwq29jngufYpN9r3CiIWTSbFc9Mfus4H7n 1oUIwzi5Yf7UlLJekZvanAnQ9UBjYRfw0P6WAYHeLDRo79cHeMcvFwa1OlxPtxLRrKkq JZzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708594835; x=1709199635; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h6AtwHVNk/A02rm2BNjvTDG/J53NTzs7XDtfqSpV9KE=; b=G24ZacRr2tffxmu6Zp64cAQvGyd55JkUU7Bi8t6nBV/XilE/6sDhmwewJbBXBW3F1s XsCU1yNeOP1nEMfd9cScfucN4ZVv2qQSlZoFu7BOoJ+HtP8sOPOAB1QrE+pd+WUgdVU+ Zr1aQ6FCNZfOPM1y3mSF4o1KwELR6m2yhId5KcLbZP8uNU2KgHq0OHlD/X9HDROcxe+j TQQVSCISVfmSaQ1geQwkmGAkHycdfVDFlZdgWGWsK3NpZEGQTdwF97mk9kaTjoOaSaDa EzqOPDvmwa+FnkVSuG8QbHoBNP8i7nfjFpHFkAfOu11/c6uKL8F6Tcxt2Z42sso9H0KK Gj9Q== X-Forwarded-Encrypted: i=1; AJvYcCX82DhK/DmPezHAeHaSWVe96ZKXl4RRDlGNhIitBGXlVHYtKF0V7Q1S4JQ8qBrtui8JLeu7Jl9pX4DNeW8yJzH0Htqmp9ZuNNkVVeUp9TNsGUNQhSE= X-Gm-Message-State: AOJu0YwznwnWA6JSJ6mdDBnr+3d1sOVNFQvuAHZUSFNZeI7G4wIHD94T DmvIzpdm4FkCjvdBI7UIxnOxMsPzBNrFqw0sXmH3RwebcmwceSxzDtZwx0183PU= X-Google-Smtp-Source: AGHT+IF8OgbTXViwpivkEQdHOkIi0+Npt3Tll1vfHu4pj3kF2ykzuXdajZKv4KF3NLZSSnHpD8JjgA== X-Received: by 2002:a05:6808:169f:b0:3c1:33a1:5ab4 with SMTP id bb31-20020a056808169f00b003c133a15ab4mr25347876oib.23.1708594835238; Thu, 22 Feb 2024 01:40:35 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([103.97.165.210]) by smtp.gmail.com with ESMTPSA id n15-20020a05680803af00b003c17c2b8d09sm130699oie.31.2024.02.22.01.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 01:40:34 -0800 (PST) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley Cc: Marc Zyngier , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Anup Patel Subject: [PATCH v14 02/18] irqchip/sifive-plic: Use dev_xyz() in-place of pr_xyz() Date: Thu, 22 Feb 2024 15:09:50 +0530 Message-Id: <20240222094006.1030709-3-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222094006.1030709-1-apatel@ventanamicro.com> References: <20240222094006.1030709-1-apatel@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240222_014037_632856_BA13737B X-CRM114-Status: GOOD ( 14.20 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use dev_info(), dev_warn(), and dev_err() in-place of pr_info(), pr_warn(), and pr_err(). Signed-off-by: Anup Patel --- drivers/irqchip/irq-sifive-plic.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index 7400a07fc479..3d7a61c35572 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -3,7 +3,6 @@ * Copyright (C) 2017 SiFive * Copyright (C) 2018 Christoph Hellwig */ -#define pr_fmt(fmt) "plic: " fmt #include #include #include @@ -372,8 +371,8 @@ static void plic_handle_irq(struct irq_desc *desc) int err = generic_handle_domain_irq(handler->priv->irqdomain, hwirq); if (unlikely(err)) - pr_warn_ratelimited("can't find mapping for hwirq %lu\n", - hwirq); + dev_warn_ratelimited(handler->priv->dev, + "can't find mapping for hwirq %lu\n", hwirq); } chained_irq_exit(chip, desc); @@ -401,7 +400,7 @@ static int plic_starting_cpu(unsigned int cpu) enable_percpu_irq(plic_parent_irq, irq_get_trigger_type(plic_parent_irq)); else - pr_warn("cpu%d: parent irq not available\n", cpu); + dev_warn(handler->priv->dev, "cpu%d: parent irq not available\n", cpu); plic_set_threshold(handler, PLIC_ENABLE_THRESHOLD); return 0; @@ -477,7 +476,7 @@ static int plic_probe(struct platform_device *pdev) unsigned long hartid; if (of_irq_parse_one(to_of_node(dev->fwnode), i, &parent)) { - pr_err("failed to parse parent for context %d.\n", i); + dev_err(dev, "failed to parse parent for context %d.\n", i); continue; } @@ -500,13 +499,13 @@ static int plic_probe(struct platform_device *pdev) error = riscv_of_parent_hartid(parent.np, &hartid); if (error < 0) { - pr_warn("failed to parse hart ID for context %d.\n", i); + dev_warn(dev, "failed to parse hart ID for context %d.\n", i); continue; } cpu = riscv_hartid_to_cpuid(hartid); if (cpu < 0) { - pr_warn("Invalid cpuid for context %d\n", i); + dev_warn(dev, "Invalid cpuid for context %d\n", i); continue; } @@ -525,7 +524,7 @@ static int plic_probe(struct platform_device *pdev) */ handler = per_cpu_ptr(&plic_handlers, cpu); if (handler->present) { - pr_warn("handler already present for context %d.\n", i); + dev_warn(dev, "handler already present for context %d.\n", i); plic_set_threshold(handler, PLIC_DISABLE_THRESHOLD); goto done; } @@ -575,8 +574,8 @@ static int plic_probe(struct platform_device *pdev) } } - pr_info("%pOFP: mapped %d interrupts with %d handlers for %d contexts.\n", - to_of_node(dev->fwnode), nr_irqs, nr_handlers, nr_contexts); + dev_info(dev, "mapped %d interrupts with %d handlers for %d contexts.\n", + nr_irqs, nr_handlers, nr_contexts); return 0; out_free_enable_reg: