linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: syrjala@sci.fi
To: linux-fbdev-devel@lists.sourceforge.net
Cc: alex.kern@gmx.de, Ville Syrjala <syrjala@sci.fi>
Subject: [patch 2/9] atyfb: Fix compiler warnings
Date: Mon, 04 Sep 2006 01:06:49 +0300	[thread overview]
Message-ID: <20060903220659.843881353@proteus.korsu.shacknet.nu> (raw)
In-Reply-To: 20060903220646.894202994@proteus.korsu.shacknet.nu

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: atyfb_fix_compiler_warnings.patch --]
[-- Type: text/plain, Size: 2540 bytes --]

Fix some compiler warnings and remove an #ifdef.

Signed-off-by: Ville Syrjala <syrjala@sci.fi>
---

 drivers/video/aty/atyfb_base.c |   35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

Index: linux-2.6.18-rc4/drivers/video/aty/atyfb_base.c
===================================================================
--- linux-2.6.18-rc4.orig/drivers/video/aty/atyfb_base.c
+++ linux-2.6.18-rc4/drivers/video/aty/atyfb_base.c
@@ -2349,11 +2349,7 @@ static int __devinit aty_init(struct fb_
 	const char *ramname = NULL, *xtal;
 	int gtb_memsize, has_var = 0;
 	struct fb_var_screeninfo var;
-	u8 pll_ref_div;
 	u32 i;
-#if defined(CONFIG_PPC)
-	int sense;
-#endif
 
 	init_waitqueue_head(&par->vblank.wait);
 	spin_lock_init(&par->int_lock);
@@ -2463,18 +2459,21 @@ static int __devinit aty_init(struct fb_
 			par->pll_limits.mclk = 63;
 	}
 
-	if (M64_HAS(GTB_DSP)
-	    && (pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par))) {
-		int diff1, diff2;
-		diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max;
-		diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max;
-		if (diff1 < 0)
-			diff1 = -diff1;
-		if (diff2 < 0)
-			diff2 = -diff2;
-		if (diff2 < diff1) {
-			par->ref_clk_per = 1000000000000ULL / 29498928;
-			xtal = "29.498928";
+	if (M64_HAS(GTB_DSP)) {
+		u8 pll_ref_div = aty_ld_pll_ct(PLL_REF_DIV, par);
+
+		if (pll_ref_div) {
+			int diff1, diff2;
+			diff1 = 510 * 14 / pll_ref_div - par->pll_limits.pll_max;
+			diff2 = 510 * 29 / pll_ref_div - par->pll_limits.pll_max;
+			if (diff1 < 0)
+				diff1 = -diff1;
+			if (diff2 < 0)
+				diff2 = -diff2;
+			if (diff2 < diff1) {
+				par->ref_clk_per = 1000000000000ULL / 29498928;
+				xtal = "29.498928";
+			}
 		}
 	}
 #endif /* CONFIG_FB_ATY_CT */
@@ -2667,6 +2666,7 @@ static int __devinit aty_init(struct fb_
 				has_var = 1;
 		} else {
 			if (default_vmode == VMODE_CHOOSE) {
+				int sense;
 				if (M64_HAS(G3_PB_1024x768))
 					/* G3 PowerBook with 1024x768 LCD */
 					default_vmode = VMODE_1024_768_60;
@@ -3702,6 +3702,8 @@ static int __devinit atyfb_atari_probe(v
 
 #endif /* CONFIG_ATARI */
 
+#ifdef CONFIG_PCI
+
 static void __devexit atyfb_remove(struct fb_info *info)
 {
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
@@ -3749,7 +3751,6 @@ static void __devexit atyfb_remove(struc
 	framebuffer_release(info);
 }
 
-#ifdef CONFIG_PCI
 
 static void __devexit atyfb_pci_remove(struct pci_dev *pdev)
 {

-- 
Ville Syrj������l������
syrjala@sci.fi
http://www.sci.fi/~syrjala/


[-- Attachment #2: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

  reply	other threads:[~2006-09-03 22:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-03 22:06 [patch 1/9] atyfb: Remove FIXME syrjala
2006-09-03 22:06 ` syrjala [this message]
2006-09-03 22:06 ` [patch 3/9] atyfb: Fix sparse warnings syrjala
2006-09-03 22:06 ` [patch 4/9] atyfb: Fix blanking level transitions syrjala
2006-09-03 22:06 ` [patch 5/9] atyfb: Remove pointless aty_init() argument syrjala
2006-09-03 22:06 ` [patch 6/9] atyfb: Fix __init and __devinit annotations syrjala
2006-09-03 22:06 ` [patch 7/9] atyfb: Remove aty_cmap_regs syrjala
2006-09-03 22:06 ` [patch 8/9] atyfb: Improve atyfb_atari_probe() syrjala
2006-09-04  9:20   ` Geert Uytterhoeven
2006-09-03 22:06 ` [patch 9/9] atyfb: Improve power management syrjala
2006-09-08 22:02 ` [patch 1/9] atyfb: Remove FIXME Alexander Kern
2006-09-09  7:46   ` Ville Syrjälä
2006-09-09  8:20     ` Geert Uytterhoeven
2006-09-09 12:39       ` Ville Syrjälä
2006-09-10  7:48         ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060903220659.843881353@proteus.korsu.shacknet.nu \
    --to=syrjala@sci.fi \
    --cc=alex.kern@gmx.de \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).