changeset 26753:502f04b67653

cosmetics: Remove useless parentheses from return statements.
author diego
date Fri, 16 May 2008 00:13:03 +0000
parents 65f61607e32f
children 63630c09e237
files vidix/cyberblade_vid.c vidix/ivtv_vid.c vidix/kernelhelper/dhahelper.c vidix/kernelhelper/test.c vidix/mach64_vid.c vidix/mga_vid.c vidix/nvidia_vid.c vidix/pci.c vidix/radeon_vid.c vidix/sis_bridge.c vidix/sis_vid.c vidix/sysdep/AsmMacros_arm32.h vidix/sysdep/AsmMacros_powerpc.h vidix/sysdep/pci_386bsd.c vidix/sysdep/pci_bsdi.c vidix/sysdep/pci_freebsd.c vidix/sysdep/pci_isc.c vidix/sysdep/pci_linux.c vidix/sysdep/pci_lynx.c vidix/sysdep/pci_mach386.c vidix/sysdep/pci_netbsd.c vidix/sysdep/pci_openbsd.c vidix/sysdep/pci_os2.c vidix/sysdep/pci_sco.c vidix/sysdep/pci_svr4.c vidix/sysdep/pci_win32.c vidix/unichrome_vid.c
diffstat 27 files changed, 138 insertions(+), 138 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/cyberblade_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/cyberblade_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -238,7 +238,7 @@
 static int cyberblade_get_gkeys(vidix_grkey_t *grkey)
 {
 	memcpy(grkey, &cyberblade_grkey, sizeof(vidix_grkey_t));
-	return(0);
+	return 0;
 }
 
 static int cyberblade_set_gkeys(const vidix_grkey_t *grkey)
@@ -272,7 +272,7 @@
 		SROUTB(0x56, 0x00); /* Colour Key Mask */
 	}
 	SROUTB(0x11,protect);
-	return(0);
+	return 0;
 }
 
 
--- a/vidix/ivtv_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/ivtv_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -267,7 +267,7 @@
 	
 	if(ivtv_verbose)
 		printf(IVTV_MSG"Can't find chip\n");
-	return(ENXIO);
+	return ENXIO;
 
 card_found:
 
@@ -283,7 +283,7 @@
 		if(ioctl(fbdev, FBIOGET_VSCREENINFO, &vinfo) < 0) {
 			printf(IVTV_MSG"Unable to read screen info\n");
 			close(fbdev);
-			return(ENXIO);
+			return ENXIO;
 		} else {
 			fb_width = vinfo.xres;
 			fb_height = vinfo.yres;
@@ -299,7 +299,7 @@
 		}
 	} else {
 		printf(IVTV_MSG"Failed to open /dev/fb%u\n", fb_number);
-		return(ENXIO);
+		return ENXIO;
 	}
 
 	/* Try to find YUV device */
@@ -318,7 +318,7 @@
 				printf(IVTV_MSG"YUV device not found: /dev/video%u\n", yuv_device);
 		}
 	} while(yuv_device-- > yuv_device_number);
-	return(ENXIO);
+	return ENXIO;
 
 yuv_found:
 	if(0 == alpha_disable) {
@@ -327,7 +327,7 @@
 			printf(IVTV_MSG"Unable to read fb state\n");
 			close(yuvdev);
 			close(fbdev);
-			return(ENXIO);
+			return ENXIO;
 		} else {
 			if(ivtv_verbose) {
 				printf(IVTV_MSG"old alpha : %ld\n",fb_state_old.alpha);
@@ -343,7 +343,7 @@
 			printf(IVTV_MSG"Unable to read fb state\n");
 			close(yuvdev);
 			close(fbdev);
-			return(ENXIO);
+			return ENXIO;
 		} else {
 			if(ivtv_verbose) {
 				printf(IVTV_MSG"old alpha : %d\n",format_old.fmt.win.global_alpha);
@@ -354,7 +354,7 @@
 #endif
 	}
 	probed = 1;
-	return(0);
+	return 0;
 }
 
 int ivtv_init(const char *args __attribute__ ((unused)))
@@ -365,15 +365,15 @@
 	if (!probed) {
 		if(ivtv_verbose)
 			printf(IVTV_MSG"Driver was not probed but is being initialized\n");
-		return(EINTR);
+		return EINTR;
 	}
 	outbuf = malloc((IVTVMAXHEIGHT * IVTVMAXWIDTH) + (IVTVMAXHEIGHT * IVTVMAXWIDTH / 2));
 	if(NULL == outbuf) {
 		if(ivtv_verbose)
 			printf(IVTV_MSG"Not enough memory availabe!\n");
-		return(EINTR);
+		return EINTR;
 	}
-	return(0);
+	return 0;
 }
 
 void ivtv_destroy(void)
