From patchwork Tue Jan 8 01:19:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1943251 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4CE8B3FC5A for ; Tue, 8 Jan 2013 01:19:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754863Ab3AHBTm (ORCPT ); Mon, 7 Jan 2013 20:19:42 -0500 Received: from mail-yh0-f46.google.com ([209.85.213.46]:45573 "EHLO mail-yh0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754831Ab3AHBTm (ORCPT ); Mon, 7 Jan 2013 20:19:42 -0500 Received: by mail-yh0-f46.google.com with SMTP id i21so1469212yha.33 for ; Mon, 07 Jan 2013 17:19:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=BDstCeFIE34EcmmyGnF2+iTlDC8uONVqHUdWUSus4H4=; b=0xfC1QAsMNwDms+2mVNazoZghFEDFBTPBxqd9WX4NE9rb8KeD+ivf14vo5g08nEzCr +DZiV0fVo4u4dU9lzB73FXofMpaik28ZY0i7zPkfmrdMe9OSIqck4NitEzwchQZJYxkM YswRhS40lYmiVTq9GxRvbmqJ+Yn9sO18HMmCUUt2Paac9nSBP3GzIjXG/JW1rg1QVjFx msAKAoRQMvE/z8kARkqHTsiX5caA9MknT9ko8OCP0Qi+IOaDXorTotHglb8JfzdjVNvw SmXoAEADHZu6/XC7BpnwnkVgxSXnSPoGJT3aVnytiDdKk/PGgMVkFhLuSPcj84+g+Un0 Tvlw== X-Received: by 10.236.54.195 with SMTP id i43mr16879988yhc.73.1357607981643; Mon, 07 Jan 2013 17:19:41 -0800 (PST) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([189.61.223.46]) by mx.google.com with ESMTPS id l51sm69282425yhh.16.2013.01.07.17.19.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Jan 2013 17:19:41 -0800 (PST) From: Fabio Estevam To: FlorianSchandinat@gmx.de Cc: shawn.guo@linaro.org, linux-fbdev@vger.kernel.org, Fabio Estevam Subject: [PATCH] video: mxsfb: Fix build warnings with W=1 Date: Mon, 7 Jan 2013 23:19:31 -0200 Message-Id: <1357607971-16988-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Fabio Estevam Fix the following warnings when building with W=1 option: drivers/video/mxsfb.c: In function 'mxsfb_set_par': drivers/video/mxsfb.c:389:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/video/mxsfb.c: In function 'mxsfb_restore_mode': drivers/video/mxsfb.c:592:11: warning: variable 'line_count' set but not used [-Wunused-but-set-variable] drivers/video/mxsfb.c: In function 'mxsfb_probe': drivers/video/mxsfb.c:867:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Fabio Estevam --- drivers/video/mxsfb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index a45b37c..47c92a2 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -380,7 +380,7 @@ static int mxsfb_set_par(struct fb_info *fb_info) { struct mxsfb_info *host = to_imxfb_host(fb_info); u32 ctrl, vdctrl0, vdctrl4; - int line_size, fb_size; + u32 line_size, fb_size; int reenable = 0; line_size = fb_info->var.xres * (fb_info->var.bits_per_pixel >> 3); @@ -589,7 +589,6 @@ static struct fb_ops mxsfb_ops = { static int mxsfb_restore_mode(struct mxsfb_info *host) { struct fb_info *fb_info = &host->fb_info; - unsigned line_count; unsigned period; unsigned long pa, fbsize; int bits_per_pixel, ofs; @@ -668,7 +667,6 @@ static int mxsfb_restore_mode(struct mxsfb_info *host) writel(fb_info->fix.smem_start, host->base + host->devdata->next_buf); } - line_count = fb_info->fix.smem_len / fb_info->fix.line_length; fb_info->fix.ypanstep = 1; clk_prepare_enable(host->clk); @@ -784,7 +782,8 @@ static int mxsfb_probe(struct platform_device *pdev) struct pinctrl *pinctrl; int panel_enable; enum of_gpio_flags flags; - int i, ret; + int ret; + u32 i; if (of_id) pdev->id_entry = of_id->data;