From patchwork Fri Mar 17 21:01:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 9631585 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 3CC7A60245 for ; Fri, 17 Mar 2017 21:02:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F1FF28491 for ; Fri, 17 Mar 2017 21:02:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23B9E2860C; Fri, 17 Mar 2017 21:02:32 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A070128491 for ; Fri, 17 Mar 2017 21:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=bBgFPvzh1p8ZHD1vQp38aYBXp6QMpznp2rCMSvgzHf4=; b=AOT B3j5zsmpnKhup1TZS4qsKu1DSvlx7TL+FlTdAE/Lpc5/p5M0Rea71U0uRRGGmFJVHd9qIbqNTNyu6 pFY0Z3tNDOXGFKYJ7zKf9hR3V2VhIFhyfy/kWiEgASV9sUKswXnIN8FsdnFaly6AKnG3k+E0C9463 vP1seydXJ7l4Qikj+3yL4AgCYDsGAAgwEQtqkj7ABAhtGlx+ZbJMv0F/mkNGQIsEvLV6lbQ7alPnO QG+xLW3DeS7hrU1Vs3eehOto0lwPXDwtOOreYjgsjanUCdSdldYYkPmwOLSkwflHosqBKnIZaZJOk gvrfg9pOpKQDDHH3B+yW7rvDAJIE34g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1coz14-0001mR-Jy; Fri, 17 Mar 2017 21:02:30 +0000 Received: from mail-pg0-f53.google.com ([74.125.83.53]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1coz10-0001jv-3x for linux-mediatek@lists.infradead.org; Fri, 17 Mar 2017 21:02:28 +0000 Received: by mail-pg0-f53.google.com with SMTP id 21so15523882pgg.1 for ; Fri, 17 Mar 2017 14:02:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JAFLDGSJiCx9NGxdDeGpuvC3sk/A8G5FeNhC1WFaWuQ=; b=MWdthKJvq9fWFhlrpgs+38D7ZQjoWEK4itjULxcY2hZ0JQe3tlty1vjbd6dG5ExlJ7 C3+FQUpVzmKJdfs1XFU5QT9vVB7JaPThwEseMqyo8Zj+D16oWd1geM2k6PPQFNsm8M0p XaLkgR/K1E1Ttzmnsrsh7RVeEjQcFCZHceP1W2bf4WAB3wNU8AiTuFGJ3PA9nKWGAwS7 QK+DjTyEgjFlJirIn70Tp0wqdSj7LR7HPQP61W8LhVyS9UmY4us4jUfpkCo4LX5uYuyL 9SsMfv+UpRXkogwuotw+RD1MWV80Z2nI42N90zH4kQWhuRQZL+Etr7Q3oqRIf451bMoz mDCw== X-Gm-Message-State: AFeK/H2KY7gLHWoxdNV+YUbBZZXnYi25Xq0PS0C954QnbUxs87ooMOM6sgDTI38at0nghGlo X-Received: by 10.99.45.3 with SMTP id t3mr18411014pgt.162.1489784524602; Fri, 17 Mar 2017 14:02:04 -0700 (PDT) Received: from mka.mtv.corp.google.com ([172.22.66.174]) by smtp.gmail.com with ESMTPSA id k184sm18679812pgc.23.2017.03.17.14.02.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Mar 2017 14:02:03 -0700 (PDT) From: Matthias Kaehlcke To: Andrew-CT Chen , Mauro Carvalho Chehab , Matthias Brugger Subject: [PATCH] [media] vcodec: mediatek: Remove double parentheses Date: Fri, 17 Mar 2017 14:01:33 -0700 Message-Id: <20170317210133.9662-1-mka@chromium.org> X-Mailer: git-send-email 2.12.0.367.g23dc2f6d3c-goog X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170317_140226_201945_85CD2DDD X-CRM114-Status: GOOD ( 11.01 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Julia Lawall , Matthias Kaehlcke , Hans Verkuil , PoChun Lin , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The extra pairs of parentheses are not needed and cause clang warnings like this: drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:158:32: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] if ((inst->work_bufs[i].size == 0)) ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:158:32: note: remove extraneous parentheses around the comparison to silence this warning if ((inst->work_bufs[i].size == 0)) ~ ^ ~ drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:158:32: note: use '=' to turn this equality comparison into an assignment if ((inst->work_bufs[i].size == 0)) ^~ = Signed-off-by: Matthias Kaehlcke --- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c index 544f57186243..129cc74b4fe4 100644 --- a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c +++ b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c @@ -155,7 +155,7 @@ static void vp8_enc_free_work_buf(struct venc_vp8_inst *inst) /* Buffers need to be freed by AP. */ for (i = 0; i < VENC_VP8_VPU_WORK_BUF_MAX; i++) { - if ((inst->work_bufs[i].size == 0)) + if (inst->work_bufs[i].size == 0) continue; mtk_vcodec_mem_free(inst->ctx, &inst->work_bufs[i]); } @@ -172,7 +172,7 @@ static int vp8_enc_alloc_work_buf(struct venc_vp8_inst *inst) mtk_vcodec_debug_enter(inst); for (i = 0; i < VENC_VP8_VPU_WORK_BUF_MAX; i++) { - if ((wb[i].size == 0)) + if (wb[i].size == 0) continue; /* * This 'wb' structure is set by VPU side and shared to AP for