@@ -395,7 +395,7 @@
 	if(ivtv_verbose)
 		printf(IVTV_MSG"GetCap\n");
 	memcpy(to, &ivtv_cap, sizeof(vidix_capability_t));
-	return(0);
+	return 0;
 }
 
 int ivtv_query_fourcc(vidix_fourcc_t *to)
@@ -415,13 +415,13 @@
 	
 	if(!supports) {
 		to->depth = to->flags = 0;
-		return(ENOTSUP);
+		return ENOTSUP;
 	}
 	to->depth = VID_DEPTH_12BPP |
 		VID_DEPTH_15BPP | VID_DEPTH_16BPP |
 		VID_DEPTH_24BPP | VID_DEPTH_32BPP;
 	to->flags = 0;
-	return(0);
+	return 0;
 }
 
 int ivtv_config_playback(vidix_playback_t *info)
@@ -452,7 +452,7 @@
 	if(ivtv_verbose)
 		printf(IVTV_MSG"frame_size: %d, dga_addr: %p\n",
 	info->frame_size, info->dga_addr);
-	return(0);
+	return 0;
 }
 
 int ivtv_playback_on(void)
@@ -473,7 +473,7 @@
 		}
 #endif
 	}
-	return(0);
+	return 0;
 }
 
 int ivtv_playback_off(void)
@@ -494,7 +494,7 @@
 		}
 #endif
 	}
-	return(0);
+	return 0;
 }
 
 int ivtv_frame_sel(unsigned int frame)
@@ -548,7 +548,7 @@
 #endif
 		printf("Ioctl IVTV_IOC_DMA_FRAME returned failed Error\n");
 	}
-	return(0);
+	return 0;
 }
 
 VDXDriver ivtv_drv = {
--- a/vidix/kernelhelper/dhahelper.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/kernelhelper/dhahelper.c	Fri May 16 00:13:03 2008 +0000
@@ -106,11 +106,11 @@
 	printk(KERN_DEBUG "dhahelper: device opened\n");
 
     if (MINOR(inode->i_rdev) != 0)
-	return(-ENXIO);
+	return -ENXIO;
 
     MOD_INC_USE_COUNT;
 
-    return(0);
+    return 0;
 }
 
 static int dhahelper_release(struct inode *inode, struct file *file)
@@ -119,11 +119,11 @@
 	printk(KERN_DEBUG "dhahelper: device released\n");
 
     if (MINOR(inode->i_rdev) != 0)
-	return(-ENXIO);
+	return -ENXIO;
 
     MOD_DEC_USE_COUNT;
 
-    return(0);
+    return 0;
 }
 
 static int dhahelper_ioctl(struct inode *inode, struct file *file,
@@ -134,7 +134,7 @@
 	    cmd, arg);
 
     if (MINOR(inode->i_rdev) != 0)
-	return(-ENXIO);
+	return -ENXIO;
 
     switch(cmd)
     {
@@ -146,7 +146,7 @@
 	    {
 		if (dhahelper_verbosity > 0)
 		    printk(KERN_ERR "dhahelper: failed copy to userspace\n");
-		return(-EFAULT);
+		return -EFAULT;
 	    }
 
 	    break;
@@ -159,7 +159,7 @@
 	    {
 		if (dhahelper_verbosity > 0)
 		    printk(KERN_ERR "dhahelper: failed copy from userspace\n");
-		return(-EFAULT);
+		return -EFAULT;
 	    }
 
 	    switch(port.operation)
@@ -181,7 +181,7 @@
 			    if (dhahelper_verbosity > 0)
 				printk(KERN_ERR "dhahelper: invalid port read size (%d)\n",
 				    port.size);
-			    return(-EINVAL);
+			    return -EINVAL;
 		    }
 		    break;
 		}
