Re: [PATCH v2 1/6] staging: ft1000: spaces required around that '=', '<' and '=='
On Mon, Nov 03, 2014 at 04:05:43PM -0800, Greg Kroah-Hartman wrote: > On Sat, Nov 01, 2014 at 10:47:22AM +0800, Chen Weixiang wrote: > > Remove following code style errors from ft1000/ft1000-usb/ft1000_debug.c > > and ft1000/ft1000-pcmcia/ft1000_hw.c: > > ERROR: spaces required around that '=' (ctx:VxV) > > ERROR: spaces required around that '<' (ctx:VxV) > > ERROR: spaces required around that '==' (ctx:VxV) > > > > Signed-off-by: Chen Weixiang > > --- > > drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 6 ++--- > > drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 28 > > > > 2 files changed, 17 insertions(+), 17 deletions(-) > > This patch doesn't apply against my staging.git tree on git.kernel.org > Please refresh the series against the staging-testing and resend. > > thanks, > > greg k-h OK, I'll refesh the patch series on staging-testing branch. Thanks. -- Best regards, Chen Weixiang (Alex) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/6] staging: ft1000: spaces required around that '=', '<' and '=='
On Mon, Nov 10, 2014 at 08:16:16AM +0800, Chen Weixiang wrote: > On Mon, Nov 03, 2014 at 04:05:43PM -0800, Greg Kroah-Hartman wrote: > > > > This patch doesn't apply against my staging.git tree on git.kernel.org > > Please refresh the series against the staging-testing and resend. > > > > thanks, > > > > greg k-h > > OK, I'll refesh the patch series on staging-testing branch. > Thanks. > > -- > Best regards, > Chen Weixiang (Alex) > The problems are already fixed on staging-test branch by other guys. No need this patch series anymore. Thanks. -- Best regards, Chen Weixiang (Alex) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: lustre: libcfs: define symbols as static
-- Best regards, Chen Weixiang (Alex) >From 8de8c7f65f4529e3febb384402344d062f64230b Mon Sep 17 00:00:00 2001 From: Chen Weixiang Date: Thu, 5 Feb 2015 20:07:02 +0800 Subject: [PATCH] staging: lustre: lustre: libcfs: define symbols as static This patch fixes the following warning using sparse - warning: symbol 'libcfs_debug_mb' was not declared. Should it be static? - warning: symbol 'portal_enter_debugger' was not declared. Should it be static? Signed-off-by: Chen Weixiang --- drivers/staging/lustre/lustre/libcfs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index 7170088..76c62e8 100644 --- a/drivers/staging/lustre/lustre/libcfs/debug.c +++ b/drivers/staging/lustre/lustre/libcfs/debug.c @@ -57,7 +57,7 @@ module_param(libcfs_debug, int, 0644); MODULE_PARM_DESC(libcfs_debug, "Lustre kernel debug mask"); EXPORT_SYMBOL(libcfs_debug); -unsigned int libcfs_debug_mb = 0; +static unsigned int libcfs_debug_mb; module_param(libcfs_debug_mb, uint, 0644); MODULE_PARM_DESC(libcfs_debug_mb, "Total debug buffer size."); EXPORT_SYMBOL(libcfs_debug_mb); @@ -93,7 +93,7 @@ EXPORT_SYMBOL(libcfs_debug_binary); unsigned int libcfs_stack = 3 * THREAD_SIZE / 4; EXPORT_SYMBOL(libcfs_stack); -unsigned int portal_enter_debugger; +static unsigned int portal_enter_debugger; EXPORT_SYMBOL(portal_enter_debugger); unsigned int libcfs_catastrophe; -- 2.2.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: lustre: libcfs: define symbols as static
This patch fixes the following warning using sparse - warning: symbol 'libcfs_debug_mb' was not declared. Should it be static? - warning: symbol 'portal_enter_debugger' was not declared. Should it be static? Signed-off-by: Chen Weixiang --- drivers/staging/lustre/lustre/libcfs/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c index 7170088..76c62e8 100644 --- a/drivers/staging/lustre/lustre/libcfs/debug.c +++ b/drivers/staging/lustre/lustre/libcfs/debug.c @@ -57,7 +57,7 @@ module_param(libcfs_debug, int, 0644); MODULE_PARM_DESC(libcfs_debug, "Lustre kernel debug mask"); EXPORT_SYMBOL(libcfs_debug); -unsigned int libcfs_debug_mb = 0; +static unsigned int libcfs_debug_mb; module_param(libcfs_debug_mb, uint, 0644); MODULE_PARM_DESC(libcfs_debug_mb, "Total debug buffer size."); EXPORT_SYMBOL(libcfs_debug_mb); @@ -93,7 +93,7 @@ EXPORT_SYMBOL(libcfs_debug_binary); unsigned int libcfs_stack = 3 * THREAD_SIZE / 4; EXPORT_SYMBOL(libcfs_stack); -unsigned int portal_enter_debugger; +static unsigned int portal_enter_debugger; EXPORT_SYMBOL(portal_enter_debugger); unsigned int libcfs_catastrophe; -- 2.2.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/7] staging: ft1000: "foo * bar" should be "foo *bar"
Remove code style error form ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 3280a3c..48c1ef2 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -1753,7 +1753,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev) SUCCESS -*/ -static int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len) +static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len) { struct ft1000_info *info = netdev_priv(dev); struct ft1000_pcmcia *pcmcia = info->priv; -- 2.1.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/7] staging: ft1000: "(foo*)" should be "(foo *)"
Remove code style error from ft1000/ft1000-usb/ft1000_debug.c: ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 183128c..454dc69 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -447,7 +447,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, switch (cmd) { case IOCTL_REGISTER_CMD: DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_REGISTER called\n"); -result = get_user(tempword, (__u16 __user*)argp); +result = get_user(tempword, (__u16 __user *)argp); if (result) { DEBUG("result = %d failed to get_user\n", result); break; @@ -652,7 +652,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, } pmsg++; ppseudo_hdr = (struct pseudo_hdr *)pmsg; - result = card_send_command(ft1000dev, (unsigned short*)dpram_data, total_len+2); + result = card_send_command(ft1000dev, (unsigned short *)dpram_data, total_len+2); ft1000dev->app_info[app_index].nTxMsg++; -- 2.1.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/7] staging: ft1000: do not initialise statics to 0 or NULL
Remove following checkpatch.pl error from ft1000/ft1000-usb/ft1000_debug.c ERROR: do not initialise statics to 0 or NULL Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 0f347ab..2573147 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -38,7 +38,7 @@ #include #include "ft1000_usb.h" -static int ft1000_flarion_cnt = 0; +static int ft1000_flarion_cnt; static int ft1000_open(struct inode *inode, struct file *file); static unsigned int ft1000_poll_dev(struct file *file, poll_table *wait); -- 2.1.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/7] staging: ft1000: space prohibited after '(' and '&', before ')'
Remove code style error from ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that '&' (ctx:WxW) Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 1bf685a..3280a3c 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -885,7 +885,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer, unsigned long flags; if (info->AsicID == ELECTRABUZZ_ID) { - size = ( ft1000_read_dpram(dev, *pnxtph) ) + sizeof(struct pseudo_hdr); + size = (ft1000_read_dpram(dev, *pnxtph)) + sizeof(struct pseudo_hdr); } else { size = ntohs(ft1000_read_dpram_mag_16 @@ -994,10 +994,10 @@ static void ft1000_proc_drvmsg(struct net_device *dev) } else { tempword = FT1000_DPRAM_MAG_RX_BASE; } -if ( ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword) ) { +if (ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword)) { /* Get the message type which is total_len + PSEUDO header + msgtype + message body */ - pdrvmsg = (struct drv_msg *) & cmdbuffer[0]; + pdrvmsg = (struct drv_msg *) &cmdbuffer[0]; msgtype = ntohs(pdrvmsg->type); DEBUG(1, "Command message type = 0x%x\n", msgtype); switch (msgtype) { @@ -1051,7 +1051,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) info->CardReady = 1; break; case MEDIA_STATE: - pmediamsg = (struct media_msg *) & cmdbuffer[0]; + pmediamsg = (struct media_msg *) &cmdbuffer[0]; if (info->ProgConStat != 0xFF) { if (pmediamsg->state) { DEBUG(1, "Media is up\n"); @@ -1082,7 +1082,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) } break; case DSP_INIT_MSG: - pdspinitmsg = (struct dsp_init_msg *) & cmdbuffer[0]; + pdspinitmsg = (struct dsp_init_msg *) &cmdbuffer[0]; memcpy(info->DspVer, pdspinitmsg->DspVer, DSPVERSZ); DEBUG(1, "DSPVER = 0x%2x 0x%2x 0x%2x 0x%2x\n", info->DspVer[0], info->DspVer[1], info->DspVer[2], @@ -1116,7 +1116,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) tempword = ntohs(pdrvmsg->length); info->DSPInfoBlklen = tempword; if (tempword < (MAX_DSP_SESS_REC - 4)) { - pmsg = (u16 *) & pdrvmsg->data[0]; + pmsg = (u16 *) &pdrvmsg->data[0]; for (i = 0; i < ((tempword + 1) / 2); i++) { DEBUG(1, "FT1000:drivermsg:dsp info data = 0x%x\n", @@ -1198,7 +1198,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) * Put message into Slow Queue * Form Pseudo header */ - pmsg = (u16 *) & tempbuffer[0]; + pmsg = (u16 *) &tempbuffer[0]; ppseudo_hdr = (struct pseudo_hdr *) pmsg; ppseudo_hdr->length = htons(0x0012); ppseudo_hdr->source = 0x10; @@ -1219,7 +1219,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) for (i = 1; i < 7; i++) { ppseudo_hdr->checksum ^= *pmsg++; } - pmsg = (u16 *) & tempbuffer[16]; + pmsg = (u16 *) &tempbuffer[16]; *pmsg++ = htons(RSP_DRV_ERR_RPT_MSG); *pmsg++ = htons(0x000e); *pmsg++ = htons(info->DSP_TIME[0]); @@ -1875,22 +1875,22 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len) i + 8, htons(*packet)); } } else { - outl(*(u32 *) & pseudo.buff[0], + outl(*(u32 *) &pseudo.buff[
[PATCH 3/7] staging: ft1000: space required after that ','
Remove code style error from ft1000/ft1000-usb/ft1000_debug.c: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 47dc0c0..183128c 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -301,7 +301,7 @@ static int ft1000_open(struct inode *inode, struct file *file) { struct ft1000_info *info; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private; -int i,num; +int i, num; DEBUG("%s called\n", __func__); num = (MINOR(inode->i_rdev) & 0xf); @@ -419,12 +419,12 @@ static long ft1000_ioctl(struct file *file, unsigned int command, struct timeval tv; struct IOCTL_GET_VER get_ver_data; struct IOCTL_GET_DSP_STAT get_stat_data; -u8 ConnectionMsg[] = {0x00,0x44,0x10,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x93,0x64, - 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x02,0x37,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x01,0x7f,0x00, - 0x00,0x01,0x00,0x00}; +u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64, + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00, + 0x00, 0x01, 0x00, 0x00}; unsigned short ledStat = 0; unsigned short conStat = 0; @@ -475,7 +475,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, break; } -DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n",(unsigned int)get_ver_data.drv_ver); +DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n", (unsigned int)get_ver_data.drv_ver); break; case IOCTL_CONNECT: @@ -652,7 +652,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, } pmsg++; ppseudo_hdr = (struct pseudo_hdr *)pmsg; - result = card_send_command(ft1000dev,(unsigned short*)dpram_data,total_len+2); + result = card_send_command(ft1000dev, (unsigned short*)dpram_data, total_len+2); ft1000dev->app_info[app_index].nTxMsg++; -- 2.1.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/7] staging: ft1000: else should follow close brace '}'
Remove code style error from ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: else should follow close brace '}' Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index fc28dee..1bf685a 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -595,8 +595,7 @@ static void ft1000_hbchk(u_long data) if (tempword != ho) { if (info->AsicID == ELECTRABUZZ_ID) { tempword = ft1000_read_dpram(dev, FT1000_HI_HO); - } - else { + } else { tempword = ntohs(ft1000_read_dpram_mag_16(dev, FT1000_MAG_HI_HO, FT1000_MAG_HI_HO_INDX)); } } @@ -715,15 +714,13 @@ static void ft1000_hbchk(u_long data) if (tempword != hi) { if (info->AsicID == ELECTRABUZZ_ID) { ft1000_write_dpram(dev, FT1000_HI_HO, hi); - } - else { + } else { ft1000_write_dpram_mag_16(dev, FT1000_MAG_HI_HO, hi_mag, FT1000_MAG_HI_HO_INDX); } if (info->AsicID == ELECTRABUZZ_ID) { tempword = ft1000_read_dpram(dev, FT1000_HI_HO); - } - else { + } else { tempword = ntohs(ft1000_read_dpram_mag_16(dev, FT1000_MAG_HI_HO, FT1000_MAG_HI_HO_INDX)); } @@ -994,8 +991,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) if (info->AsicID == ELECTRABUZZ_ID) { tempword = FT1000_DPRAM_RX_BASE+2; -} -else { +} else { tempword = FT1000_DPRAM_MAG_RX_BASE; } if ( ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword) ) { @@ -1075,8 +1071,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) info->ConTm = 0; } } -} -else { +} else { DEBUG(1, "Media is down\n"); if (info->mediastate == 1) { info->mediastate = 0; -- 2.1.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/7] Remove checkpatch.pl errors from drivers/staging/ft1000
This patches remove following code style errors from drivers/staging/ft1000: ERROR: do not initialise statics to 0 or NULL ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) ERROR: space required after that ',' (ctx:VxV) ERROR: else should follow close brace '}' ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that '&' (ctx:WxW) ERROR: "(foo*)" should be "(foo *)" ERROR: "foo * bar" should be "foo *bar" Chen Weixiang (7): staging: ft1000: do not initialise statics to 0 or NULL staging: ft1000: spaces required around that '=', '<' and '==' staging: ft1000: space required after that ',' staging: ft1000: else should follow close brace '}' staging: ft1000: space prohibited after '(' and '&', before ')' staging: ft1000: "(foo*)" should be "(foo *)" staging: ft1000: "foo * bar" should be "foo *bar" drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 55 +++- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 50 ++--- 2 files changed, 50 insertions(+), 55 deletions(-) -- 2.1.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/7] staging: ft1000: spaces required around that '=', '<' and '=='
Remove code style errors from ft1000/ft1000-usb/ft1000_debug.c and ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 6 ++--- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 28 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 44575c7..fc28dee 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -812,11 +812,11 @@ static void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, /* Make sure SLOWQ doorbell is clear */ tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL); -i=0; +i = 0; while (tempword & FT1000_DB_DPRAM_TX) { mdelay(10); i++; -if (i==10) { +if (i == 10) { spin_unlock_irqrestore(&info->dpram_lock, flags); return; } @@ -1221,7 +1221,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ppseudo_hdr->portsrc = 0; /* Calculate new checksum */ ppseudo_hdr->checksum = *pmsg++; -for (i=1; i<7; i++) { +for (i = 1; i < 7; i++) { ppseudo_hdr->checksum ^= *pmsg++; } pmsg = (u16 *) & tempbuffer[16]; diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 2573147..47dc0c0 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -193,7 +193,7 @@ int ft1000_create_dev(struct ft1000_usb *dev) /* initialize application information */ dev->appcnt = 0; -for (i=0; iapp_info[i].nTxMsg = 0; dev->app_info[i].nRxMsg = 0; dev->app_info[i].nTxMsgReject = 0; @@ -260,7 +260,7 @@ void ft1000_destroy_dev(struct net_device *netdev) dev->DeviceName); /* Make sure we free any memory reserve for slow Queue */ -for (i=0; iapp_info[i].app_sqlist) == 0) { pdpram_blk = list_entry(dev->app_info[i].app_sqlist.next, struct dpram_blk, list); list_del(&pdpram_blk->list); @@ -318,7 +318,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)) { break; } @@ -369,7 +369,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) { /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */ break; @@ -411,7 +411,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, void __user *argp = (void __user *)argument; struct ft1000_info *info; struct ft1000_usb *ft1000dev; -int result=0; +int result = 0; int cmd; int i; u16 tempword; @@ -426,8 +426,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command, 0x00,0x00,0x02,0x37,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x01,0x7f,0x00, 0x00,0x01,0x00,0x00}; -unsigned short ledStat=0; -unsigned short conStat=0; +unsigned short ledStat = 0; +unsigned short conStat = 0; /* DEBUG("ft1000_ioctl called\n"); */ @@ -454,7 +454,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, } if (tempword == DSPBCMSGID) { /* Search for matching file object */ -for (i=0; iapp_info[i].fileobject == &file->f_owner) { ft1000dev->app_info[i].DspBCMsgFlag = 1; DEBUG("FT1000:ft1000_ioctl:Registered for broadcast messages\n"); @@ -581,12 +581,12 @@ static long ft1000_ioctl(struct file *file, unsigned int command, result = -EFAULT; } else { /* Check if this message came from a registered application */ -for (i=0; iapp_info[i].fileobject == &file->f_owner) { break; } } -if (i==MAX_NUM_APP) { +if (i == MAX_NUM_APP) { DEBUG("FT1000:No matching application fileobject\n");
Re: [PATCH 3/7] staging: ft1000: space required after that ','
On Sun, Oct 19, 2014 at 03:27:00PM +0200, Konrad Zapalowicz wrote: > On 10/19, Chen Weixiang wrote: > > -u8 ConnectionMsg[] = > > {0x00,0x44,0x10,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x93,0x64, > > - > > 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a, > > - > > 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, > > - > > 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, > > - > > 0x00,0x00,0x02,0x37,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x01,0x7f,0x00, > > - 0x00,0x01,0x00,0x00}; > > +u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, > > 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64, > > + 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, > > 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0a, > > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, > > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, > > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > > + 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, > > 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00, > > + 0x00, 0x01, 0x00, 0x00}; > > Nice, however it still violates the 80 characters a line rule. Please > redo this patch. > Thanks, > Konrad > OK, I'll re-organize the array ConnectionMsg[], check the patches with checkpatch and send the patches again. Thank you, Konrad. -- Best regards, Chen Weixiang (Alex) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 1/6] staging: ft1000: spaces required around that '=', '<' and '=='
Remove following code style errors from ft1000/ft1000-usb/ft1000_debug.c and ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 6 ++--- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 28 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 44575c7..fc28dee 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -812,11 +812,11 @@ static void ft1000_send_cmd (struct net_device *dev, u16 *ptempbuffer, int size, /* Make sure SLOWQ doorbell is clear */ tempword = ft1000_read_reg(dev, FT1000_REG_DOORBELL); -i=0; +i = 0; while (tempword & FT1000_DB_DPRAM_TX) { mdelay(10); i++; -if (i==10) { +if (i == 10) { spin_unlock_irqrestore(&info->dpram_lock, flags); return; } @@ -1221,7 +1221,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) ppseudo_hdr->portsrc = 0; /* Calculate new checksum */ ppseudo_hdr->checksum = *pmsg++; -for (i=1; i<7; i++) { +for (i = 1; i < 7; i++) { ppseudo_hdr->checksum ^= *pmsg++; } pmsg = (u16 *) & tempbuffer[16]; diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 0f347ab..02bfb3e 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -193,7 +193,7 @@ int ft1000_create_dev(struct ft1000_usb *dev) /* initialize application information */ dev->appcnt = 0; -for (i=0; iapp_info[i].nTxMsg = 0; dev->app_info[i].nRxMsg = 0; dev->app_info[i].nTxMsgReject = 0; @@ -260,7 +260,7 @@ void ft1000_destroy_dev(struct net_device *netdev) dev->DeviceName); /* Make sure we free any memory reserve for slow Queue */ -for (i=0; iapp_info[i].app_sqlist) == 0) { pdpram_blk = list_entry(dev->app_info[i].app_sqlist.next, struct dpram_blk, list); list_del(&pdpram_blk->list); @@ -318,7 +318,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)) { break; } @@ -369,7 +369,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) { /* DEBUG("FT1000:ft1000_ioctl: Message is for AppId = %d\n", dev->app_info[i].app_id); */ break; @@ -411,7 +411,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, void __user *argp = (void __user *)argument; struct ft1000_info *info; struct ft1000_usb *ft1000dev; -int result=0; +int result = 0; int cmd; int i; u16 tempword; @@ -426,8 +426,8 @@ static long ft1000_ioctl(struct file *file, unsigned int command, 0x00,0x00,0x02,0x37,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x01,0x7f,0x00, 0x00,0x01,0x00,0x00}; -unsigned short ledStat=0; -unsigned short conStat=0; +unsigned short ledStat = 0; +unsigned short conStat = 0; /* DEBUG("ft1000_ioctl called\n"); */ @@ -454,7 +454,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, } if (tempword == DSPBCMSGID) { /* Search for matching file object */ -for (i=0; iapp_info[i].fileobject == &file->f_owner) { ft1000dev->app_info[i].DspBCMsgFlag = 1; DEBUG("FT1000:ft1000_ioctl:Registered for broadcast messages\n"); @@ -581,12 +581,12 @@ static long ft1000_ioctl(struct file *file, unsigned int command, result = -EFAULT; } else { /* Check if this message came from a registered application */ -for (i=0; iapp_info[i].fileobject == &file->f_owner) { break; } } -if (i==MAX_NUM_APP) { +if (i == MAX_NUM_APP) { DEBUG("FT1000:No matching application fileobject\n"
[PATCH v2 0/6] Remove checkpatch.pl errors from drivers/staging/ft1000
This is the version 2 of the patch series. The following code style error is removed from the patch because it was already merged into Greg K-H staging.tree: ERROR: do not initialise statics to 0 or NULL This patch series are removing following code style errors from drivers/staging/ft1000: ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that '&' (ctx:WxW) ERROR: "(foo*)" should be "(foo *)" ERROR: "foo * bar" should be "foo *bar" ERROR: else should follow close brace '}' ERROR: space required after that ',' (ctx:VxV) Chen Weixiang (6): staging: ft1000: spaces required around that '=', '<' and '==' staging: ft1000: space prohibited after '(', '&' and before ')' staging: ft1000: "(foo*)" should be "(foo *)" staging: ft1000: "foo * bar" should be "foo *bar" staging: ft1000: else should follow close brace '}' staging: ft1000: space required after that ',' drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 55 +++- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 54 --- 2 files changed, 54 insertions(+), 55 deletions(-) -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 3/6] staging: ft1000: "(foo*)" should be "(foo *)"
Remove following code style error from ft1000/ft1000-usb/ft1000_debug.c: ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 02bfb3e..7bc05fe 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -447,7 +447,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, switch (cmd) { case IOCTL_REGISTER_CMD: DEBUG("FT1000:ft1000_ioctl: IOCTL_FT1000_REGISTER called\n"); -result = get_user(tempword, (__u16 __user*)argp); +result = get_user(tempword, (__u16 __user *)argp); if (result) { DEBUG("result = %d failed to get_user\n", result); break; @@ -652,7 +652,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, } pmsg++; ppseudo_hdr = (struct pseudo_hdr *)pmsg; - result = card_send_command(ft1000dev,(unsigned short*)dpram_data,total_len+2); + result = card_send_command(ft1000dev,(unsigned short *)dpram_data,total_len+2); ft1000dev->app_info[app_index].nTxMsg++; -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 2/6] staging: ft1000: space prohibited after '(', '&' and before ')'
Remove following code style errors from ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' ERROR: space prohibited after that '&' (ctx:WxW) Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index fc28dee..9ef7817 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -888,7 +888,7 @@ static bool ft1000_receive_cmd(struct net_device *dev, u16 *pbuffer, unsigned long flags; if (info->AsicID == ELECTRABUZZ_ID) { - size = ( ft1000_read_dpram(dev, *pnxtph) ) + sizeof(struct pseudo_hdr); + size = (ft1000_read_dpram(dev, *pnxtph)) + sizeof(struct pseudo_hdr); } else { size = ntohs(ft1000_read_dpram_mag_16 @@ -998,10 +998,10 @@ static void ft1000_proc_drvmsg(struct net_device *dev) else { tempword = FT1000_DPRAM_MAG_RX_BASE; } -if ( ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword) ) { +if (ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword)) { /* Get the message type which is total_len + PSEUDO header + msgtype + message body */ - pdrvmsg = (struct drv_msg *) & cmdbuffer[0]; + pdrvmsg = (struct drv_msg *) &cmdbuffer[0]; msgtype = ntohs(pdrvmsg->type); DEBUG(1, "Command message type = 0x%x\n", msgtype); switch (msgtype) { @@ -1055,7 +1055,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) info->CardReady = 1; break; case MEDIA_STATE: - pmediamsg = (struct media_msg *) & cmdbuffer[0]; + pmediamsg = (struct media_msg *) &cmdbuffer[0]; if (info->ProgConStat != 0xFF) { if (pmediamsg->state) { DEBUG(1, "Media is up\n"); @@ -1087,7 +1087,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) } break; case DSP_INIT_MSG: - pdspinitmsg = (struct dsp_init_msg *) & cmdbuffer[0]; + pdspinitmsg = (struct dsp_init_msg *) &cmdbuffer[0]; memcpy(info->DspVer, pdspinitmsg->DspVer, DSPVERSZ); DEBUG(1, "DSPVER = 0x%2x 0x%2x 0x%2x 0x%2x\n", info->DspVer[0], info->DspVer[1], info->DspVer[2], @@ -1121,7 +1121,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) tempword = ntohs(pdrvmsg->length); info->DSPInfoBlklen = tempword; if (tempword < (MAX_DSP_SESS_REC - 4)) { - pmsg = (u16 *) & pdrvmsg->data[0]; + pmsg = (u16 *) &pdrvmsg->data[0]; for (i = 0; i < ((tempword + 1) / 2); i++) { DEBUG(1, "FT1000:drivermsg:dsp info data = 0x%x\n", @@ -1203,7 +1203,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) * Put message into Slow Queue * Form Pseudo header */ - pmsg = (u16 *) & tempbuffer[0]; + pmsg = (u16 *) &tempbuffer[0]; ppseudo_hdr = (struct pseudo_hdr *) pmsg; ppseudo_hdr->length = htons(0x0012); ppseudo_hdr->source = 0x10; @@ -1224,7 +1224,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) for (i = 1; i < 7; i++) { ppseudo_hdr->checksum ^= *pmsg++; } - pmsg = (u16 *) & tempbuffer[16]; + pmsg = (u16 *) &tempbuffer[16]; *pmsg++ = htons(RSP_DRV_ERR_RPT_MSG); *pmsg++ = htons(0x000e); *pmsg++ = htons(info->DSP_TIME[0]); @@ -1880,22 +1880,22 @@ static int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len) i + 8, htons(*packet)); } } else { - outl(*(u32 *) & pseudo.buff[0], + outl(*(
[PATCH v2 6/6] staging: ft1000: space required after that ','
Remove following code style error from ft1000/ft1000-usb/ft1000_debug.c: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-usb/ft1000_debug.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c index 7bc05fe..5e290e9 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_debug.c @@ -301,7 +301,7 @@ static int ft1000_open(struct inode *inode, struct file *file) { struct ft1000_info *info; struct ft1000_usb *dev = (struct ft1000_usb *)inode->i_private; -int i,num; +int i, num; DEBUG("%s called\n", __func__); num = (MINOR(inode->i_rdev) & 0xf); @@ -419,12 +419,16 @@ static long ft1000_ioctl(struct file *file, unsigned int command, struct timeval tv; struct IOCTL_GET_VER get_ver_data; struct IOCTL_GET_DSP_STAT get_stat_data; -u8 ConnectionMsg[] = {0x00,0x44,0x10,0x20,0x80,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x93,0x64, - 0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0a, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x02,0x37,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x01,0x00,0x01,0x7f,0x00, - 0x00,0x01,0x00,0x00}; +u8 ConnectionMsg[] = {0x00, 0x44, 0x10, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x93, 0x64, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x37, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x7f, 0x00, 0x00, + 0x01, 0x00, 0x00}; unsigned short ledStat = 0; unsigned short conStat = 0; @@ -475,7 +479,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, break; } -DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n",(unsigned int)get_ver_data.drv_ver); +DEBUG("FT1000:ft1000_ioctl:driver version = 0x%x\n", (unsigned int)get_ver_data.drv_ver); break; case IOCTL_CONNECT: @@ -652,7 +656,7 @@ static long ft1000_ioctl(struct file *file, unsigned int command, } pmsg++; ppseudo_hdr = (struct pseudo_hdr *)pmsg; - result = card_send_command(ft1000dev,(unsigned short *)dpram_data,total_len+2); + result = card_send_command(ft1000dev, (unsigned short *)dpram_data, total_len+2); ft1000dev->app_info[app_index].nTxMsg++; -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 4/6] staging: ft1000: "foo * bar" should be "foo *bar"
Remove following code style error from ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index 9ef7817..db194bc 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -1758,7 +1758,7 @@ static int ft1000_copy_up_pkt(struct net_device *dev) SUCCESS -*/ -static int ft1000_copy_down_pkt(struct net_device *dev, u16 * packet, u16 len) +static int ft1000_copy_down_pkt(struct net_device *dev, u16 *packet, u16 len) { struct ft1000_info *info = netdev_priv(dev); struct ft1000_pcmcia *pcmcia = info->priv; -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2 5/6] staging: ft1000: else should follow close brace '}'
Remove code style error from ft1000/ft1000-pcmcia/ft1000_hw.c: ERROR: else should follow close brace '}' Signed-off-by: Chen Weixiang --- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c index db194bc..48c1ef2 100644 --- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c @@ -595,8 +595,7 @@ static void ft1000_hbchk(u_long data) if (tempword != ho) { if (info->AsicID == ELECTRABUZZ_ID) { tempword = ft1000_read_dpram(dev, FT1000_HI_HO); - } - else { + } else { tempword = ntohs(ft1000_read_dpram_mag_16(dev, FT1000_MAG_HI_HO, FT1000_MAG_HI_HO_INDX)); } } @@ -715,15 +714,13 @@ static void ft1000_hbchk(u_long data) if (tempword != hi) { if (info->AsicID == ELECTRABUZZ_ID) { ft1000_write_dpram(dev, FT1000_HI_HO, hi); - } - else { + } else { ft1000_write_dpram_mag_16(dev, FT1000_MAG_HI_HO, hi_mag, FT1000_MAG_HI_HO_INDX); } if (info->AsicID == ELECTRABUZZ_ID) { tempword = ft1000_read_dpram(dev, FT1000_HI_HO); - } - else { + } else { tempword = ntohs(ft1000_read_dpram_mag_16(dev, FT1000_MAG_HI_HO, FT1000_MAG_HI_HO_INDX)); } @@ -994,8 +991,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) if (info->AsicID == ELECTRABUZZ_ID) { tempword = FT1000_DPRAM_RX_BASE+2; -} -else { +} else { tempword = FT1000_DPRAM_MAG_RX_BASE; } if (ft1000_receive_cmd(dev, &cmdbuffer[0], MAX_CMD_SQSIZE, &tempword)) { @@ -1075,8 +1071,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) info->ConTm = 0; } } -} -else { +} else { DEBUG(1, "Media is down\n"); if (info->mediastate == 1) { info->mediastate = 0; -- 2.1.2 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/6] staging: ft1000: spaces required around that '=', '<' and '=='
On Sat, Nov 01, 2014 at 10:35:35AM +0530, Sudip Mukherjee wrote: > many whitespace errors in the patch. > checkpatch gives total: 8 errors, 23 warnings, 125 lines checked > > thanks > sudip > Hi sudip, Yes, I also run checkpatch.pl on this patch, and got several errors/warnings. But those errors/warnings are not related to spaces around '=', '<' and '==' anymore. I thought it's better to fix one code style error/warning in one patch, and put the code style error/warning to Subject line. It's much clear, isn't it? Thanks. -- Best regards, Chen Weixiang (Alex) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 1/6] staging: ft1000: spaces required around that '=', '<' and '=='
On Sat, Nov 01, 2014 at 10:55:01AM +0530, Sudip Mukherjee wrote: > ok, just to verify, i thought of trying to generate a similar patch which > will not give checkpatch errors. > but this patch is not applying to next-20141031. > > thanks > sudip Hi sudip, It's my fault that I'm not fetching latest tags on linux-next before checking the code style errors. Please ignore this patch, sorry. -- Best regards, Chen Weixiang (Alex) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel