From patchwork Fri Oct 21 13:59:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9389239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 49B2E60762 for ; Fri, 21 Oct 2016 14:02:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B7E52A223 for ; Fri, 21 Oct 2016 14:02:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2F86C2A22F; Fri, 21 Oct 2016 14:02:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D7AD82A223 for ; Fri, 21 Oct 2016 14:02:42 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxaNr-0005en-2E; Fri, 21 Oct 2016 14:01:19 +0000 Received: from 177.205.67.60.dynamic.adsl.gvt.net.br ([177.205.67.60] helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxaMx-0004lv-8Y; Fri, 21 Oct 2016 14:00:23 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.87) (envelope-from ) id 1bxaLw-0004h6-85; Fri, 21 Oct 2016 11:59:20 -0200 From: Mauro Carvalho Chehab To: Subject: [PATCH 4/4] mtk-mdp: fix compilation warnings if !DEBUG Date: Fri, 21 Oct 2016 11:59:19 -0200 Message-Id: <5a24855fda4d91a58f119c2d70177017e06fc6f0.1477058332.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Minghsiu Tsai , Mauro Carvalho Chehab , Mauro Carvalho Chehab , Hans Verkuil , Matthias Brugger , linux-mediatek@lists.infradead.org, Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Minghsiu Tsai --- 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...) {} #define mtk_mdp_err(fmt, args...) #define mtk_mdp_dbg_enter() #define mtk_mdp_dbg_leave()