@@ -202,7 +202,7 @@
 			    if (dhahelper_verbosity > 0)
 				printk(KERN_ERR "dhahelper: invalid port write size (%d)\n",
 				    port.size);
-			    return(-EINVAL);
+			    return -EINVAL;
 		    }
 		    break;
 		}
@@ -210,7 +210,7 @@
 		    if (dhahelper_verbosity > 0)
 		        printk(KERN_ERR "dhahelper: invalid port operation (%d)\n",
 		    	    port.operation);
-		    return(-EINVAL);
+		    return -EINVAL;
 	    }
 
 	    /* copy back only if read was performed */
@@ -219,7 +219,7 @@
 	    {
 		if (dhahelper_verbosity > 0)
 		    printk(KERN_ERR "dhahelper: failed copy to userspace\n");
-		return(-EFAULT);
+		return -EFAULT;
 	    }
 	    
 	    break;
@@ -232,7 +232,7 @@
 	    {
 		if (dhahelper_verbosity > 0)
 		    printk(KERN_ERR "dhahelper: failed copy from userspace\n");
-		return(-EFAULT);
+		return -EFAULT;
 	    }
 	    
 	    switch(mem.operation)
@@ -254,14 +254,14 @@
 		    if (dhahelper_verbosity > 0)
 			printk(KERN_ERR "dhahelper: invalid memory operation (%d)\n",
 			    mem.operation);
-		    return(-EINVAL);
+		    return -EINVAL;
 	    }
 	    
 	    if (copy_to_user((dhahelper_memory_t *)arg, &mem, sizeof(dhahelper_memory_t)))
 	    {
 		if (dhahelper_verbosity > 0)
 		    printk(KERN_ERR "dhahelper: failed copy to userspace\n");
-		return(-EFAULT);
+		return -EFAULT;
 	    }
 	    
 	    break;
@@ -269,10 +269,10 @@
 	default:
     	    if (dhahelper_verbosity > 0)
 		printk(KERN_ERR "dhahelper: invalid ioctl (%x)\n", cmd);
-	    return(-EINVAL);
+	    return -EINVAL;
     }
 
-    return(0);
+    return 0;
 }
 
 static int dhahelper_mmap(struct file *file, struct vm_area_struct *vma)
@@ -281,7 +281,7 @@
     {
 	if (dhahelper_verbosity > 0)
 	    printk(KERN_ERR "dhahelper: mapping not requested before mmap\n");
-	return(-EFAULT);
+	return -EFAULT;
     }
     
     if (dhahelper_verbosity > 1)
@@ -293,10 +293,10 @@
     {
 	if (dhahelper_verbosity > 0)
 	    printk(KERN_ERR "dhahelper: error mapping memory\n");
-	return(-EFAULT);
+	return -EFAULT;
     }
 
-    return(0);
+    return 0;
 }
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
@@ -338,10 +338,10 @@
     	if (dhahelper_verbosity > 0)
 	    printk(KERN_ERR "dhahelper: unable to register character device (major: %d)\n",
 		dhahelper_major);
-	return(-EIO);
+	return -EIO;
     }
     
-    return(0);
+    return 0;
 }
 
 #if KERNEL_VERSION < KERNEL_VERSION(2,4,0)
--- a/vidix/kernelhelper/test.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/kernelhelper/test.c	Fri May 16 00:13:03 2008 +0000
@@ -56,5 +56,5 @@
 	ioctl(fd, DHAHELPER_MEMORY, &mem);
     }
 
-    return(0);
+    return 0;
 }
--- a/vidix/mach64_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/mach64_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -991,7 +991,7 @@
 static int mach64_get_gkeys(vidix_grkey_t *grkey)
 {
     memcpy(grkey, &mach64_grkey, sizeof(vidix_grkey_t));
-    return(0);
+    return 0;
 }
 
 static int mach64_set_gkeys(const vidix_grkey_t *grkey)
