From patchwork Sun Dec 6 10:44:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaoxiu Zeng X-Patchwork-Id: 7778771 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 974A6BEEE5 for ; Sun, 6 Dec 2015 11:47:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1840203E1 for ; Sun, 6 Dec 2015 11:47:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D65F203E9 for ; Sun, 6 Dec 2015 11:47:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752370AbbLFLrD (ORCPT ); Sun, 6 Dec 2015 06:47:03 -0500 Received: from mail-pa0-f66.google.com ([209.85.220.66]:34614 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbbLFLrC (ORCPT ); Sun, 6 Dec 2015 06:47:02 -0500 Received: by pacfl14 with SMTP id fl14so15047096pac.1; Sun, 06 Dec 2015 03:47:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=bCIbfc8wx9y+M6mna/oh36xteBffdqSgV1aweysLQuY=; b=qBdQhiyhK7vqH9sWkJuKAFTKfJ7eDiF2YbbxIg+XXd0XZhg/7280LbATR17ioxKpxm 0g55pnC3l6h10jIhwUTQxRNELiK7f966CGcoL2RsCWe9jAOqEWWQk1FQrt+tve1Dls3D 8AE6nzviqGqqXewmGMMYGHDh/CAUs73TW5AlLdi9DH5Qsrv5cTaUHyGtUBR8dqFN+tho h1MvaCM3z7oQJFZJmcEMF5xfJM2Gy0rDWGIreVsZ9NWFdw2aEycLyW0bUF2PIn36Lyu9 VEb19jRBbjCz+Hol6GsQDxZvL7vBZjnMx6OxyA2O7pos0mxE3xBXMwRXn/3Vw7eDyUY3 WYVg== X-Received: by 10.98.73.133 with SMTP id r5mr34510970pfi.160.1449398780561; Sun, 06 Dec 2015 02:46:20 -0800 (PST) Received: from fedora.localdomain ([223.73.7.158]) by smtp.gmail.com with ESMTPSA id a27sm27705206pfj.36.2015.12.06.02.46.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Dec 2015 02:46:19 -0800 (PST) From: Zhaoxiu Zeng To: kyungmin.park@samsung.com, s.nawrocki@samsung.com, mchehab@osg.samsung.com, kgene@kernel.org, k.kozlowski@samsung.com, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Zeng Zhaoxiu Subject: [PATCH 05/10] exynos4-is: Replace "hweight32(mask) == 1" with "is_power_of_2(mask)" Date: Sun, 6 Dec 2015 18:44:29 +0800 Message-Id: <1449398669-14507-1-git-send-email-zhaoxiu.zeng@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Zeng Zhaoxiu Signed-off-by: Zeng Zhaoxiu --- drivers/media/platform/exynos4-is/fimc-is-regs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/fimc-is-regs.c b/drivers/media/platform/exynos4-is/fimc-is-regs.c index cfe4406..ec75a24 100644 --- a/drivers/media/platform/exynos4-is/fimc-is-regs.c +++ b/drivers/media/platform/exynos4-is/fimc-is-regs.c @@ -11,6 +11,7 @@ * published by the Free Software Foundation. */ #include +#include #include "fimc-is.h" #include "fimc-is-command.h" @@ -107,7 +108,7 @@ int fimc_is_hw_get_params(struct fimc_is *is, unsigned int num_args) void fimc_is_hw_set_isp_buf_mask(struct fimc_is *is, unsigned int mask) { - if (hweight32(mask) == 1) { + if (is_power_of_2(mask)) { dev_err(&is->pdev->dev, "%s(): not enough buffers (mask %#x)\n", __func__, mask); return;