On Mon Oct 13 14:15:04 2025 +0000, Ricardo Ribalda wrote:
> The %pe format specifier is designed to print error pointers. It prints
> a symbolic error name (eg. -EINVAL) and it makes the code simpler by
> omitting PTR_ERR().
> 
> This patch fixes this cocci report:
> ./platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c:187:3-10: WARNING: 
> Consider using %pe to print PTR_ERR()
> 
> Signed-off-by: Ricardo Ribalda <[email protected]>
> Reviewed-by: AngeloGioacchino Del Regno 
> <[email protected]>
> Acked-by: Sakari Ailus <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

diff --git a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c 
b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c
index 5ad3797836db..643d6fff088b 100644
--- a/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c
+++ b/drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c
@@ -183,8 +183,8 @@ static void mtk_vcodec_dbgfs_vdec_init(struct 
mtk_vcodec_dec_dev *vcodec_dev)
 
        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:%ld\n",
-                       PTR_ERR(vcodec_dev->dbgfs.vcodec_root));
+               dev_err(&vcodec_dev->plat_dev->dev, "create vcodec dir 
err:%pe\n",
+                       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);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to