@@ -1056,7 +1056,7 @@
     else
     	OUTREG(OVERLAY_KEY_CNTL,VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND);
 
-    return(0);
+    return 0;
 }
 
 VDXDriver mach64_drv = {
--- a/vidix/mga_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/mga_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -364,7 +364,7 @@
 #endif
     }
 
-    return(0);
+    return 0;
 }
 
 
@@ -665,7 +665,7 @@
     if ((sw < 4) || (sh < 4) || (dw < 4) || (dh < 4))
     {
         printf("[mga] Invalid src/dest dimensions\n");
-        return(EINVAL);
+        return EINVAL;
     }
 
     //FIXME check that window is valid and inside desktop
@@ -685,7 +685,7 @@
 	    break;
 	default:
 	    printf("[mga] Unsupported pixel format: %x\n", config->fourcc);
-	    return(ENOTSUP);
+	    return ENOTSUP;
     }
 
     config->offsets[0] = 0;
@@ -707,7 +707,7 @@
     if (mga_src_base < 0)
     {
     	printf("[mga] not enough memory for frames!\n");
-    	return(EFAULT);
+    	return EFAULT;
     }
     mga_src_base &= (~0xFFFF); /* 64k boundary */
     if (mga_verbose > 1) printf("[mga] YUV buffer base: %#x\n", mga_src_base);
@@ -1043,7 +1043,7 @@
 #endif /* CRTC2 */
 
     mga_vid_write_regs(0);
-    return(0);
+    return 0;
 }
 
 static int mga_playback_on(void)
@@ -1062,7 +1062,7 @@
 #endif
     mga_next_frame=0;
 
-    return(0);
+    return 0;
 }
 
 static int mga_playback_off(void)
@@ -1078,7 +1078,7 @@
     regs.besglobctl &= ~(1<<6); /* UYVY format selected */
     mga_vid_write_regs(0);
 
-    return(0);
+    return 0;
 }
 
 static int mga_probe(int verbose,int force)
@@ -1097,7 +1097,7 @@
 	if (err)
 	{
 	    printf("[mga] Error occurred during pci scan: %s\n", strerror(err));
-	    return(err);
+	    return err;
 	}
 
 	if (mga_verbose)
@@ -1142,7 +1142,7 @@
 	if (is_g400 == -1)
 	{
 		if (verbose) printf("[mga] Can't find chip\n");
-		return(ENXIO);
+		return ENXIO;
 	}
 
 card_found:
@@ -1151,7 +1151,7 @@
 
 	mga_cap.device_id = pci_info.device; /* set device id in capabilites */
 
-	return(0);
+	return 0;
 }
 
 static int mga_init(void)
@@ -1171,7 +1171,7 @@
     if (!probed)
     {
 	printf("[mga] driver was not probed but is being initializing\n");
-	return(EINTR);
+	return EINTR;
     }
 
 #ifdef MGA_PCICONFIG_MEMDETECT
@@ -1226,7 +1226,7 @@
 	if ((mga_ram_size < 4) || (mga_ram_size > 64))
 	{
 	    printf("[mga] invalid RAMSIZE: %d MB\n", mga_ram_size);
-	    return(EINVAL);
+	    return EINVAL;
 	}
     }
 
@@ -1264,7 +1264,7 @@
 	mga_irq=-1;
 #endif
 
-    return(0);
+    return 0;
 }
 
 static void mga_destroy(void)
@@ -1304,33 +1304,33 @@
 	    break;
 	default:
 	    to->depth = to->flags = 0;
-	    return(ENOTSUP);
+	    return ENOTSUP;
     }
     
     to->depth = VID_DEPTH_12BPP |
 		VID_DEPTH_15BPP | VID_DEPTH_16BPP |
 		VID_DEPTH_24BPP | VID_DEPTH_32BPP;
     to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY;
