diff vidix/kernelhelper/dhahelper.c @ 26753:502f04b67653

cosmetics: Remove useless parentheses from return statements.
author diego
date Fri, 16 May 2008 00:13:03 +0000
parents a9e111b88c4a
children
line wrap: on
line diff
--- 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)