From: minghsiu.tsai@mediatek.com (Minghsiu Tsai)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] mtk-mdp: fix compilation warnings if !DEBUG
Date: Mon, 24 Oct 2016 19:27:30 +0800 [thread overview]
Message-ID: <1477308450.29543.9.camel@mtksdaap41> (raw)
In-Reply-To: <5a24855fda4d91a58f119c2d70177017e06fc6f0.1477058332.git.mchehab@s-opensource.com>
On Fri, 2016-10-21 at 11:59 -0200, Mauro Carvalho Chehab wrote:
> The mtk_mdp_dbg() is empty if !DEBUG. This causes the following
> warnings:
>
> drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c: In function ?mtk_mdp_try_fmt_mplane?:
> drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:231:52: warning: suggest braces around empty body in an ?if? statement [-Wempty-body]
> org_w, org_h, pix_mp->width, pix_mp->height);
> ^
> drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c: In function ?mtk_mdp_m2m_start_streaming?:
> drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c:414:21: warning: suggest braces around empty body in an ?if? statement [-Wempty-body]
> ctx->id, ret);
> ^
>
> With could actually make the code to do something wrong. So,
> add an empty block to make it be parsed ok.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
> drivers/media/platform/mtk-mdp/mtk_mdp_core.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mtk-mdp/mtk_mdp_core.h b/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
> index 2e979f97d1df..848569d4ab90 100644
> --- a/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
> +++ b/drivers/media/platform/mtk-mdp/mtk_mdp_core.h
> @@ -250,7 +250,7 @@ extern int mtk_mdp_dbg_level;
>
> #else
>
> -#define mtk_mdp_dbg(level, fmt, args...)
> +#define mtk_mdp_dbg(level, fmt, args...) {}
>
Acked-by: Minghsiu Tsai <minghsiu.tsai@mediatek.com>
> #define mtk_mdp_err(fmt, args...)
> #define mtk_mdp_dbg_enter()
> #define mtk_mdp_dbg_leave()
next prev parent reply other threads:[~2016-10-24 11:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 13:59 [PATCH 1/4] mtk_mdp_vpu: fix build with COMPILE_TEST for 32 bits Mauro Carvalho Chehab
2016-10-21 13:59 ` [PATCH 2/4] mtk_mdp_vpu: remove a double unlock at the error path Mauro Carvalho Chehab
2016-10-24 11:59 ` Minghsiu Tsai
2016-10-21 13:59 ` [PATCH 3/4] mtk_mdp_m2m: remove an unused struct Mauro Carvalho Chehab
2016-10-24 11:47 ` [SPAM][PATCH " Minghsiu Tsai
2016-10-24 11:49 ` [PATCH " Minghsiu Tsai
2016-10-21 13:59 ` [PATCH 4/4] mtk-mdp: fix compilation warnings if !DEBUG Mauro Carvalho Chehab
2016-10-24 11:27 ` Minghsiu Tsai [this message]
2016-10-24 11:26 ` [PATCH 1/4] mtk_mdp_vpu: fix build with COMPILE_TEST for 32 bits Minghsiu Tsai
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=1477308450.29543.9.camel@mtksdaap41 \
--to=minghsiu.tsai@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