-    return(0);
+    return 0;
 }
 
 static int mga_get_caps(vidix_capability_t *to)
 {
     memcpy(to, &mga_cap, sizeof(vidix_capability_t));
-    return(0);
+    return 0;
 }
 
 static int mga_get_gkeys(vidix_grkey_t *grkey)
 {
     memcpy(grkey, &mga_grkey, sizeof(vidix_grkey_t));
-    return(0);
+    return 0;
 }
 
 static int mga_set_gkeys(const vidix_grkey_t *grkey)
 {
     memcpy(&mga_grkey, grkey, sizeof(vidix_grkey_t));
     mga_vid_write_regs(0);
-    return(0);
+    return 0;
 }
 
 static int mga_set_eq( const vidix_video_eq_t * eq)
@@ -1339,12 +1339,12 @@
     if (!is_g400)
     {
 	if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
-	return(ENOTSUP);
+	return ENOTSUP;
     }
 
     // only brightness&contrast are supported:
     if(!(eq->cap & (VEQ_CAP_BRIGHTNESS|VEQ_CAP_CONTRAST)))
-	return(ENOTSUP);
+	return ENOTSUP;
     
     //regs.beslumactl = readl(mga_mmio_base + BESLUMACTL);
     if (eq->cap & VEQ_CAP_BRIGHTNESS) { 
@@ -1357,7 +1357,7 @@
     }
     writel(regs.beslumactl,mga_mmio_base + BESLUMACTL);
 
-    return(0);
+    return 0;
 }
 
 static int mga_get_eq( vidix_video_eq_t * eq)
@@ -1366,7 +1366,7 @@
     if (!is_g400)
     {
 	if (mga_verbose) printf("[mga] equalizer isn't supported with G200\n");
-	return(ENOTSUP);
+	return ENOTSUP;
     }
 
     eq->brightness = (signed short int)(regs.beslumactl >> 16) * 1000 / 128;
@@ -1375,7 +1375,7 @@
     
     printf("MGA GET_EQ: br=%d c=%d  \n",eq->brightness,eq->contrast);
 
-    return(0);
+    return 0;
 }
 
 #ifndef CRTC2
--- a/vidix/nvidia_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/nvidia_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -458,7 +458,7 @@
 		if (((VID_RD32 (chip->PMC, 0) & 0xF0) == 0x20)
 		    && ((VID_RD32 (chip->PMC, 0) & 0x0F) >= 0x02)) {
 			/* SDRAM 128 ZX. */
-			return ((1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024);
+			return (1 << (VID_RD32 (chip->PFB, 0) & 0x03)) * 1024 * 1024;
 		}
 		else {
 			return 1024 * 1024 * 8;
--- a/vidix/pci.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/pci.c	Fri May 16 00:13:03 2008 +0000
@@ -107,7 +107,7 @@
 static swapl(unsigned long val)
 {
 	unsigned char *p = (unsigned char *)&val;
-	return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0));
+	return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0);
 }
  
  
@@ -534,7 +534,7 @@
  
     ret = enable_os_io();
     if (ret != 0)
-	return(ret);
+	return ret;
 
     if((pcr._configtype = pci_config_type()) == 0xFFFF) return ENODEV;
  
@@ -713,17 +713,17 @@
     if (len != 4)
     {
 	fprintf(stderr,"pci_config_read: Reading non-dword not supported!\n");
-	return(ENOTSUP);
+	return ENOTSUP;
     }
     
     ret = enable_os_io();
     if (ret != 0)
-	return(ret);
+	return ret;
     ret = pci_config_read_long(bus, dev, func, cmd);
     disable_os_io();
 
     *val = ret;
-    return(0);
+    return 0;
 }
 
 int enable_app_io( void )
--- a/vidix/radeon_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/radeon_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -548,7 +548,7 @@
 static __inline__ uint32_t INPLL(uint32_t addr)
 {
 	OUTREG8(CLOCK_CNTL_INDEX, addr & 0x0000001f);
-	return (INREG(CLOCK_CNTL_DATA));
+	return INREG(CLOCK_CNTL_DATA);
 }
 
 #define OUTPLL(addr,val)	OUTREG8(CLOCK_CNTL_INDEX, (addr & 0x0000001f) | 0x00000080); \
