Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp84839imw; Tue, 12 Jul 2022 15:08:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7VVsC5wQx4XsJFi91ttREpE6c8e6kKsbFFQEooYebUBo8LEutmHsrneSAX7pRz1/7ToDo X-Received: by 2002:a05:6a00:cc5:b0:52a:b63a:4f9 with SMTP id b5-20020a056a000cc500b0052ab63a04f9mr55539pfv.19.1657663725039; Tue, 12 Jul 2022 15:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657663725; cv=none; d=google.com; s=arc-20160816; b=LnyCM5ZYYalhbJPVFDVLnDv302PwMn5MLZgadNloAxtpLZ7zxuEsM8nymvl7z96OeJ A700AAqixcRP/pcElCh7CST/8exip360vadd5TBEN+o3IPT7OSuibNdkm2Rxzlc8uN++ dCmTpPJKl7jSbPApnRQKTjmroDSjBpNyQxVJRZCe/Q3FuAdmyVVbSEFkzFvYFLJTHZh+ KOMHGE2L37gM6VGGeRJp1ZxA/7l5bgSUkePXSUq8BvCcoA4v6k7rDA3+uZoQJpsfACZZ 7Z1qD6luTTD32mVBnq2OU0pAs+b9RKijp+yaYVwMpoOnsXVZLeuq/Ynsg0JilSTArhiP +Uhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=SANjvPOceveX3/yf3V5lkdt6+QFJpAS540mS+2vMRPM=; b=Uq27+DLHMp3N6zg0ZPCefPmuHMRg3YyIw73WnI7Nn4fxQ9Xn4FOcY2S2x0oZ9kB5vI Ky30byXExeYN4Q79SwGrmFMPmbEQ9QXkYVOkeVAR/yEnWsS+b9r/xDi/c9aPMa/cL9Xd IopMICjK9b5zGn48gt6NzaGX+SdCPp/+w9GA0ClAkM8nMlrY4MvuR1WXVCFE5ORHPk1O XX2lE2Rgy++ATkndEoC8pdI3gh11FoGq9kyXpWe8iu1tGj8OGt//UTQF6OeDB4aAs1t3 GoTt3+5cs2ahLg51NbVWtSCvJTut8D9fIX3KFi3OgYJ3M6aVARc/7+s95YXGlQeInJc5 8kCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=P4uqCVhD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oj6-20020a17090b4d8600b001f06a6fdb2fsi300677pjb.27.2022.07.12.15.08.26; Tue, 12 Jul 2022 15:08:45 -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=@collabora.com header.s=mail header.b=P4uqCVhD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232944AbiGLVog (ORCPT + 99 others); Tue, 12 Jul 2022 17:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbiGLVof (ORCPT ); Tue, 12 Jul 2022 17:44:35 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8814F2FFFB for ; Tue, 12 Jul 2022 14:44:34 -0700 (PDT) Received: from notapiano.myfiosgateway.com (pool-98-113-53-228.nycmny.fios.verizon.net [98.113.53.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 4408766015C4; Tue, 12 Jul 2022 22:44:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657662272; bh=Wik+BSgjTEwACqP1//DVq69wKrPz3LMLTI3NbGLzuqg=; h=From:To:Cc:Subject:Date:From; b=P4uqCVhD4Vkk33HXVq83SlYRoshdXd6+uKuOAFEKfb7tbcruikwjgLShkeTD1BHUo Ul1nYF4ubAs7IM5CytrNG6f8GXLnMog8lbzqE5m9xiqRbGJhGsSDxBb/R3ut+U/+9J dyMsm6+hfZu/2jL0cAD7aYYnDReYBUDN9yjyQzTQOtbS9wCU9o9xYRqz5Nkzwg5if+ wJpUjZM2k9ZC7FauIFOBhR9Q2wExNfmoE5lnp3pGoi5M6vsP4tMhG2eMiIBQwxAZ3T 8vzWbtglFMdvrKEX3rzzTGpTaJQdN4p6GmB/odr9vPuxu8NtNtKji/PDeZsg9D/K4P 6Ms0SZ7wCAF/Q== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Joerg Roedel Cc: AngeloGioacchino Del Regno , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Matthias Brugger , Will Deacon , Yong Wu , iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH] iommu/mediatek: Log with dev_err_probe when failing to parse dts Date: Tue, 12 Jul 2022 17:44:27 -0400 Message-Id: <20220712214427.544860-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 mtk_iommu_mm_dts_parse() can fail with EPROBE_DEFER if not all larbs have probed yet, so use dev_err_probe() to avoid logging as an error in that case. Also drop the return value from the message since it's already printed by dev_err_probe(), and add the missing newline at the end. Signed-off-by: NĂ­colas F. R. A. Prado --- drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index b2ae84046249..3d23409bf108 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1214,7 +1214,7 @@ static int mtk_iommu_probe(struct platform_device *pdev) if (MTK_IOMMU_IS_TYPE(data->plat_data, MTK_IOMMU_TYPE_MM)) { ret = mtk_iommu_mm_dts_parse(dev, &match, data); if (ret) { - dev_err(dev, "mm dts parse fail(%d).", ret); + dev_err_probe(dev, ret, "mm dts parse fail\n"); goto out_runtime_disable; } } else if (MTK_IOMMU_IS_TYPE(data->plat_data, MTK_IOMMU_TYPE_INFRA)) { -- 2.37.0