* [PATCH] [media] mtk-vcodec: fix build errors without DEBUG @ 2017-02-07 7:40 Minghsiu Tsai [not found] ` <1486453244-26094-1-git-send-email-minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Minghsiu Tsai @ 2017-02-07 7:40 UTC (permalink / raw) To: Hans Verkuil, daniel.thompson-QSEj5FYQhm4dnm+yROfE0A, Rob Herring, Mauro Carvalho Chehab, Matthias Brugger, Daniel Kurtz, Pawel Osciak Cc: srv_heupstream-NuS5LvNUpcJWk0Htik3J/w, Eddie Huang, Yingjoe Chen, Tiffany Lin, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-media-u79uwXL29TY76Z2rM5mHXA, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Minghsiu Tsai Fix build errors after removing DEBUG definition. Signed-off-by: Minghsiu Tsai <minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 9 ++++----- drivers/media/platform/mtk-vcodec/vdec_vpu_if.c | 5 ++--- drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 4 +--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c index 0746592..6219c7d 100644 --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c @@ -1126,15 +1126,14 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb) * if there is no SPS header or picture info * in bs */ - int log_level = ret ? 0 : 1; src_buf = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); v4l2_m2m_buf_done(to_vb2_v4l2_buffer(src_buf), VB2_BUF_STATE_DONE); - mtk_v4l2_debug(log_level, - "[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d", - ctx->id, src_buf->index, - src_mem.size, ret, res_chg); + mtk_v4l2_debug(ret ? 0 : 1, + "[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d", + ctx->id, src_buf->index, + src_mem.size, ret, res_chg); return; } diff --git a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c index 5a24c51..1abd14e 100644 --- a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c +++ b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c @@ -70,9 +70,8 @@ void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv) static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) { int err; - uint32_t msg_id = *(uint32_t *)msg; - mtk_vcodec_debug(vpu, "id=%X", msg_id); + mtk_vcodec_debug(vpu, "id=%X", *(uint32_t *)msg); vpu->failure = 0; vpu->signaled = 0; @@ -80,7 +79,7 @@ static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) err = vpu_ipi_send(vpu->dev, vpu->id, msg, len); if (err) { mtk_vcodec_err(vpu, "send fail vpu_id=%d msg_id=%X status=%d", - vpu->id, msg_id, err); + vpu->id, *(uint32_t *)msg, err); return err; } diff --git a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c index a01c759..0d882ac 100644 --- a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c +++ b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c @@ -79,10 +79,8 @@ static int vpu_enc_send_msg(struct venc_vpu_inst *vpu, void *msg, status = vpu_ipi_send(vpu->dev, vpu->id, msg, len); if (status) { - uint32_t msg_id = *(uint32_t *)msg; - mtk_vcodec_err(vpu, "vpu_ipi_send msg_id %x len %d fail %d", - msg_id, len, status); + *(uint32_t *)msg, len, status); return -EINVAL; } if (vpu->failure) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <1486453244-26094-1-git-send-email-minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH] [media] mtk-vcodec: fix build errors without DEBUG [not found] ` <1486453244-26094-1-git-send-email-minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> @ 2017-02-07 12:17 ` Daniel Kurtz [not found] ` <CAGS+omAU7UohsUkXwwHyhNh_dSX=R9tLKYvSV5767m81sTf_RA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Daniel Kurtz @ 2017-02-07 12:17 UTC (permalink / raw) To: Minghsiu Tsai Cc: Hans Verkuil, Daniel Thompson, Rob Herring, Mauro Carvalho Chehab, Matthias Brugger, Pawel Osciak, srv_heupstream, Eddie Huang, Yingjoe Chen, Tiffany Lin, open list:OPEN FIRMWARE AND..., linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA, moderated list:ARM/Mediatek SoC support On Tue, Feb 7, 2017 at 3:40 PM, Minghsiu Tsai <minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote: > Fix build errors after removing DEBUG definition. It would be useful to specify which build errors were fixed by this patch, and a brief description of why - namely because when DEBUG is not defined, mtk_v4l2_debug() is an empty macros, and therefore the arguments are unused. With an updated commit message, this patch is: Reviewed-by: Daniel Kurtz <djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> > > Signed-off-by: Minghsiu Tsai <minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > --- > drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 9 ++++----- > drivers/media/platform/mtk-vcodec/vdec_vpu_if.c | 5 ++--- > drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 4 +--- > 3 files changed, 7 insertions(+), 11 deletions(-) > > diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > index 0746592..6219c7d 100644 > --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > @@ -1126,15 +1126,14 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb) > * if there is no SPS header or picture info > * in bs > */ > - int log_level = ret ? 0 : 1; > > src_buf = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); > v4l2_m2m_buf_done(to_vb2_v4l2_buffer(src_buf), > VB2_BUF_STATE_DONE); > - mtk_v4l2_debug(log_level, > - "[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d", > - ctx->id, src_buf->index, > - src_mem.size, ret, res_chg); > + mtk_v4l2_debug(ret ? 0 : 1, > + "[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d", > + ctx->id, src_buf->index, > + src_mem.size, ret, res_chg); > return; > } > > diff --git a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c > index 5a24c51..1abd14e 100644 > --- a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c > +++ b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c > @@ -70,9 +70,8 @@ void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv) > static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) > { > int err; > - uint32_t msg_id = *(uint32_t *)msg; > > - mtk_vcodec_debug(vpu, "id=%X", msg_id); > + mtk_vcodec_debug(vpu, "id=%X", *(uint32_t *)msg); > > vpu->failure = 0; > vpu->signaled = 0; > @@ -80,7 +79,7 @@ static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) > err = vpu_ipi_send(vpu->dev, vpu->id, msg, len); > if (err) { > mtk_vcodec_err(vpu, "send fail vpu_id=%d msg_id=%X status=%d", > - vpu->id, msg_id, err); > + vpu->id, *(uint32_t *)msg, err); > return err; > } > > diff --git a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c > index a01c759..0d882ac 100644 > --- a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c > +++ b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c > @@ -79,10 +79,8 @@ static int vpu_enc_send_msg(struct venc_vpu_inst *vpu, void *msg, > > status = vpu_ipi_send(vpu->dev, vpu->id, msg, len); > if (status) { > - uint32_t msg_id = *(uint32_t *)msg; > - > mtk_vcodec_err(vpu, "vpu_ipi_send msg_id %x len %d fail %d", > - msg_id, len, status); > + *(uint32_t *)msg, len, status); > return -EINVAL; > } > if (vpu->failure) > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <CAGS+omAU7UohsUkXwwHyhNh_dSX=R9tLKYvSV5767m81sTf_RA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] [media] mtk-vcodec: fix build errors without DEBUG [not found] ` <CAGS+omAU7UohsUkXwwHyhNh_dSX=R9tLKYvSV5767m81sTf_RA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-02-08 1:38 ` Minghsiu Tsai 0 siblings, 0 replies; 3+ messages in thread From: Minghsiu Tsai @ 2017-02-08 1:38 UTC (permalink / raw) To: Daniel Kurtz Cc: Hans Verkuil, Daniel Thompson, Rob Herring, Mauro Carvalho Chehab, Matthias Brugger, Pawel Osciak, srv_heupstream, Eddie Huang, Yingjoe Chen, Tiffany Lin, open list:OPEN FIRMWARE AND..., linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA, moderated list:ARM/Mediatek SoC support On Tue, 2017-02-07 at 20:17 +0800, Daniel Kurtz wrote: > On Tue, Feb 7, 2017 at 3:40 PM, Minghsiu Tsai > <minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> wrote: > > Fix build errors after removing DEBUG definition. > > It would be useful to specify which build errors were fixed by this > patch, and a brief description of why - namely because when DEBUG is > not defined, mtk_v4l2_debug() is an empty macros, and therefore the > arguments are unused. > > With an updated commit message, this patch is: > > Reviewed-by: Daniel Kurtz <djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> > Hi Daniel, Thanks for your review and comment. I will update it soon. > > > > Signed-off-by: Minghsiu Tsai <minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> > > --- > > drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 9 ++++----- > > drivers/media/platform/mtk-vcodec/vdec_vpu_if.c | 5 ++--- > > drivers/media/platform/mtk-vcodec/venc_vpu_if.c | 4 +--- > > 3 files changed, 7 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > > index 0746592..6219c7d 100644 > > --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > > +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > > @@ -1126,15 +1126,14 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb) > > * if there is no SPS header or picture info > > * in bs > > */ > > - int log_level = ret ? 0 : 1; > > > > src_buf = v4l2_m2m_src_buf_remove(ctx->m2m_ctx); > > v4l2_m2m_buf_done(to_vb2_v4l2_buffer(src_buf), > > VB2_BUF_STATE_DONE); > > - mtk_v4l2_debug(log_level, > > - "[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d", > > - ctx->id, src_buf->index, > > - src_mem.size, ret, res_chg); > > + mtk_v4l2_debug(ret ? 0 : 1, > > + "[%d] vdec_if_decode() src_buf=%d, size=%zu, fail=%d, res_chg=%d", > > + ctx->id, src_buf->index, > > + src_mem.size, ret, res_chg); > > return; > > } > > > > diff --git a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c > > index 5a24c51..1abd14e 100644 > > --- a/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c > > +++ b/drivers/media/platform/mtk-vcodec/vdec_vpu_if.c > > @@ -70,9 +70,8 @@ void vpu_dec_ipi_handler(void *data, unsigned int len, void *priv) > > static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) > > { > > int err; > > - uint32_t msg_id = *(uint32_t *)msg; > > > > - mtk_vcodec_debug(vpu, "id=%X", msg_id); > > + mtk_vcodec_debug(vpu, "id=%X", *(uint32_t *)msg); > > > > vpu->failure = 0; > > vpu->signaled = 0; > > @@ -80,7 +79,7 @@ static int vcodec_vpu_send_msg(struct vdec_vpu_inst *vpu, void *msg, int len) > > err = vpu_ipi_send(vpu->dev, vpu->id, msg, len); > > if (err) { > > mtk_vcodec_err(vpu, "send fail vpu_id=%d msg_id=%X status=%d", > > - vpu->id, msg_id, err); > > + vpu->id, *(uint32_t *)msg, err); > > return err; > > } > > > > diff --git a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c > > index a01c759..0d882ac 100644 > > --- a/drivers/media/platform/mtk-vcodec/venc_vpu_if.c > > +++ b/drivers/media/platform/mtk-vcodec/venc_vpu_if.c > > @@ -79,10 +79,8 @@ static int vpu_enc_send_msg(struct venc_vpu_inst *vpu, void *msg, > > > > status = vpu_ipi_send(vpu->dev, vpu->id, msg, len); > > if (status) { > > - uint32_t msg_id = *(uint32_t *)msg; > > - > > mtk_vcodec_err(vpu, "vpu_ipi_send msg_id %x len %d fail %d", > > - msg_id, len, status); > > + *(uint32_t *)msg, len, status); > > return -EINVAL; > > } > > if (vpu->failure) > > -- > > 1.9.1 > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-08 1:38 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-02-07 7:40 [PATCH] [media] mtk-vcodec: fix build errors without DEBUG Minghsiu Tsai [not found] ` <1486453244-26094-1-git-send-email-minghsiu.tsai-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> 2017-02-07 12:17 ` Daniel Kurtz [not found] ` <CAGS+omAU7UohsUkXwwHyhNh_dSX=R9tLKYvSV5767m81sTf_RA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-02-08 1:38 ` Minghsiu Tsai
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).