From 002c6d57edd0b677a4d9269109323a05d8247b77 Mon Sep 17 00:00:00 2001 From: Katja Collier Date: Fri, 17 May 2013 15:38:35 +0200 Subject: [PATCH] staging: fixed spaces around parens in ft1000 Deleted extra spaces before and after parens, added a couple necessary spaces before parens in "/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c" and "/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h". Signed-off-by: Katja Collier Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 40 ++++++++++++------------ drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h | 14 ++++----- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 285ed211d535..1e01fcac8a35 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -40,11 +40,11 @@ static int ft1000_flarion_cnt = 0; -static int ft1000_open (struct inode *inode, struct file *file); +static int ft1000_open(struct inode *inode, struct file *file); static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait); static long ft1000_ioctl(struct file *file, unsigned int command, unsigned long argument); -static int ft1000_release (struct inode *inode, struct file *file); +static int ft1000_release(struct inode *inode, struct file *file); /* List to free receive command buffer pool */ struct list_head freercvpool; @@ -86,7 +86,7 @@ struct dpram_blk *ft1000_get_buffer(struct list_head *bufflist) spin_lock_irqsave(&free_buff_lock, flags); /* Check if buffer is available */ - if ( list_empty(bufflist) ) { + if (list_empty(bufflist)) { DEBUG("ft1000_get_buffer: No more buffer - %d\n", numofmsgbuf); ptr = NULL; } @@ -204,7 +204,7 @@ int ft1000_create_dev(struct ft1000_usb *dev) dev->app_info[i].DspBCMsgFlag = 0; dev->app_info[i].NumOfMsg = 0; init_waitqueue_head(&dev->app_info[i].wait_dpram_msg); - INIT_LIST_HEAD (&dev->app_info[i].app_sqlist); + INIT_LIST_HEAD(&dev->app_info[i].app_sqlist); } dev->DeviceCreated = TRUE; @@ -298,7 +298,7 @@ void ft1000_destroy_dev(struct net_device *netdev) * *--------------------------------------------------------------------------- */ -static int ft1000_open (struct inode *inode, struct file *file) +static int ft1000_open(struct inode *inode, struct file *file) { struct ft1000_info *info; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private; @@ -310,7 +310,7 @@ static int ft1000_open (struct inode *inode, struct file *file) info = file->private_data = netdev_priv(dev->net); - DEBUG("f_owner = %p number of application = %d\n", (&file->f_owner), dev->appcnt ); + DEBUG("f_owner = %p number of application = %d\n", (&file->f_owner), dev->appcnt); /* Check if maximum number of application exceeded */ if (dev->appcnt > MAX_NUM_APP) { @@ -320,7 +320,7 @@ static int ft1000_open (struct inode *inode, struct file *file) /* Search for available application info block */ for (i=0; iapp_info[i].fileobject == NULL) ) { + if ((dev->app_info[i].fileobject == NULL)) { break; } } @@ -371,7 +371,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) /* Search for matching file object */ for (i=0; iapp_info[i].fileobject == &file->f_owner) { + if (dev->app_info[i].fileobject == &file->f_owner) { /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */ break; } @@ -380,7 +380,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) /* Could not find application info block */ if (i == MAX_NUM_APP) { DEBUG("FT1000:ft1000_ioctl:Could not find application info block\n"); - return ( -EACCES ); + return (-EACCES); } if (list_empty(&dev->app_info[i].app_sqlist) == 0) { @@ -388,7 +388,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) return(POLLIN | POLLRDNORM | POLLPRI); } - poll_wait (file, &dev->app_info[i].wait_dpram_msg, wait); + poll_wait(file, &dev->app_info[i].wait_dpram_msg, wait); /* DEBUG("FT1000:ft1000_poll_dev:Polling for data from DSP\n"); */ return (0); @@ -406,7 +406,7 @@ static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait) * *--------------------------------------------------------------------------- */ -static long ft1000_ioctl (struct file *file, unsigned int command, +static long ft1000_ioctl(struct file *file, unsigned int command, unsigned long argument) { void __user *argp = (void __user *)argument; @@ -470,7 +470,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, get_ver_data.drv_ver = FT1000_DRV_VER; - if (copy_to_user(argp, &get_ver_data, sizeof(get_ver_data)) ) { + if (copy_to_user(argp, &get_ver_data, sizeof(get_ver_data))) { DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); result = -EFAULT; break; @@ -517,10 +517,10 @@ static long ft1000_ioctl (struct file *file, unsigned int command, get_stat_data.nRxPkts = info->stats.rx_packets; get_stat_data.nTxBytes = info->stats.tx_bytes; get_stat_data.nRxBytes = info->stats.rx_bytes; - do_gettimeofday ( &tv ); + do_gettimeofday(&tv); get_stat_data.ConTm = (u32)(tv.tv_sec - info->ConTm); DEBUG("Connection Time = %d\n", (int)get_stat_data.ConTm); - if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data)) ) { + if (copy_to_user(argp, &get_stat_data, sizeof(get_stat_data))) { DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); result = -EFAULT; break; @@ -562,7 +562,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, /* Get the length field to see how many bytes to copy */ result = get_user(msgsz, (__u16 __user *)argp); - msgsz = ntohs (msgsz); + msgsz = ntohs(msgsz); /* DEBUG("FT1000:ft1000_ioctl: length of message = %d\n", msgsz); */ if (msgsz > MAX_CMD_SQSIZE) { @@ -576,7 +576,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, if (!dpram_data) break; - if ( copy_from_user(dpram_data, argp, msgsz+2) ) { + if (copy_from_user(dpram_data, argp, msgsz+2)) { DEBUG("FT1000:ft1000_ChIoctl: copy fault occurred\n"); result = -EFAULT; } @@ -633,7 +633,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, /*DEBUG("FT1000_ft1000_ioctl: finished reading register\n"); */ /* Make sure we are within the limits of the slow queue memory limitation */ - if ( (msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ) ) { + if ((msgsz < MAX_CMD_SQSIZE) && (msgsz > PSEUDOSZ)) { /* Need to put sequence number plus new checksum for message */ pmsg = (u16 *)&dpram_data->pseudohdr; ppseudo_hdr = (struct pseudo_hdr *)pmsg; @@ -716,7 +716,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, break; msglen = htons(msglen); /* DEBUG("FT1000:ft1000_ioctl:msg length = %x\n", msglen); */ - if(copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) { + if (copy_to_user (&pioctl_dpram->pseudohdr, pdpram_blk->pbuffer, msglen)) { DEBUG("FT1000:ft1000_ioctl: copy fault occurred\n"); result = -EFAULT; break; @@ -750,7 +750,7 @@ static long ft1000_ioctl (struct file *file, unsigned int command, * *--------------------------------------------------------------------------- */ -static int ft1000_release (struct inode *inode, struct file *file) +static int ft1000_release(struct inode *inode, struct file *file) { struct ft1000_info *info; struct net_device *dev; @@ -771,7 +771,7 @@ static int ft1000_release (struct inode *inode, struct file *file) /* Search for matching file object */ for (i=0; iapp_info[i].fileobject == &file->f_owner) { + if (ft1000dev->app_info[i].fileobject == &file->f_owner) { /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", ft1000dev->app_info[i].app_id); */ break; } diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h index 69d2efd8b127..24b8d77a132c 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_ioctl.h @@ -94,12 +94,12 @@ typedef struct _IOCTL_DPRAM_COMMAND { #define IOCTL_CONNECT 10 #define IOCTL_DISCONNECT 11 -#define IOCTL_FT1000_GET_DSP_STAT _IOR (FT1000_MAGIC_CODE, IOCTL_GET_DSP_STAT_CMD, sizeof(IOCTL_GET_DSP_STAT) ) -#define IOCTL_FT1000_GET_VER _IOR (FT1000_MAGIC_CODE, IOCTL_GET_VER_CMD, sizeof(IOCTL_GET_VER) ) -#define IOCTL_FT1000_CONNECT _IOW (FT1000_MAGIC_CODE, IOCTL_CONNECT, 0 ) -#define IOCTL_FT1000_DISCONNECT _IOW (FT1000_MAGIC_CODE, IOCTL_DISCONNECT, 0 ) -#define IOCTL_FT1000_SET_DPRAM _IOW (FT1000_MAGIC_CODE, IOCTL_SET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK) ) -#define IOCTL_FT1000_GET_DPRAM _IOR (FT1000_MAGIC_CODE, IOCTL_GET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK) ) -#define IOCTL_FT1000_REGISTER _IOW (FT1000_MAGIC_CODE, IOCTL_REGISTER_CMD, sizeof(unsigned short *) ) +#define IOCTL_FT1000_GET_DSP_STAT _IOR(FT1000_MAGIC_CODE, IOCTL_GET_DSP_STAT_CMD, sizeof(IOCTL_GET_DSP_STAT) +#define IOCTL_FT1000_GET_VER _IOR(FT1000_MAGIC_CODE, IOCTL_GET_VER_CMD, sizeof(IOCTL_GET_VER) +#define IOCTL_FT1000_CONNECT _IOW(FT1000_MAGIC_CODE, IOCTL_CONNECT, 0 +#define IOCTL_FT1000_DISCONNECT _IOW(FT1000_MAGIC_CODE, IOCTL_DISCONNECT, 0 +#define IOCTL_FT1000_SET_DPRAM _IOW(FT1000_MAGIC_CODE, IOCTL_SET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK) +#define IOCTL_FT1000_GET_DPRAM _IOR(FT1000_MAGIC_CODE, IOCTL_GET_DPRAM_CMD, sizeof(IOCTL_DPRAM_BLK) +#define IOCTL_FT1000_REGISTER _IOW(FT1000_MAGIC_CODE, IOCTL_REGISTER_CMD, sizeof(unsigned short *) #endif /* _FT1000IOCTLH_ */ -- 2.11.0