From patchwork Thu Aug 30 22:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 10582963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3680D14BD for ; Thu, 30 Aug 2018 22:29:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 190E92C057 for ; Thu, 30 Aug 2018 22:29:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B1672C064; Thu, 30 Aug 2018 22:29:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 89B6A2C057 for ; Thu, 30 Aug 2018 22:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=5WunTlwvDFqomUQq4kj/IIaZSy8mPTZwizw/PzFcKs0=; b=Ubu mA2QyjZiXwEW+LrBbx21akQO8+hL6np2V0+WEvo/vRZ6STf5jSIcSmmdakE/zqPKI1KUBEPocEAtd UaxHA4owDFVzmgNQlD1LoifsNsTAf29uHWrfflC5Rnk80X9iQdhOneb42qJyTNRG8yvemwYgu9GQi K8YdBYzqcmKMZhM/tupS3ovdNj+5IrIDqKQU2wlR8Pf3UNuJMG1pSL8cshUMkC5ZRzXOiMS1iwl9H 8a0LIYp7q3GPGN+wRmwx+exLlGzZSCjUPcvOZz9tL5YcrTccrLHpTeBygJiePJuhP7ypwNkv6Q8W1 UbOo5QOxEXgj//Ay9N7tx/FtrFg5eyg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvVRD-0004K6-L5; Thu, 30 Aug 2018 22:29:15 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvVRA-0004In-7G; Thu, 30 Aug 2018 22:29:13 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 0AF0A275648 From: Ezequiel Garcia To: iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH] iommu: rockchip: Drop verbose prints in the interrupt handler Date: Thu, 30 Aug 2018 19:28:32 -0300 Message-Id: <20180830222832.16766-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_152912_395794_42952739 X-CRM114-Status: UNSURE ( 8.59 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joerg Roedel , kernel@collabora.com, Ezequiel Garcia , Heiko Stuebner , enric.balletbo@collabora.co.uk MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints. Signed-off-by: Ezequiel Garcia Reviewed-by: Heiko Stuebner --- drivers/iommu/rockchip-iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 054cd2c8e9c8..21bb9a30bc64 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -523,11 +523,13 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id) irqreturn_t ret = IRQ_NONE; int i; - if (WARN_ON(!pm_runtime_get_if_in_use(iommu->dev))) - return 0; + if (!pm_runtime_get_if_in_use(iommu->dev)) + return ret; - if (WARN_ON(clk_bulk_enable(iommu->num_clocks, iommu->clocks))) + if (clk_bulk_enable(iommu->num_clocks, iommu->clocks)) { + dev_err_ratelimited(iommu->dev, "couldn't enable clocks\n"); goto out; + } for (i = 0; i < iommu->num_mmu; i++) { int_status = rk_iommu_read(iommu->bases[i], RK_MMU_INT_STATUS); @@ -544,7 +546,7 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id) flags = (status & RK_MMU_STATUS_PAGE_FAULT_IS_WRITE) ? IOMMU_FAULT_WRITE : IOMMU_FAULT_READ; - dev_err(iommu->dev, "Page fault at %pad of type %s\n", + dev_err_ratelimited(iommu->dev, "Page fault at %pad of type %s\n", &iova, (flags == IOMMU_FAULT_WRITE) ? "write" : "read");