@@ -3407,13 +3407,13 @@
 static int radeon_get_gkey(vidix_grkey_t *grkey)
 {
     memcpy(grkey, &radeon_grkey, sizeof(vidix_grkey_t));
-    return(0);
+    return 0;
 }
 
 static int radeon_set_gkey(const vidix_grkey_t *grkey)
 {
     memcpy(&radeon_grkey, grkey, sizeof(vidix_grkey_t));
-    return (set_gr_key());
+    return set_gr_key();
 }
 
 #ifdef RAGE128
--- a/vidix/sis_bridge.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sis_bridge.c	Fri May 16 00:13:03 2008 +0000
@@ -56,7 +56,7 @@
     inSISIDXREG(SISPART4, 0x03, temp);
     temp ^= 0x0e;
     temp &= tempch;
-    return (temp == tempch);
+    return temp == tempch;
 }
 
 
--- a/vidix/sis_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sis_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -190,7 +190,7 @@
 {
     uint8_t ret;
     inSISIDXREG(SISVID, reg, ret);
-    return (ret);
+    return ret;
 }
 
 static void setvideoreg(uint8_t reg, uint8_t data)
@@ -220,7 +220,7 @@
 static uint8_t vblank_active_CRT1(void)
 {
     /* this may be too simplistic? */
-    return (inSISREG(SISINPSTAT) & 0x08);
+    return inSISREG(SISINPSTAT) & 0x08;
 }
 
 static uint8_t vblank_active_CRT2(void)
@@ -231,7 +231,7 @@
     } else {
 	inSISIDXREG(SISPART1, Index_CRT2_FC_VR, ret);
     }
-    return ((ret & 0x02) ^ 0x02);
+    return (ret & 0x02) ^ 0x02;
 }
 
 static int find_chip(unsigned chip_id)
@@ -344,13 +344,13 @@
 
     if (!sis_probed) {
 	printf("[SiS] driver was not probed but is being initialized\n");
-	return (EINTR);
+	return EINTR;
     }
 
     if (enable_app_io() != 0)
     {
       printf("[SiS] can't enable register I/O\n");
-      return(EINTR);
+      return EINTR;
     }
 
     /* JCP: this is WRONG.  Need to coordinate w/ sisfb to use correct mem */
--- a/vidix/sysdep/AsmMacros_arm32.h	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/AsmMacros_arm32.h	Fri May 16 00:13:03 2008 +0000
@@ -84,20 +84,20 @@
 
 static __inline__ unsigned int inb(short port)
 {
-	 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
-	return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase));
+	if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+	return *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase);
 }
 
 static __inline__ unsigned int inw(short port)
 {
-	 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
-	return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase));
+	if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+	return *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase);
 }
 
 static __inline__ unsigned int inl(short port)
 {
-	 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
-	return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
+	if ((unsigned short)port >= 0x400) return (unsigned int)-1;
+	return *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase);
 }
 
 #define intr_disable()
--- a/vidix/sysdep/AsmMacros_powerpc.h	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/AsmMacros_powerpc.h	Fri May 16 00:13:03 2008 +0000
@@ -90,21 +90,21 @@
 {
 	unsigned char val;
 	val = *((unsigned char *)(ioBase + port)); eieio();
-	return(val);
+	return val;
 }
 
 static __inline__ unsigned short inw(short port)
 {
 	unsigned short val;
 	val = *((unsigned short *)(ioBase + port)); eieio();
-	return(val);
+	return val;
 }
 
 static __inline__ unsigned long inl(short port)
 {
 	unsigned long val;
 	val = *((unsigned long *)(ioBase + port)); eieio();
-	return(val);
+	return val;
 }
 
 #define intr_disable()
--- a/vidix/sysdep/pci_386bsd.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_386bsd.c	Fri May 16 00:13:03 2008 +0000
@@ -40,13 +40,13 @@
     io_fd = -1 ;
     if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
         perror("/dev/console");
