[svn-commits] sruffell: branch linux/sruffell/chan_list_refactoring r9285 - /linux/team/sru...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 2 12:41:31 CDT 2010


Author: sruffell
Date: Thu Sep  2 12:41:20 2010
New Revision: 9285

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9285
Log:
dahdi: 'user_data' is extraneous in dahdi_ctl_ioctl.

Modified:
    linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c

Modified: linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c?view=diff&rev=9285&r1=9284&r2=9285
==============================================================================
--- linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c Thu Sep  2 12:41:20 2010
@@ -4492,7 +4492,6 @@
 	int res = 0;
 	int x,y;
 	unsigned long flags;
-	void __user * const user_data = (void __user *)data;
 	int rv;
 	struct dahdi_span *s;
 	switch(cmd) {
@@ -4501,7 +4500,7 @@
 		struct dahdi_lineconfig lc;
 		struct dahdi_span *s;
 
-		if (copy_from_user(&lc, user_data, sizeof(lc)))
+		if (copy_from_user(&lc, (void __user *)data, sizeof(lc)))
 			return -EFAULT;
 		s = find_span(lc.span);
 		if (!s)
@@ -4569,7 +4568,7 @@
 		struct dahdi_attach_echocan ae;
 		const struct dahdi_echocan_factory *new = NULL, *old;
 
-		if (copy_from_user(&ae, user_data, sizeof(ae)))
+		if (copy_from_user(&ae, (void __user *)data, sizeof(ae)))
 			return -EFAULT;
 
 		VALID_CHANNEL(ae.chan);
@@ -4599,7 +4598,7 @@
 	{
 		struct dahdi_sfconfig sf;
 
-		if (copy_from_user(&sf, user_data, sizeof(sf)))
+		if (copy_from_user(&sf, (void __user *)data, sizeof(sf)))
 			return -EFAULT;
 		VALID_CHANNEL(sf.chan);
 		if (chans[sf.chan]->sig != DAHDI_SIG_SF) return -EINVAL;
@@ -4639,7 +4638,7 @@
 	{
 		struct dahdi_dialparams tdp;
 
-		if (copy_from_user(&tdp, user_data, sizeof(tdp)))
+		if (copy_from_user(&tdp, (void __user *)data, sizeof(tdp)))
 			return -EFAULT;
 
 		if ((tdp.dtmf_tonelen >= 10) && (tdp.dtmf_tonelen <= 4000)) {
@@ -4690,7 +4689,7 @@
 		struct dahdi_dialparams tdp;
 
 		tdp = global_dialparams;
-		if (copy_to_user(user_data, &tdp, sizeof(tdp)))
+		if (copy_to_user((void __user *)data, &tdp, sizeof(tdp)))
 			return -EFAULT;
 		break;
 	}
@@ -4718,7 +4717,7 @@
 			}
 		}
 		read_unlock(&ecfactory_list_lock);
-		if (copy_to_user(user_data, &vi, sizeof(vi)))
+		if (copy_to_user((void __user *)data, &vi, sizeof(vi)))
 			return -EFAULT;
 		break;
 	}
@@ -4726,7 +4725,7 @@
 	{
 		struct dahdi_maintinfo maint;
 		  /* get struct from user */
-		if (copy_from_user(&maint, user_data, sizeof(maint)))
+		if (copy_from_user(&maint, (void __user *)data, sizeof(maint)))
 			return -EFAULT;
 		s = find_span(maint.spanno);
 		if (!s)




More information about the svn-commits mailing list