Thread (18 messages) 18 messages, 2 authors, 2023-06-07

Re: [PATCH 4/8] mediatek: vcodec: remove the dependency of debug log

From: Yunfei Dong (董云飞) <Yunfei.Dong@mediatek.com>
Date: 2023-06-01 09:52:24
Also in: linux-arm-kernel, linux-media, linux-mediatek, lkml

Hi AngeloGioacchino,

Thanks for your suggestion.
On Thu, 2023-06-01 at 11:29 +0200, AngeloGioacchino Del Regno wrote:
 	 
External email : Please do not click links or open attachments until
you have verified the sender or the content.
 Il 01/06/23 05:02, Yunfei Dong ha scritto:
quoted
'mtk_vcodec_debug' and 'mtk_vcodec_err' depends on 'mtk_vcodec_ctx'
to get the index of each instance, using the index directly instead
of with 'mtk_vcodec_ctx'.

Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
  .../mediatek/vcodec/mtk_vcodec_util.h         |  36 +++--
  .../vcodec/vdec/vdec_av1_req_lat_if.c         |  78 +++++------
  .../mediatek/vcodec/vdec/vdec_h264_if.c       |  46 +++----
  .../mediatek/vcodec/vdec/vdec_h264_req_if.c   |  32 ++---
  .../vcodec/vdec/vdec_h264_req_multi_if.c      |  62 ++++-----
  .../vcodec/vdec/vdec_hevc_req_multi_if.c      |  54 ++++----
  .../mediatek/vcodec/vdec/vdec_vp8_if.c        |  38 +++---
  .../mediatek/vcodec/vdec/vdec_vp8_req_if.c    |  36 ++---
  .../mediatek/vcodec/vdec/vdec_vp9_if.c        | 128 +++++++++--
-------
quoted
  .../vcodec/vdec/vdec_vp9_req_lat_if.c         |  67 ++++-----
  .../platform/mediatek/vcodec/vdec_vpu_if.c    |  48 +++----
  .../mediatek/vcodec/venc/venc_h264_if.c       |  74 +++++-----
  .../mediatek/vcodec/venc/venc_vp8_if.c        |  44 +++---
  .../platform/mediatek/vcodec/venc_vpu_if.c    |  54 ++++----
  14 files changed, 399 insertions(+), 398 deletions(-)

diff --git
a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
quoted
index ecb0bdf3a4f4..f018af38b39d 100644
--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_util.h
@@ -31,42 +31,38 @@ struct mtk_vcodec_dev;
  #define mtk_v4l2_err(fmt, args...)                \
  pr_err("[MTK_V4L2][ERROR] " fmt "\n", ##args)
  
-#define mtk_vcodec_err(h, fmt, args...)\
-pr_err("[MTK_VCODEC][ERROR][%d]: " fmt "\n",\
-       ((struct mtk_vcodec_ctx *)(h)->ctx)->id, ##args)
+#define mtk_vcodec_err(inst_id, fmt,
args...)                          \
quoted
+pr_err("[MTK_VCODEC][ERROR][%d]: " fmt "\n", inst_id, ##args)
  
This *huge* cleanup (congrats btw!) would be a great occasion to
change those
pr_err() to dev_err(). Can we do that?
Can change pr_err to dev_err, but need to add one extra parameter "dev"
in mtk_vcodec_err. Whether need to change mtk_vcodec_debug?
Regards,
Angelo
Best Regards,
Yunfei Dong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help