-	return(errno);
+	return errno;
     }
     if (ioctl(io_fd, KDENABIO, 0) < 0) {
         perror("ioctl(KDENABIO)");
-	return(errno);
+	return errno;
     }
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -54,8 +54,8 @@
     if (ioctl(io_fd, KDDISABIO, 0) < 0) {
         perror("ioctl(KDDISABIO)");
 	close(io_fd);
-	return(errno);
+	return errno;
     }
     close(io_fd);
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_bsdi.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_bsdi.c	Fri May 16 00:13:03 2008 +0000
@@ -18,13 +18,13 @@
     io_fd = -1 ;
     if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
         perror("/dev/console");
-	return(errno);
+	return errno;
     }
     if (ioctl(io_fd, PCCONENABIOPL, 0) < 0) {
         perror("ioctl(PCCONENABIOPL)");
-        return(errno);
+        return errno;
     }
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -32,8 +32,8 @@
     if (ioctl(io_fd, PCCONDISABIOPL, 0) < 0) {
         perror("ioctl(PCCONDISABIOPL)");
 	close(io_fd);
-        return(errno);
+        return errno;
     }
     close(io_fd);
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_freebsd.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_freebsd.c	Fri May 16 00:13:03 2008 +0000
@@ -40,13 +40,13 @@
     io_fd = -1 ;
     if ((io_fd = open("/dev/console", O_RDWR, 0)) < 0) {
         perror("/dev/console");
-	return(errno);
+	return errno;
     }
     if (ioctl(io_fd, KDENABIO, 0) < 0) {
         perror("ioctl(KDENABIO)");
-        return(errno);
+        return errno;
     }
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -54,8 +54,8 @@
     if (ioctl(io_fd, KDDISABIO, 0) < 0) {
         perror("ioctl(KDDISABIO)");
 	close(io_fd);
-        return(errno);
+        return errno;
     }
     close(io_fd);
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_isc.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_isc.c	Fri May 16 00:13:03 2008 +0000
@@ -41,7 +41,7 @@
 #else
     sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
 #endif
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -51,5 +51,5 @@
 #else
     sysi86(SI86V86, V86SC_IOPL, 0);
 #endif
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_linux.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_linux.c	Fri May 16 00:13:03 2008 +0000
@@ -96,7 +96,7 @@
     if (svgahelper_fd > 0)
     {
 	svgahelper_initialized = 1;
-	return(0);
+	return 0;
     }
     svgahelper_initialized = -1;
 #endif
@@ -106,7 +106,7 @@
     if (dhahelper_fd > 0)
     {
 	dhahelper_initialized = 1;
-	return(0);
+	return 0;
     }
     dhahelper_initialized = -1;
 #endif
@@ -115,9 +115,9 @@
 /* should be fixed? */
 #else    
     if (iopl(3) != 0)
-	return(errno);
+	return errno;
 #endif    
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -136,9 +136,9 @@
 /* should be fixed? */
 #else    
     if (iopl(0) != 0)
-	return(errno);
+	return errno;
 #endif    
-    return(0);
+    return 0;
 }
 
 #if (defined(__powerpc__) || defined(__sparc__) || defined(__sparc64__) \
--- a/vidix/sysdep/pci_lynx.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_lynx.c	Fri May 16 00:13:03 2008 +0000
@@ -61,7 +61,7 @@
 static swapl(unsigned long val)
 {
 	unsigned char *p = (unsigned char *)&val;
-	return ((p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0));
+	return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0);
 }
  
  
