From patchwork Tue Oct 23 15:42:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 1631441 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 6FD11DF283 for ; Tue, 23 Oct 2012 15:42:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933097Ab2JWPmy (ORCPT ); Tue, 23 Oct 2012 11:42:54 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:57614 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933045Ab2JWPmx (ORCPT ); Tue, 23 Oct 2012 11:42:53 -0400 Received: from salottisipuli.retiisi.org.uk (salottisipuli.retiisi.org.uk [IPv6:2001:1bc8:102:6d9a::83:2]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 1C5536009C; Tue, 23 Oct 2012 18:42:52 +0300 (EEST) Received: by salottisipuli.retiisi.org.uk (Postfix, from userid 1000) id 5FB692371C; Tue, 23 Oct 2012 18:42:51 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: timo.ahonen@nokia.com, laurent.pinchart@ideasonboard.com Subject: [PATCH 1/6] smiapp-pll: Correct type for min_t() Date: Tue, 23 Oct 2012 18:42:45 +0300 Message-Id: <1351006971-32308-1-git-send-email-sakari.ailus@iki.fi> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <20121023154231.GB23685@valkosipuli.retiisi.org.uk> References: <20121023154231.GB23685@valkosipuli.retiisi.org.uk> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Unsigned. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp-pll.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/smiapp-pll.c b/drivers/media/i2c/smiapp-pll.c index 169f305..e92dc46 100644 --- a/drivers/media/i2c/smiapp-pll.c +++ b/drivers/media/i2c/smiapp-pll.c @@ -162,7 +162,7 @@ int smiapp_pll_calculate(struct device *dev, struct smiapp_pll_limits *limits, more_mul_max); /* Don't go above max pll op frequency. */ more_mul_max = - min_t(int, + min_t(uint32_t, more_mul_max, limits->max_pll_op_freq_hz / (pll->ext_clk_freq_hz / pll->pre_pll_clk_div * mul)); @@ -322,7 +322,7 @@ int smiapp_pll_calculate(struct device *dev, struct smiapp_pll_limits *limits, for (sys_div = min_sys_div; sys_div <= max_sys_div; sys_div += 2 - (sys_div & 1)) { - int pix_div = DIV_ROUND_UP(vt_div, sys_div); + uint16_t pix_div = DIV_ROUND_UP(vt_div, sys_div); if (pix_div < limits->min_vt_pix_clk_div || pix_div > limits->max_vt_pix_clk_div) {