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: 9631589 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 1B5A660245 for ; Fri, 17 Mar 2017 21:03:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C9152860C for ; Fri, 17 Mar 2017 21:03:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00A2C2862B; Fri, 17 Mar 2017 21:03:54 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E8DE2860C for ; Fri, 17 Mar 2017 21:03:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbdCQVDe (ORCPT ); Fri, 17 Mar 2017 17:03:34 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:33517 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbdCQVDd (ORCPT ); Fri, 17 Mar 2017 17:03:33 -0400 Received: by mail-pg0-f45.google.com with SMTP id n190so48816056pga.0 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=a5VYG+PjLefQgeAtGD0sClr14uBrmDZ4VKIZCfd8deDFi6CQdNpejv3k9jkKNb1tZh DzkJrLgRYrNRB+n+7ngqSPmMADQEtYLadW5gldR/4kJ9Xd743q8BJbAyybtp9S68wuU7 nzsqikPL2/oAe9yZCde/KjmQXjaleMh6Qc3Kx2oSrXRQD/kKUlKJ37XRDSbpnzqXKy+c 8QFWjazjJ6zwqgRXHxnJh6STmeAd+15aAxp/slqnMSsIJpQsPDZ/2wfW6EHNMKUrW/xL EST3OqT7n6TNZ3jnQJZVB+zqiHXoaUV7xUnpd5mLSvSF3gxBj3EiTwxeAatWczAjTYBB SXJg== X-Gm-Message-State: AFeK/H0Ssf6xrTRunoYY1W5M7Q2LK3RSRSl3/UpDZFbRocEcKSb0e2RTwGI80hBIKBVBn0Oz 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 Cc: Hans Verkuil , PoChun Lin , Julia Lawall , Arnd Bergmann , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Matthias Kaehlcke 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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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