--- a/vidix/sysdep/pci_mach386.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_mach386.c	Fri May 16 00:13:03 2008 +0000
@@ -35,13 +35,13 @@
     io_fd = -1 ;
     if ((io_fd = open("/dev/iopl", O_RDWR, 0)) < 0) {
         perror("/dev/iopl");
-        return(errno);
+        return errno;
     }
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
 {
     close(io_fd);
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_netbsd.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_netbsd.c	Fri May 16 00:13:03 2008 +0000
@@ -42,15 +42,15 @@
 #if !defined(USE_I386_IOPL)
     if ((io_fd = open("/dev/io", O_RDWR, 0)) < 0) {
 	perror("/dev/io");
-	return(errno);
+	return errno;
     }
 #else
     if (i386_iopl(1) < 0) {
 	perror("i386_iopl");
-	return(errno);
+	return errno;
     }
 #endif /* USE_I386_IOPL */
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -60,8 +60,8 @@
 #else
     if (i386_iopl(0) < 0) {
 	perror("i386_iopl");
-	return(errno);
+	return errno;
     }
 #endif /* NetBSD1_1 */
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_openbsd.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_openbsd.c	Fri May 16 00:13:03 2008 +0000
@@ -36,14 +36,14 @@
 {
     if (i386_iopl(1) < 0) {
 	perror("i386_iopl");
-	return(errno);
+	return errno;
     }
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
 {
  /* Nothing to do */
-    return(0);
+    return 0;
 }
 #endif
--- a/vidix/sysdep/pci_os2.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_os2.c	Fri May 16 00:13:03 2008 +0000
@@ -44,7 +44,7 @@
 	   (ULONG)0) != 0) {
 		fprintf(stderr,"Error opening fastio$ driver...\n");
 		fprintf(stderr,"Please install xf86sup.sys in config.sys!\n");
-		return(42);
+		return 42;
 	}
 	callgate[0] = callgate[1] = 0;
  
@@ -57,7 +57,7 @@
 		fprintf(stderr,"xf86-OS/2: EnableIOPorts failed, rc=%d, dlen=%d; emergency exit\n",
 			rc,dlen);
 		DosClose(hfd);
-		return(42);
+		return 42;
 	}
  
 /* Calling callgate with function 13 sets IOPL for the program */
@@ -68,11 +68,11 @@
 			: "eax","ebx","ecx","edx","cc");
  
         DosClose(hfd);
-	return(0);
+	return 0;
 }
 
 static __inline__ int disable_os_io(void)
 {
 /* Nothing to do */
-        return(0);
+        return 0;
 }
--- a/vidix/sysdep/pci_sco.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_sco.c	Fri May 16 00:13:03 2008 +0000
@@ -42,7 +42,7 @@
 #else
     sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
 #endif
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -52,5 +52,5 @@
 #else
     sysi86(SI86V86, V86SC_IOPL, 0);
 #endif
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_svr4.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_svr4.c	Fri May 16 00:13:03 2008 +0000
@@ -51,7 +51,7 @@
 #else
     sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
 #endif
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -61,5 +61,5 @@
 #else
     sysi86(SI86V86, V86SC_IOPL, 0);
 #endif
-    return(0);
+    return 0;
 }
--- a/vidix/sysdep/pci_win32.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/sysdep/pci_win32.c	Fri May 16 00:13:03 2008 +0000
@@ -44,10 +44,10 @@
       hDriver = CreateFile("\\\\.\\DHAHELPER",GENERIC_READ | GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
       if(!DeviceIoControl(hDriver, IOCTL_DHAHELPER_ENABLEDIRECTIO, NULL,0, NULL, 0, &dwBytesReturned, NULL)){
         fprintf(stderr,"Unable to enable directio please install dhahelper.sys.\n");
-        return(1);       
+        return 1;
       }
     }
-    return(0);
+    return 0;
 }
 
 static __inline__ int disable_os_io(void)
@@ -57,5 +57,5 @@
       DeviceIoControl(hDriver, IOCTL_DHAHELPER_DISABLEDIRECTIO, NULL,0, NULL, 0, &dwBytesReturned, NULL);
       CloseHandle(hDriver);
     }
-    return(0);
+    return 0;
 }
--- a/vidix/unichrome_vid.c	Thu May 15 21:25:41 2008 +0000
+++ b/vidix/unichrome_vid.c	Fri May 16 00:13:03 2008 +0000
@@ -651,7 +651,7 @@
 unichrome_get_gkey (vidix_grkey_t * grkey)
 {
   memcpy (grkey, &uc_grkey, sizeof (vidix_grkey_t));
-  return (0);
+  return 0;
 }
 
 /**
@@ -687,7 +687,7 @@
 
   /* Execute the changes */
   VIDEO_OUT (vio, V_COMPOSE_MODE, dwCompose | V1_COMMAND_FIRE);
-  return (0);
+  return 0;
 }
 
 /**