From patchwork Fri Mar 23 12:57:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10304563 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 7BB3C60384 for ; Fri, 23 Mar 2018 12:57:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C3D02861D for ; Fri, 23 Mar 2018 12:57:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60E652866B; Fri, 23 Mar 2018 12:57:45 +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 [198.137.202.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 E57E12861D for ; Fri, 23 Mar 2018 12:57:44 +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=Za+ayrr8z5i8ZzT7EAoAWhBtLTXHElSTE2OS/qyFhYE=; b=F1k DUrUJUwg8qTX9TIYry2q1iZRfu82OQdgo29LrqDPGsUyAxAZdpz5Jfvke0chANCuSLACYcBdYW/Bt XKyzKQCk81QKwCYcPxdsbuBoF1wVZFGsj15NTfcenT8fS9LeQqkt90UMgbRXidkS/wd0COum7v0nH kpWQAu5nZog0ihDGmTx8z2kYmPrKvLvJw5H0Sensd2wYOwXrhIGplMEAS6/vVYIPVpGFGbu6IUyeQ MIFMEC6vesTqaeEO6UwsVsZrBJKKX3N42QZlt+0cgq/hQrO1Yu1QqEhS+ibB1gnb0PEE1HfOUOWfO rOgyp9wTzs+Sm6loYpssj0gHzxpy3gQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezMGK-0006Gl-NN; Fri, 23 Mar 2018 12:57:40 +0000 Received: from osg.samsung.com ([64.30.133.232]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ezMGH-0006EM-0S for linux-arm-kernel@lists.infradead.org; Fri, 23 Mar 2018 12:57:39 +0000 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 7C4B12AC2E; Fri, 23 Mar 2018 05:57:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bUOhamCRh4Z1; Fri, 23 Mar 2018 05:57:24 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [179.183.96.62]) by osg.samsung.com (Postfix) with ESMTPSA id 550452AC26; Fri, 23 Mar 2018 05:57:24 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1ezMG1-00033T-Pd; Fri, 23 Mar 2018 08:57:21 -0400 From: Mauro Carvalho Chehab To: Subject: [PATCH] media: fimc-capture: get rid of two warnings Date: Fri, 23 Mar 2018 08:57:20 -0400 Message-Id: <6ccd228e0cfce2a4f44558422d25c60fcb1a6710.1521809837.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180323_055737_169314_501354DE X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Mauro Carvalho Chehab , Mauro Carvalho Chehab , Kyungmin Park , Kukjin Kim , Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List MIME-Version: 1.0 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 Smatch produces two warnings when building this file: ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue On some asm instructions. I suspect that those asm instructions might not be producing the right code, so, better to use two intermediate vars, get rid of the warnings and of the risk of producing a wrong code. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos4-is/fimc-capture.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index ed9302caa004..a3cdac188190 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -670,10 +670,13 @@ static void fimc_capture_try_selection(struct fimc_ctx *ctx, return; } if (target == V4L2_SEL_TGT_COMPOSE) { + u32 tmp_min_h = ffs(sink->width) - 3; + u32 tmp_min_v = ffs(sink->height) - 1; + if (ctx->rotation != 90 && ctx->rotation != 270) align_h = 1; - max_sc_h = min(SCALER_MAX_HRATIO, 1 << (ffs(sink->width) - 3)); - max_sc_v = min(SCALER_MAX_VRATIO, 1 << (ffs(sink->height) - 1)); + max_sc_h = min(SCALER_MAX_HRATIO, 1 << tmp_min_h); + max_sc_v = min(SCALER_MAX_VRATIO, 1 << tmp_min_v); min_sz = var->min_out_pixsize; } else { u32 depth = fimc_get_format_depth(sink->fmt);