From patchwork Wed Jun 14 13:19:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13280047 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 49FD9EB64D8 for ; Wed, 14 Jun 2023 13:20:14 +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:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=Zrmw0hlF+kRmNKw2FHyDEtCRMfEnU0ZzT4cli3qXlls=; b=AHzEv0bnrY5CO8 inT5IsVvQpiXpHnLQBbxz/Bhlwx7uw+HXMeh2XzQ6Rs/nCFy7sqawZ/Gi1Abx3CTeSbQVfdwaf7B0 RL07m2wRAD29edYIqyV1cz/i0odcJTskGxRTcKbNFqoER+QmVrfr3PHRt1RSbx2cO4K8Ae7m2mvKv D12JF86nB+MC2ea5ap9kT0F0zZiIkDOUv2Y1UXLuHXrKbTeohDSGFnElhyF6KE23UG08SnrOCn040 wCnVrmGL5U3mRSMHNeClXLuRLZdY+7cYJRMECaEEaAEH4wywD2K197voLXLdDZTZ4qlsa0MP8lua1 AUp18GRTkUsr+RXa/NKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q9QPf-00BjL3-32; Wed, 14 Jun 2023 13:19:51 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q9QPc-00BjJM-2G for linux-arm-kernel@lists.infradead.org; Wed, 14 Jun 2023 13:19:50 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f81b449357so7195285e9.0 for ; Wed, 14 Jun 2023 06:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686748786; x=1689340786; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PTawR0BST9G8lotfidO6LQNYRUso7ZDIUXpuUcCHtQE=; b=BkNqnKVPVix70BOCgXe1QS8U2bYh+Edg1fvfVenwQ/Ri1EdnqryOIy0ZDW8e4tRjGZ gKywT15Z86R6zMxsROch7kSZqBpTDmKV60o3lgC8wmvibvywkcPd2gST+lF9rS6+E8Z/ BzqjJ2VW/T4Mx5qRRXO2O7UjR4O/jT6wfJTgqZbg72kZCLTRN/G7JPNaq9R8hN/xNMB6 HWw3AE9CYtxy9ebFDvEmT6Kg4WhNlB/Qc24OigcLyAAbvLLJOLyTD26ZrrvMgFaVCi+Z we0Cf+dolYNcSkqDdd6FasfuwA0+Sok2MdB4LIaRjktDqg/HwbfHxywwfLxOeC23JCql 0N2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686748786; x=1689340786; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PTawR0BST9G8lotfidO6LQNYRUso7ZDIUXpuUcCHtQE=; b=AhHYUDG2WPLU+8PydowqG0HliyPX9kZ69VMdJniVho5+pQNI9CKzki+LUUKUMh0bt1 iXgpIWmjHu1Qd50YXBz5TK+/QKYGMG367mIsUW5pSQv+dYj7X38WFN2k0PpRJGbiXn5D HHUid2F/YVuAAIeObffP/OPDFxrRXxV9/hFv8P8Y/T3kdcnl0w/UOMOcgKxDIMkcdLuL HaBIbKWYMfpN7KDtbq5eA7/CTLOoJNjmtJWKpPomEmmKp80JO4yx+iBZJIo6muM+0RaJ 6qRaIsfVWssxSHPxO/Sv+YAg04X7Rl8ekK5Eprm9Ya3T9hsHFXcLbx4NVR9UH2ob5wUq FcHg== X-Gm-Message-State: AC+VfDxlmMZpHcLjPlitnhWmA9sE6CZBT6udj5sB6JcfMNMA8v8YmGx6 Wi49pmjbFGoD6A22IXhXrX16EA== X-Google-Smtp-Source: ACHHUZ4DeIGubCRzWcvMeuPt39igLK19RrM/aDbDy7aAEaqAAwy/j8foX3lY71X1d6U5MvbZfo2OWA== X-Received: by 2002:a05:600c:287:b0:3f6:766:f76f with SMTP id 7-20020a05600c028700b003f60766f76fmr11311559wmk.36.1686748786546; Wed, 14 Jun 2023 06:19:46 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id z21-20020a1c4c15000000b003f80622bb65sm16430946wmf.12.2023.06.14.06.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 06:19:45 -0700 (PDT) Date: Wed, 14 Jun 2023 16:19:41 +0300 From: Dan Carpenter To: Yunfei Dong Cc: Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno , Hans Verkuil , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH 4/4] media: mediatek: vcodec: Improve an error message Message-ID: <0cdeeee4-3bd7-4bd5-88a1-c5ecf7f6a1f8@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230614_061948_739978_23B259F2 X-CRM114-Status: GOOD ( 15.02 ) 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 This is intended to print the error code but there is a typo so it prints IS_ERR() instead of PTR_ERR(). Fixes: 77f3b023f452 ("media: mediatek: vcodec: Add debugfs interface to get debug information") Signed-off-by: Dan Carpenter Reviewed-by: Nicolas Dufresne --- This driver has quite a bit of code to handle the case where DEBUG_FS is turned off. It's a bit over engineered. With debugfs you're normally just supposed to call the functions and ignore the errors. But it's also harmless to do it this way. drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c index 2ebf68d33d57..6957105492ae 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c @@ -185,8 +185,8 @@ void mtk_vcodec_dbgfs_init(struct mtk_vcodec_dev *vcodec_dev, bool is_encode) else vcodec_dev->dbgfs.vcodec_root = debugfs_create_dir("vcodec-dec", NULL); if (IS_ERR(vcodec_dev->dbgfs.vcodec_root)) - dev_err(&vcodec_dev->plat_dev->dev, "create vcodec dir err:%d\n", - IS_ERR(vcodec_dev->dbgfs.vcodec_root)); + dev_err(&vcodec_dev->plat_dev->dev, "create vcodec dir err:%ld\n", + PTR_ERR(vcodec_dev->dbgfs.vcodec_root)); vcodec_root = vcodec_dev->dbgfs.vcodec_root; debugfs_create_x32("mtk_v4l2_dbg_level", 0644, vcodec_root, &mtk_v4l2_dbg_level);