From: tiffany.lin@mediatek.com (Tiffany Lin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] [media] mtk-vcodec: Show mtk driver error without DEBUG definition
Date: Mon, 19 Jun 2017 15:59:03 +0800 [thread overview]
Message-ID: <1497859143.27486.1.camel@mtksdaap41> (raw)
In-Reply-To: <20170530095358.2685-1-hiroh@chromium.org>
On Tue, 2017-05-30 at 18:53 +0900, Hirokazu Honda wrote:
> A driver error message is shown without DEBUG definition
> to find an error and debug easily.
>
> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Acked-by: Tiffany Lin <tiffany.lin@mediatek.com>
> ---
> drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h | 20 +++++++++-----------
> 1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h b/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h
> index 237e144c194f..06c254f5c171 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_util.h
> @@ -32,6 +32,15 @@ extern int mtk_v4l2_dbg_level;
> extern bool mtk_vcodec_dbg;
>
>
> +#define mtk_v4l2_err(fmt, args...) \
> + pr_err("[MTK_V4L2][ERROR] %s:%d: " fmt "\n", __func__, __LINE__, \
> + ##args)
> +
> +#define mtk_vcodec_err(h, fmt, args...) \
> + pr_err("[MTK_VCODEC][ERROR][%d]: %s() " fmt "\n", \
> + ((struct mtk_vcodec_ctx *)h->ctx)->id, __func__, ##args)
> +
> +
> #if defined(DEBUG)
>
> #define mtk_v4l2_debug(level, fmt, args...) \
> @@ -41,11 +50,6 @@ extern bool mtk_vcodec_dbg;
> level, __func__, __LINE__, ##args); \
> } while (0)
>
> -#define mtk_v4l2_err(fmt, args...) \
> - pr_err("[MTK_V4L2][ERROR] %s:%d: " fmt "\n", __func__, __LINE__, \
> - ##args)
> -
> -
> #define mtk_v4l2_debug_enter() mtk_v4l2_debug(3, "+")
> #define mtk_v4l2_debug_leave() mtk_v4l2_debug(3, "-")
>
> @@ -57,22 +61,16 @@ extern bool mtk_vcodec_dbg;
> __func__, ##args); \
> } while (0)
>
> -#define mtk_vcodec_err(h, fmt, args...) \
> - pr_err("[MTK_VCODEC][ERROR][%d]: %s() " fmt "\n", \
> - ((struct mtk_vcodec_ctx *)h->ctx)->id, __func__, ##args)
> -
> #define mtk_vcodec_debug_enter(h) mtk_vcodec_debug(h, "+")
> #define mtk_vcodec_debug_leave(h) mtk_vcodec_debug(h, "-")
>
> #else
>
> #define mtk_v4l2_debug(level, fmt, args...) {}
> -#define mtk_v4l2_err(fmt, args...) {}
> #define mtk_v4l2_debug_enter() {}
> #define mtk_v4l2_debug_leave() {}
>
> #define mtk_vcodec_debug(h, fmt, args...) {}
> -#define mtk_vcodec_err(h, fmt, args...) {}
> #define mtk_vcodec_debug_enter(h) {}
> #define mtk_vcodec_debug_leave(h) {}
>
prev parent reply other threads:[~2017-06-19 7:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 9:53 [PATCH v2] [media] mtk-vcodec: Show mtk driver error without DEBUG definition Hirokazu Honda
2017-06-19 7:59 ` Tiffany Lin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497859143.27486.1.camel@mtksdaap41 \
--to=tiffany.lin@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).