Re: [PATCH 1/1] staging: lustre/lustre/llite: get rid of incorrect type warning
On Wed, Jun 10, 2015 at 5:48 PM, Greg Kroah-Hartman wrote: > > Are you sure all of these are correct? The kernel/user api for lustre > is a complex beast, and just casting away the pointer types isn't > usually the proper thing to do in order to resolve the issues here. > > thanks, > > greg k-h I'm not 100% sure, but the pointers that I added the annotation to end up being used as user memory. (eg. passed to copy_to_user, etc.) Sometimes these pointers are passed to functions that already have __user annotation in their signatures (eg. ll_getname, copy_and_ioctl, ll_fid2path, etc.). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] staging: lustre/lustre/llite: get rid of incorrect type warning
In dir.c and llite_lib.c, sparse reports multiple warnings messages due to different address spaces. This patch resolves these warnings by adding the tag __user for username addresses. Signed-off-by: Tolga Ceylan --- drivers/staging/lustre/lustre/llite/dir.c | 78 + drivers/staging/lustre/lustre/llite/llite_lib.c | 8 +-- 2 files changed, 45 insertions(+), 41 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 4b0de8d..0441c20 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1258,7 +1258,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) return ll_iocontrol(inode, file, cmd, arg); case FSFILT_IOC_GETVERSION_OLD: case FSFILT_IOC_GETVERSION: - return put_user(inode->i_generation, (int *)arg); + return put_user(inode->i_generation, (int __user *)arg); /* We need to special case any other ioctls we want to handle, * to send them to the MDS/OST as appropriate and to properly * network encode the arg field. @@ -1272,7 +1272,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) if (mdtidx < 0) return mdtidx; - if (put_user((int)mdtidx, (int *)arg)) + if (put_user((int)mdtidx, (int __user *)arg)) return -EFAULT; return 0; @@ -1369,8 +1369,10 @@ lmv_out_free: case LL_IOC_LOV_SETSTRIPE: { struct lov_user_md_v3 lumv3; struct lov_user_md_v1 *lumv1 = (struct lov_user_md_v1 *)&lumv3; - struct lov_user_md_v1 *lumv1p = (struct lov_user_md_v1 *)arg; - struct lov_user_md_v3 *lumv3p = (struct lov_user_md_v3 *)arg; + struct lov_user_md_v1 __user *lumv1p = + (struct lov_user_md_v1 __user *)arg; + struct lov_user_md_v3 __user *lumv3p = + (struct lov_user_md_v3 __user *)arg; int set_default = 0; @@ -1395,7 +1397,8 @@ lmv_out_free: return rc; } case LL_IOC_LMV_GETSTRIPE: { - struct lmv_user_md *lump = (struct lmv_user_md *)arg; + struct lmv_user_md __user *lump = + (struct lmv_user_md __user *)arg; struct lmv_user_md lum; struct lmv_user_md *tmp; int lum_size; @@ -1428,7 +1431,7 @@ lmv_out_free: tmp->lum_objects[0].lum_mds = mdtindex; memcpy(&tmp->lum_objects[0].lum_fid, ll_inode2fid(inode), sizeof(struct lu_fid)); - if (copy_to_user((void *)arg, tmp, lum_size)) { + if (copy_to_user((void __user *)arg, tmp, lum_size)) { rc = -EFAULT; goto free_lmv; } @@ -1449,7 +1452,7 @@ free_lmv: if (!(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_LVB_TYPE)) return -ENOTSUPP; - filename = ll_getname((const char *)arg); + filename = ll_getname((const char __user *)arg); if (IS_ERR(filename)) return PTR_ERR(filename); @@ -1474,7 +1477,7 @@ out_rmdir: case IOC_MDC_GETFILEINFO: case IOC_MDC_GETFILESTRIPE: { struct ptlrpc_request *request = NULL; - struct lov_user_md *lump; + struct lov_user_md __user *lump; struct lov_mds_md *lmm = NULL; struct mdt_body *body; char *filename = NULL; @@ -1482,7 +1485,7 @@ out_rmdir: if (cmd == IOC_MDC_GETFILEINFO || cmd == IOC_MDC_GETFILESTRIPE) { - filename = ll_getname((const char *)arg); + filename = ll_getname((const char __user *)arg); if (IS_ERR(filename)) return PTR_ERR(filename); @@ -1511,11 +1514,11 @@ out_rmdir: if (cmd == IOC_MDC_GETFILESTRIPE || cmd == LL_IOC_LOV_GETSTRIPE) { - lump = (struct lov_user_md *)arg; + lump = (struct lov_user_md __user *)arg; } else { - struct lov_user_mds_data *lmdp; + struct lov_user_mds_data __user *lmdp; - lmdp = (struct lov_user_mds_data *)arg; + lmdp = (struct lov_user_mds_data __user *)arg; lump = &lmdp->lmd_lmm; } if (copy_to_user(lump, lmm, lmmsize)) { @@ -1527,7 +1530,7 @@ out_rmdir: } skip_lmm: if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETI
[PATCH 1/1] staging: lustre/lustre/obdclass/llog_cat.c: get rid of sparse context imbalance warning
In llog_cat_new_log(), sparse emits a context imbalance (unexpected lock) warning due its inability to detect the noreturn attribute in lbug_with_lock() function inside LBUG macro. With this patch, we unlock the spinlock before checking the error condition to resolve this warning. Signed-off-by: Tolga Ceylan --- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index c8f6ab0..280e861 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -103,13 +103,13 @@ static int llog_cat_new_log(const struct lu_env *env, spin_lock(&loghandle->lgh_hdr_lock); llh->llh_count++; - if (ext2_set_bit(index, llh->llh_bitmap)) { + rc = ext2_set_bit(index, llh->llh_bitmap); + spin_unlock(&loghandle->lgh_hdr_lock); + if (rc) { CERROR("argh, index %u already set in log bitmap?\n", index); - spin_unlock(&loghandle->lgh_hdr_lock); LBUG(); /* should never happen */ } - spin_unlock(&loghandle->lgh_hdr_lock); cathandle->lgh_last_idx = index; llh->llh_tail.lrt_index = index; -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] staging: lustre/lustre/obdclass/llog_cat.c: get rid of sparse context imbalance warning
The second patch is better (it also keeps the lock locked shorter.) Do I need to resend? On Tue, Jun 2, 2015 at 11:42 PM, Sudip Mukherjee wrote: > On Tue, Jun 02, 2015 at 12:57:20PM -0700, Tolga Ceylan wrote: >> In llog_cat_new_log(), sparse emits a context imbalance (unexpected lock) >> warning due its inability to detect the noreturn attribute in >> lbug_with_lock() function inside LBUG macro. Adding a never reached >> return statement suppresses this warning. > but adding a statement which never executes, is that the correct solution? > what about : > > diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c > b/drivers/staging/lustre/lustre/obdclass/llog_cat.c > index c8f6ab0..1cb3495 100644 > --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c > +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c > @@ -103,13 +103,12 @@ static int llog_cat_new_log(const struct lu_env *env, > > spin_lock(&loghandle->lgh_hdr_lock); > llh->llh_count++; > - if (ext2_set_bit(index, llh->llh_bitmap)) { > - CERROR("argh, index %u already set in log bitmap?\n", > - index); > - spin_unlock(&loghandle->lgh_hdr_lock); > + rc = ext2_set_bit(index, llh->llh_bitmap); > + spin_unlock(&loghandle->lgh_hdr_lock); > + if (rc) { > + CERROR("argh, index %u already set in log bitmap?\n", index); > LBUG(); /* should never happen */ > } > - spin_unlock(&loghandle->lgh_hdr_lock); > > cathandle->lgh_last_idx = index; > llh->llh_tail.lrt_index = index; > > > regards > sudip > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] staging: lustre/lustre/obdclass/llog_cat.c: get rid of sparse context imbalance warning
In llog_cat_new_log(), sparse emits a context imbalance (unexpected lock) warning due its inability to detect the noreturn attribute in lbug_with_lock() function inside LBUG macro. Adding a never reached return statement suppresses this warning. Signed-off-by: Tolga Ceylan --- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index c8f6ab0..259947c 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -108,6 +108,7 @@ static int llog_cat_new_log(const struct lu_env *env, index); spin_unlock(&loghandle->lgh_hdr_lock); LBUG(); /* should never happen */ + return -EINVAL; } spin_unlock(&loghandle->lgh_hdr_lock); -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] staging: rtl8192u/ieee80211/ieee80211_softmac.c: auth parse error code byte order fix
auth_parse() return result is in incorrect le16 byte order. Currently this still works since the user code merely checks if error code is equal to 0. However debug statement in ieee80211_check_auth_response() prints the error code in the incorrect le16 byte order. This fix corrects the byte order as cpu order. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d2e8b12..0cf0e89 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1558,7 +1558,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen) } } - return cpu_to_le16(a->status); + return le16_to_cpu(a->status); } -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] drivers: staging: rtl8192u: ieee80211: ieee80211_softmac.c: auth parse error code byte order fix
I appreciate the suggestions. I simply grepped this piece of code by chance while looking at an actual sparse warning somewhere else. There's no symptoms and I'm not sure under what conditions this debug statement is printed nor why/when. But this is an obviously buggy code only impacting debug/trace statements, but it could become more serious if/when someone wants to rely on this return code in the future. I'll expand the terse description and resubmit. Cheers, Tolga -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] drivers: staging: unisys: visorbus: visorchipset.c: private functions should be declared static
On 05/15/2015 09:22 PM, Tolga Ceylan wrote: visorchipset_file_init() and visorchipset_file_cleanup() functions do not seem to be used from anywhere else and now are declared as static. Sparse emitted "not declared" warnings for these two functions. Signed-off-by: Tolga Ceylan --- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index ca22f49..66ae3d0 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -2351,7 +2351,7 @@ static const struct file_operations visorchipset_fops = { .mmap = visorchipset_mmap, }; -int +static int visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel) { int rc = 0; @@ -2460,7 +2460,7 @@ cleanup: return rc; } -void +static void visorchipset_file_cleanup(dev_t major_dev) { if (file_cdev.ops) I haven't received a response for this patch. Just checking back. Regards, Tolga Ceylan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] drivers: staging: rtl8192u: ieee80211: ieee80211_softmac.c: auth parse error code byte order fix
On 05/12/2015 08:55 PM, Tolga Ceylan wrote: Error code returned from auth_parse() should in cpu byte order. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d2e8b12..0cf0e89 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1558,7 +1558,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen) } } - return cpu_to_le16(a->status); + return le16_to_cpu(a->status); } I haven't gotten a response for this patch. Just checking back. Regards, Tolga Ceylan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] drivers: staging: unisys: visorbus: visorchipset.c: private functions should be declared static
visorchipset_file_init() and visorchipset_file_cleanup() functions do not seem to be used from anywhere else and now are declared as static. Sparse emitted "not declared" warnings for these two functions. Signed-off-by: Tolga Ceylan --- drivers/staging/unisys/visorbus/visorchipset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index ca22f49..66ae3d0 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -2351,7 +2351,7 @@ static const struct file_operations visorchipset_fops = { .mmap = visorchipset_mmap, }; -int +static int visorchipset_file_init(dev_t major_dev, struct visorchannel **controlvm_channel) { int rc = 0; @@ -2460,7 +2460,7 @@ cleanup: return rc; } -void +static void visorchipset_file_cleanup(dev_t major_dev) { if (file_cdev.ops) -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] drivers: staging: comedi: drivers: ni_mio_common.c: removed no-effect right hand operand
In ni_ai_cmd() bitwise or construction of ai_trig in case of TRIG_NOW is faulty. Register address is accidentally in the expression, but this has no effect. This is an accidental left-over code that used to call a function with register address as one of the arguments. Signed-off-by: Tolga Ceylan --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index c741dde..9dfd4e6 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -2268,8 +2268,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) case TRIG_INT: case TRIG_NOW: ai_trig |= NISTC_AI_TRIG_START1_EDGE | - NISTC_AI_TRIG_START1_SEL(0), - NISTC_AI_TRIG_SEL_REG; + NISTC_AI_TRIG_START1_SEL(0); break; case TRIG_EXT: ai_trig |= NISTC_AI_TRIG_START1_SEL(CR_CHAN(cmd->start_arg) + -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] drivers: staging: rtl8192u: ieee80211: ieee80211_softmac.c: auth parse error code byte order fix
Error code returned from auth_parse() should in cpu byte order. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index d2e8b12..0cf0e89 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1558,7 +1558,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen) } } - return cpu_to_le16(a->status); + return le16_to_cpu(a->status); } -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] drivers: staging: rtl8192e: rtllib_softmac.c: auth parse error code byte order fix
Error code returned from auth_parse() should in cpu byte order. Issue caught by sparse warning: cast from restricted __le16. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192e/rtllib_softmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 8f5e88b..98afd3b 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -1814,7 +1814,7 @@ static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen) return -ENOMEM; } } - return cpu_to_le16(a->status); + return le16_to_cpu(a->status); } static int auth_rq_parse(struct sk_buff *skb, u8 *dest) -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] drivers: staging: fbtft: fbtft-core.c: Fix different address space warning
To fix sparse warning of incorrect type when calling vfree() (different address space), added annotation __force. Signed-off-by: Tolga Ceylan --- drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index ce64521..931f338 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -920,7 +920,7 @@ EXPORT_SYMBOL(fbtft_framebuffer_alloc); void fbtft_framebuffer_release(struct fb_info *info) { fb_deferred_io_cleanup(info); - vfree(info->screen_base); + vfree((void __force *)info->screen_base); framebuffer_release(info); } EXPORT_SYMBOL(fbtft_framebuffer_release); -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] drivers: staging: fbtft: fbtft-bus.c: Fix different address space warning on I/O mem
To fix sparse warning of incorrect type in assignment (different address space), added annotation __iomem to vmem8 and modified direct reads with ioread8(). Signed-off-by: Tolga Ceylan --- drivers/staging/fbtft/fbtft-bus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-bus.c b/drivers/staging/fbtft/fbtft-bus.c index 52af9cb..e0acd3f 100644 --- a/drivers/staging/fbtft/fbtft-bus.c +++ b/drivers/staging/fbtft/fbtft-bus.c @@ -184,7 +184,7 @@ EXPORT_SYMBOL(fbtft_write_vmem16_bus8); /* 16 bit pixel over 9-bit SPI bus: dc + high byte, dc + low byte */ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len) { - u8 *vmem8; + u8 __iomem *vmem8; u16 *txbuf16 = par->txbuf.buf; size_t remain; size_t to_copy; @@ -212,12 +212,12 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len) #ifdef __LITTLE_ENDIAN for (i = 0; i < to_copy; i += 2) { - txbuf16[i] = 0x0100 | vmem8[i+1]; - txbuf16[i+1] = 0x0100 | vmem8[i]; + txbuf16[i] = 0x0100 | ioread8(vmem8 + i + 1); + txbuf16[i + 1] = 0x0100 | ioread8(vmem8 + i); } #else for (i = 0; i < to_copy; i++) - txbuf16[i] = 0x0100 | vmem8[i]; + txbuf16[i] = 0x0100 | ioread8(vmem8 + i); #endif vmem8 = vmem8 + to_copy; ret = par->fbtftops.write(par, par->txbuf.buf, to_copy*2); -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] Staging: fbtft: fb_ssd1331: replaced C99 comments with C89
On Sun, Mar 1, 2015 at 5:18 PM, Greg Kroah-Hartman wrote: > On Fri, Feb 27, 2015 at 09:44:42PM -0800, Tolga Ceylan wrote: >> Replaced C99 '//' comments with C89 '/**/' >> >> Signed-off-by: Tolga Ceylan >> --- >> drivers/staging/fbtft/fb_ssd1331.c | 30 +++--- >> 1 file changed, 15 insertions(+), 15 deletions(-) > > Doesn't apply to my tree :( Ahh, I see it in staging. It's already patched. :-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: fbtft: fb_ssd1331: replaced C99 comments with C89
Replaced C99 '//' comments with C89 '/**/' Signed-off-by: Tolga Ceylan --- drivers/staging/fbtft/fb_ssd1331.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c index da7464f..c4e1dd7 100644 --- a/drivers/staging/fbtft/fb_ssd1331.c +++ b/drivers/staging/fbtft/fb_ssd1331.c @@ -29,24 +29,24 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0xae); /* Display Off */ write_reg(par, 0xa0, 0x70 | (par->bgr << 2)); /* Set Colour Depth */ - write_reg(par, 0x72); // RGB colour + write_reg(par, 0x72); /* RGB colour */ write_reg(par, 0xa1, 0x00); /* Set Display Start Line */ write_reg(par, 0xa2, 0x00); /* Set Display Offset */ write_reg(par, 0xa4); /* NORMALDISPLAY */ - write_reg(par, 0xa8, 0x3f); // Set multiplex - write_reg(par, 0xad, 0x8e); // Set master - // write_reg(par, 0xb0, 0x0b); // Set power mode - write_reg(par, 0xb1, 0x31); // Precharge - write_reg(par, 0xb3, 0xf0); // Clock div - write_reg(par, 0x8a, 0x64); // Precharge A - write_reg(par, 0x8b, 0x78); // Precharge B - write_reg(par, 0x8c, 0x64); // Precharge C - write_reg(par, 0xbb, 0x3a); // Precharge level - write_reg(par, 0xbe, 0x3e); // vcomh - write_reg(par, 0x87, 0x06); // Master current - write_reg(par, 0x81, 0x91); // Contrast A - write_reg(par, 0x82, 0x50); // Contrast B - write_reg(par, 0x83, 0x7d); // Contrast C + write_reg(par, 0xa8, 0x3f); /* Set multiplex */ + write_reg(par, 0xad, 0x8e); /* Set master */ + /* write_reg(par, 0xb0, 0x0b); */ /* Set power mode */ + write_reg(par, 0xb1, 0x31); /* Precharge */ + write_reg(par, 0xb3, 0xf0); /* Clock div */ + write_reg(par, 0x8a, 0x64); /* Precharge A */ + write_reg(par, 0x8b, 0x78); /* Precharge B */ + write_reg(par, 0x8c, 0x64); /* Precharge C */ + write_reg(par, 0xbb, 0x3a); /* Precharge level */ + write_reg(par, 0xbe, 0x3e); /* vcomh */ + write_reg(par, 0x87, 0x06); /* Master current */ + write_reg(par, 0x81, 0x91); /* Contrast A */ + write_reg(par, 0x82, 0x50); /* Contrast B */ + write_reg(par, 0x83, 0x7d); /* Contrast C */ write_reg(par, 0xaf); /* Set Sleep Mode Display On */ return 0; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] Staging: fbtft: fb_ssd1331: replaced C99 comments with C89
On Fri, Feb 27, 2015 at 9:37 PM, Tolga Ceylan wrote: > Replaced C99 '//' comments with C89 '/**/' > > Signed-off-by: Tolga Ceylan > --- > drivers/staging/fbtft/fb_ssd1331.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/fbtft/fb_ssd1331.c > b/drivers/staging/fbtft/fb_ssd1331.c > index da7464f..5cbd763 100644 > --- a/drivers/staging/fbtft/fb_ssd1331.c > +++ b/drivers/staging/fbtft/fb_ssd1331.c > @@ -29,24 +29,24 @@ static int init_display(struct fbtft_par *par) > > write_reg(par, 0xae); /* Display Off */ > write_reg(par, 0xa0, 0x70 | (par->bgr << 2)); /* Set Colour Depth */ > - write_reg(par, 0x72); // RGB colour > + write_reg(par, 0x72); /* RGB colour */ > write_reg(par, 0xa1, 0x00); /* Set Display Start Line */ > write_reg(par, 0xa2, 0x00); /* Set Display Offset */ > write_reg(par, 0xa4); /* NORMALDISPLAY */ > - write_reg(par, 0xa8, 0x3f); // Set multiplex > - write_reg(par, 0xad, 0x8e); // Set master > - // write_reg(par, 0xb0, 0x0b); // Set power mode > - write_reg(par, 0xb1, 0x31); // Precharge > - write_reg(par, 0xb3, 0xf0); // Clock div > - write_reg(par, 0x8a, 0x64); // Precharge A > - write_reg(par, 0x8b, 0x78); // Precharge B > - write_reg(par, 0x8c, 0x64); // Precharge C > - write_reg(par, 0xbb, 0x3a); // Precharge level > - write_reg(par, 0xbe, 0x3e); // vcomh > - write_reg(par, 0x87, 0x06); // Master current > - write_reg(par, 0x81, 0x91); // Contrast A > - write_reg(par, 0x82, 0x50); // Contrast B > - write_reg(par, 0x83, 0x7d); // Contrast C > + write_reg(par, 0xa8, 0x3f); /* Set multiplex > + write_reg(par, 0xad, 0x8e); /* Set master > + /* write_reg(par, 0xb0, 0x0b); */ /* Set power mode */ > + write_reg(par, 0xb1, 0x31); /* Precharge */ > + write_reg(par, 0xb3, 0xf0); /* Clock div */ > + write_reg(par, 0x8a, 0x64); /* Precharge A */ > + write_reg(par, 0x8b, 0x78); /* Precharge B */ > + write_reg(par, 0x8c, 0x64); /* Precharge C */ > + write_reg(par, 0xbb, 0x3a); /* Precharge level */ > + write_reg(par, 0xbe, 0x3e); /* vcomh */ > + write_reg(par, 0x87, 0x06); /* Master current */ > + write_reg(par, 0x81, 0x91); /* Contrast A */ > + write_reg(par, 0x82, 0x50); /* Contrast B */ > + write_reg(par, 0x83, 0x7d); /* Contrast C */ > write_reg(par, 0xaf); /* Set Sleep Mode Display On */ > > return 0; > -- > 2.3.0 > Apologies, please ignore this patch. It is faulty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: fbtft: fb_ssd1331: replaced C99 comments with C89
Replaced C99 '//' comments with C89 '/**/' Signed-off-by: Tolga Ceylan --- drivers/staging/fbtft/fb_ssd1331.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/staging/fbtft/fb_ssd1331.c b/drivers/staging/fbtft/fb_ssd1331.c index da7464f..5cbd763 100644 --- a/drivers/staging/fbtft/fb_ssd1331.c +++ b/drivers/staging/fbtft/fb_ssd1331.c @@ -29,24 +29,24 @@ static int init_display(struct fbtft_par *par) write_reg(par, 0xae); /* Display Off */ write_reg(par, 0xa0, 0x70 | (par->bgr << 2)); /* Set Colour Depth */ - write_reg(par, 0x72); // RGB colour + write_reg(par, 0x72); /* RGB colour */ write_reg(par, 0xa1, 0x00); /* Set Display Start Line */ write_reg(par, 0xa2, 0x00); /* Set Display Offset */ write_reg(par, 0xa4); /* NORMALDISPLAY */ - write_reg(par, 0xa8, 0x3f); // Set multiplex - write_reg(par, 0xad, 0x8e); // Set master - // write_reg(par, 0xb0, 0x0b); // Set power mode - write_reg(par, 0xb1, 0x31); // Precharge - write_reg(par, 0xb3, 0xf0); // Clock div - write_reg(par, 0x8a, 0x64); // Precharge A - write_reg(par, 0x8b, 0x78); // Precharge B - write_reg(par, 0x8c, 0x64); // Precharge C - write_reg(par, 0xbb, 0x3a); // Precharge level - write_reg(par, 0xbe, 0x3e); // vcomh - write_reg(par, 0x87, 0x06); // Master current - write_reg(par, 0x81, 0x91); // Contrast A - write_reg(par, 0x82, 0x50); // Contrast B - write_reg(par, 0x83, 0x7d); // Contrast C + write_reg(par, 0xa8, 0x3f); /* Set multiplex + write_reg(par, 0xad, 0x8e); /* Set master + /* write_reg(par, 0xb0, 0x0b); */ /* Set power mode */ + write_reg(par, 0xb1, 0x31); /* Precharge */ + write_reg(par, 0xb3, 0xf0); /* Clock div */ + write_reg(par, 0x8a, 0x64); /* Precharge A */ + write_reg(par, 0x8b, 0x78); /* Precharge B */ + write_reg(par, 0x8c, 0x64); /* Precharge C */ + write_reg(par, 0xbb, 0x3a); /* Precharge level */ + write_reg(par, 0xbe, 0x3e); /* vcomh */ + write_reg(par, 0x87, 0x06); /* Master current */ + write_reg(par, 0x81, 0x91); /* Contrast A */ + write_reg(par, 0x82, 0x50); /* Contrast B */ + write_reg(par, 0x83, 0x7d); /* Contrast C */ write_reg(par, 0xaf); /* Set Sleep Mode Display On */ return 0; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: fbtft: fbtft-core: removed space before ','
Removed space before ',' Signed-off-by: Tolga Ceylan --- drivers/staging/fbtft/fbtft-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c index 37dcf7e..ac4287f 100644 --- a/drivers/staging/fbtft/fbtft-core.c +++ b/drivers/staging/fbtft/fbtft-core.c @@ -49,7 +49,7 @@ extern int fbtft_gamma_parse_str(struct fbtft_par *par, unsigned long *curves, const char *str, int size); static unsigned long debug; -module_param(debug, ulong , 0); +module_param(debug, ulong, 0); MODULE_PARM_DESC(debug, "override device debug level"); static bool dma = true; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: rtl8192u: r8192U_wx: removed unnecessary comments
1) Removed commented out include header statement 2) Removed unnecessary author/date comment Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r8192U_wx.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_wx.h b/drivers/staging/rtl8192u/r8192U_wx.h index ae7a617..e926d37 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.h +++ b/drivers/staging/rtl8192u/r8192U_wx.h @@ -14,10 +14,9 @@ #ifndef R8180_WX_H #define R8180_WX_H -//#include extern struct iw_handler_def r8192_wx_handlers_def; -/* Enable the rtl819x_core.c to share this function, david 2008.9.22 */ +/* Enable the rtl819x_core.c to share this function */ extern struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev); #endif -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/3] Staging: rtl8192u: ieee80211: dot11d: added parenthesis to RESET_CIE_WATCHDOG macro
Added parenthesis to RESET_CIE_WATCHDOG macro to resolve checkpatch error. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h b/drivers/staging/rtl8192u/ieee80211/dot11d.h index bd75e29..8ae673b 100644 --- a/drivers/staging/rtl8192u/ieee80211/dot11d.h +++ b/drivers/staging/rtl8192u/ieee80211/dot11d.h @@ -53,7 +53,7 @@ typedef struct _RT_DOT11D_INFO { #define CIE_WATCHDOG_TH 1 #define GET_CIE_WATCHDOG(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog) -#define RESET_CIE_WATCHDOG(__pIeeeDev) GET_CIE_WATCHDOG(__pIeeeDev) = 0 +#define RESET_CIE_WATCHDOG(__pIeeeDev) (GET_CIE_WATCHDOG(__pIeeeDev) = 0) #define UPDATE_CIE_WATCHDOG(__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev)) #define IS_DOT11D_STATE_DONE(__pIeeeDev) (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] Staging: rtl8192u: ieee80211: ieee80211_crypt: removed commented out include
Removed a commented out header include Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c index 5533221..b41aec1 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c @@ -11,7 +11,6 @@ * */ -//#include #include #include #include -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] Staging: rtl8192u: ieee80211: rtl819x_TS: replaced C99 comments with C89
Replaced C99 comments with C89 while maintaining less than 80 char lines. Removed commented out struct member: DLRecord. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h index 7ed7243..811e6e3 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h @@ -1,14 +1,14 @@ #ifndef _TSTYPE_H_ #define _TSTYPE_H_ #include "rtl819x_Qos.h" -#define TS_SETUP_TIMEOUT 60 // In millisecond +#define TS_SETUP_TIMEOUT 60 /* In millisecond */ #define TS_INACT_TIMEOUT 60 #define TS_ADDBA_DELAY 60 #define TOTAL_TS_NUM 16 #define TCLAS_NUM 4 -// This define the Tx/Rx directions +/* This define the Tx/Rx directions */ typedef enum _TR_SELECT { TX_DIR = 0, RX_DIR = 1, @@ -28,9 +28,10 @@ typedef struct _TS_COMMON_INFO{ typedef struct _TX_TS_RECORD{ TS_COMMON_INFO TsCommonInfo; u16 TxCurSeq; - BA_RECORD TxPendingBARecord; // For BA Originator - BA_RECORD TxAdmittedBARecord; // For BA Originator -// QOS_DL_RECORD DLRecord; + /* For BA Originator */ + BA_RECORD TxPendingBARecord; + /* For BA Originator */ + BA_RECORD TxAdmittedBARecord; u8 bAddBaReqInProgress; u8 bAddBaReqDelayed; u8 bUsingBa; @@ -44,11 +45,11 @@ typedef struct _RX_TS_RECORD { u16 RxTimeoutIndicateSeq; struct list_headRxPendingPktList; struct timer_list RxPktPendingTimer; - BA_RECORD RxAdmittedBARecord; // For BA Recipient + /* For BA Recipient */ + BA_RECORD RxAdmittedBARecord; u16 RxLastSeqNum; u8 RxLastFragNum; u8 num; -// QOS_DL_RECORD DLRecord; } RX_TS_RECORD, *PRX_TS_RECORD; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
On Fri, Feb 20, 2015 at 11:47 AM, Tolga Ceylan wrote: > On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches wrote: >> >> Might as well remove the unnecessary cast too: >> >> memcpy(skb->cb, &dev, sizeof(dev)); >> >> but it might be better to avoid the memcpy and use an assign >> >> *(struct net_device *)skb->cb = dev; >> > Should I sent a new set of patches (including memcpy change)? Or reply to the series with a single memcpy change patch? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches wrote: > > Might as well remove the unnecessary cast too: > > memcpy(skb->cb, &dev, sizeof(dev)); > > but it might be better to avoid the memcpy and use an assign > > *(struct net_device *)skb->cb = dev; > I'll submit another patch for the memcpy change. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/4] Staging: rtl8192u: r819xU_firmware: removed commented out assert
Removed an assert that was commented out. The comment provides no documentation value as rt_status is properly handled. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r819xU_firmware.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c index 9d0067e..6a818c4 100644 --- a/drivers/staging/rtl8192u/r819xU_firmware.c +++ b/drivers/staging/rtl8192u/r819xU_firmware.c @@ -329,8 +329,6 @@ bool init_firmware(struct net_device *dev) } RT_TRACE(COMP_FIRMWARE, "Firmware Download Success\n"); - //assert(pfirmware->firmware_status == FW_STATUS_5_READY, ("Firmware Download Fail\n")); - return rt_status; download_firmware_fail: -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/4] Staging: rtl9182u: r819xU_firmware: Replaced C99 comments with C89
Replaced C99 comments with C89. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r819xU_firmware.c | 33 +++--- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c index 6a818c4..e7b2f33 100644 --- a/drivers/staging/rtl8192u/r819xU_firmware.c +++ b/drivers/staging/rtl8192u/r819xU_firmware.c @@ -47,7 +47,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u8 index; firmware_init_param(dev); - //Fragmentation might be required + /* Fragmentation might be required */ frag_threshold = pfirmware->cmdpacket_frag_thresold; do { if ((buffer_len - frag_offset) > frag_threshold) { @@ -106,19 +106,20 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, } -//- -// Procedure:Check whether main code is download OK. If OK, turn on CPU -// -// Description: CPU register locates in different page against general register. -// Switch to CPU register in the begin and switch back before return -// -// -// Arguments: The pointer of the adapter -// -// Returns: -//NDIS_STATUS_FAILURE - the following initialization process should be terminated -//NDIS_STATUS_SUCCESS - if firmware initialization process success -//- +/* + * Procedure: Check whether main code is download OK. If OK, turn on CPU + * + * Description:CPU register locates in different page against general register. + * Switch to CPU register in the begin and switch back before return + * + * + * Arguments: The pointer of the adapter + * + * Returns: + *NDIS_STATUS_FAILURE - the following initialization process should + * be terminated + *NDIS_STATUS_SUCCESS - if firmware initialization process success + */ static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) { boolrt_status = true; @@ -221,7 +222,7 @@ bool init_firmware(struct net_device *dev) /* it is called by reset */ rst_opt = OPT_SYSTEM_RESET; starting_state = FW_INIT_STEP0_BOOT; - // TODO: system reset + /* TODO: system reset */ } else if (pfirmware->firmware_status == FW_STATUS_5_READY) { /* it is called by Initialize */ @@ -290,7 +291,7 @@ bool init_firmware(struct net_device *dev) * will set polling bit when firmware code is also configured */ pfirmware->firmware_status = FW_STATUS_1_MOVE_BOOT_CODE; - //mdelay(1000); + /* mdelay(1000); */ /* * To initialize IMEM, CPU move code from 0x8080, * hence, we send 0x80 byte packet -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/4] Staging: rtl8192u: r819xU_firmware: removed commented out variable
Removed commented out variable Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r819xU_firmware.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c index c230be2..9d0067e 100644 --- a/drivers/staging/rtl8192u/r819xU_firmware.c +++ b/drivers/staging/rtl8192u/r819xU_firmware.c @@ -37,7 +37,6 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, boolrt_status = true; u16 frag_threshold; u16 frag_length, frag_offset = 0; - //u16 total_size; int i; rt_firmware *pfirmware = priv->pFirmware; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma
Resolved space required after that ',' errors reported by checkpatch. Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r819xU_firmware.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c index e7b2f33..8e7fe82 100644 --- a/drivers/staging/rtl8192u/r819xU_firmware.c +++ b/drivers/staging/rtl8192u/r819xU_firmware.c @@ -66,7 +66,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, skb = dev_alloc_skb(USB_HWDESC_HEADER_LEN + frag_length + 4); if (!skb) return false; - memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); + memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev)); tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); tcb_desc->queue_index = TXCMD_QUEUE; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT; @@ -91,7 +91,7 @@ static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, if (!priv->ieee80211->check_nic_enough_desc(dev, index) || (!skb_queue_empty(&priv->ieee80211->skb_waitQ[index])) || (priv->ieee80211->queue_stop)) { - RT_TRACE(COMP_FIRMWARE,"=> tx full!\n"); + RT_TRACE(COMP_FIRMWARE, "=> tx full!\n"); skb_queue_tail(&priv->ieee80211->skb_waitQ[tcb_desc->queue_index], skb); } else { priv->ieee80211->softmac_hard_start_xmit(skb, dev); @@ -242,7 +242,8 @@ bool init_firmware(struct net_device *dev) * or read image file from array. Default load from IMG file */ if (rst_opt == OPT_SYSTEM_RESET) { - rc = request_firmware(&fw_entry, fw_name[init_step],&priv->udev->dev); + rc = request_firmware(&fw_entry, fw_name[init_step], + &priv->udev->dev); if (rc < 0) { RT_TRACE(COMP_ERR, "request firmware fail!\n"); goto download_firmware_fail; @@ -254,12 +255,14 @@ bool init_firmware(struct net_device *dev) } if (init_step != FW_INIT_STEP1_MAIN) { - memcpy(pfirmware->firmware_buf,fw_entry->data,fw_entry->size); + memcpy(pfirmware->firmware_buf, fw_entry->data, + fw_entry->size); mapped_file = pfirmware->firmware_buf; file_length = fw_entry->size; } else { memset(pfirmware->firmware_buf, 0, 128); - memcpy(&pfirmware->firmware_buf[128],fw_entry->data,fw_entry->size); + memcpy(&pfirmware->firmware_buf[128], + fw_entry->data, fw_entry->size); mapped_file = pfirmware->firmware_buf; file_length = fw_entry->size + 128; } @@ -319,7 +322,9 @@ bool init_firmware(struct net_device *dev) rt_status = CPUcheck_firmware_ready(dev); if (rt_status != TRUE) { - RT_TRACE(COMP_ERR, "CPUcheck_firmware_ready fail(%d)!\n",rt_status); + RT_TRACE(COMP_ERR, +"CPUcheck_firmware_ready fail(%d)!\n", +rt_status); goto download_firmware_fail; } -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/2] Staging: i2o: i2o_block: Fixed coding style issue
1) Spaces prohibited after that '&' 2) No space is necessary after a cast Signed-off-by: Tolga Ceylan --- drivers/staging/i2o/i2o_block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/i2o/i2o_block.c b/drivers/staging/i2o/i2o_block.c index 9164569..a8f9489 100644 --- a/drivers/staging/i2o/i2o_block.c +++ b/drivers/staging/i2o/i2o_block.c @@ -838,8 +838,8 @@ static int i2o_block_transfer(struct request *req) *mptr++ = cpu_to_le32(scsi_flags); - *((u32 *) & cmd[2]) = cpu_to_be32(blk_rq_pos(req) * hwsec); - *((u16 *) & cmd[7]) = cpu_to_be16(blk_rq_sectors(req) * hwsec); + *((u32 *)&cmd[2]) = cpu_to_be32(blk_rq_pos(req) * hwsec); + *((u16 *)&cmd[7]) = cpu_to_be16(blk_rq_sectors(req) * hwsec); memcpy(mptr, cmd, 10); mptr += 4; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/2] Staging: i2o: i2o_block: Fixed coding style issue
"u32 ** mptr" should be "u32 **mptr" Signed-off-by: Tolga Ceylan --- drivers/staging/i2o/i2o_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/i2o/i2o_block.c b/drivers/staging/i2o/i2o_block.c index 0a13c64..9164569 100644 --- a/drivers/staging/i2o/i2o_block.c +++ b/drivers/staging/i2o/i2o_block.c @@ -315,7 +315,7 @@ static inline void i2o_block_request_free(struct i2o_block_request *ireq) */ static inline int i2o_block_sglist_alloc(struct i2o_controller *c, struct i2o_block_request *ireq, -u32 ** mptr) +u32 **mptr) { int nents; enum dma_data_direction direction; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: i2o: i2o_scsi: Fixed coding style issue
Removed assignment in if condition Signed-off-by: Tolga Ceylan --- drivers/staging/i2o/i2o_scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/i2o/i2o_scsi.c b/drivers/staging/i2o/i2o_scsi.c index 1b11dcb..f320366 100644 --- a/drivers/staging/i2o/i2o_scsi.c +++ b/drivers/staging/i2o/i2o_scsi.c @@ -750,7 +750,8 @@ static int i2o_scsi_bios_param(struct scsi_device *sdev, size = capacity; ip[0] = 64; /* heads*/ ip[1] = 32; /* sectors */ - if ((ip[2] = size >> 11) > 1024) { /* cylinders, test for big disk */ + ip[2] = size >> 11; + if (ip[2] > 1024) { /* cylinders, test for big disk */ ip[0] = 255;/* heads*/ ip[1] = 63; /* sectors */ ip[2] = size / (255 * 63); /* cylinders */ -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/3] Staging: iio: meter: ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict: Lines over 80 characters were fixed Signed-off-by: Tolga Ceylan --- drivers/staging/iio/meter/ade7854-i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c index 85a7e84..5e6fbe4 100644 --- a/drivers/staging/iio/meter/ade7854-i2c.c +++ b/drivers/staging/iio/meter/ade7854-i2c.c @@ -195,7 +195,8 @@ static int ade7854_i2c_read_reg_32(struct device *dev, if (ret) goto out; - *val = (st->rx[0] << 24) | (st->rx[1] << 16) | (st->rx[2] << 8) | st->rx[3]; + *val = (st->rx[0] << 24) | (st->rx[1] << 16) | + (st->rx[2] << 8) | st->rx[3]; out: mutex_unlock(&st->buf_lock); return ret; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/3] Staging: iio: meter: ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict: Alignment should match open paranthesis cases corrected Signed-off-by: Tolga Ceylan --- drivers/staging/iio/meter/ade7854-i2c.c | 34 - 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c index 5b33c7f..85a7e84 100644 --- a/drivers/staging/iio/meter/ade7854-i2c.c +++ b/drivers/staging/iio/meter/ade7854-i2c.c @@ -16,8 +16,8 @@ #include "ade7854.h" static int ade7854_i2c_write_reg_8(struct device *dev, - u16 reg_address, - u8 value) + u16 reg_address, + u8 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -35,8 +35,8 @@ static int ade7854_i2c_write_reg_8(struct device *dev, } static int ade7854_i2c_write_reg_16(struct device *dev, - u16 reg_address, - u16 value) + u16 reg_address, + u16 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -55,8 +55,8 @@ static int ade7854_i2c_write_reg_16(struct device *dev, } static int ade7854_i2c_write_reg_24(struct device *dev, - u16 reg_address, - u32 value) + u16 reg_address, + u32 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -76,8 +76,8 @@ static int ade7854_i2c_write_reg_24(struct device *dev, } static int ade7854_i2c_write_reg_32(struct device *dev, - u16 reg_address, - u32 value) + u16 reg_address, + u32 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -98,8 +98,8 @@ static int ade7854_i2c_write_reg_32(struct device *dev, } static int ade7854_i2c_read_reg_8(struct device *dev, - u16 reg_address, - u8 *val) + u16 reg_address, + u8 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -124,8 +124,8 @@ out: } static int ade7854_i2c_read_reg_16(struct device *dev, - u16 reg_address, - u16 *val) + u16 reg_address, + u16 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -150,8 +150,8 @@ out: } static int ade7854_i2c_read_reg_24(struct device *dev, - u16 reg_address, - u32 *val) + u16 reg_address, + u32 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -176,8 +176,8 @@ out: } static int ade7854_i2c_read_reg_32(struct device *dev, - u16 reg_address, - u32 *val) + u16 reg_address, + u32 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -202,7 +202,7 @@ out: } static int ade7854_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +const struct i2c_device_id *id) { int ret; struct ade7854_state *st; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/3] Staging: iio: meter: ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict: Comparison to NULL rewritten as !indio_dev Signed-off-by: Tolga Ceylan --- drivers/staging/iio/meter/ade7854-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c index 5e6fbe4..4e7a382 100644 --- a/drivers/staging/iio/meter/ade7854-i2c.c +++ b/drivers/staging/iio/meter/ade7854-i2c.c @@ -210,7 +210,7 @@ static int ade7854_i2c_probe(struct i2c_client *client, struct iio_dev *indio_dev; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); - if (indio_dev == NULL) + if (!indio_dev) return -ENOMEM; st = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/5] Staging: gdm724x: code style improvements
In memory allocation (kzalloc, kmalloc) arguments sizeof(struct foo) rewritten as sizeof(*foo_obj). Signed-off-by: Tolga Ceylan --- drivers/staging/gdm724x/gdm_mux.c | 8 drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/staging/gdm724x/gdm_usb.c | 10 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index b025a49..522f3cd 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -67,7 +67,7 @@ static struct mux_tx *alloc_mux_tx(int len) { struct mux_tx *t = NULL; - t = kzalloc(sizeof(struct mux_tx), GFP_ATOMIC); + t = kzalloc(sizeof(*t), GFP_ATOMIC); if (!t) return NULL; @@ -96,7 +96,7 @@ static struct mux_rx *alloc_mux_rx(void) { struct mux_rx *r = NULL; - r = kzalloc(sizeof(struct mux_rx), GFP_KERNEL); + r = kzalloc(sizeof(*r), GFP_KERNEL); if (!r) return NULL; @@ -529,11 +529,11 @@ static int gdm_mux_probe(struct usb_interface *intf, if (bInterfaceNumber != 2) return -ENODEV; - mux_dev = kzalloc(sizeof(struct mux_dev), GFP_KERNEL); + mux_dev = kzalloc(sizeof(*mux_dev), GFP_KERNEL); if (!mux_dev) return -ENOMEM; - tty_dev = kzalloc(sizeof(struct tty_dev), GFP_KERNEL); + tty_dev = kzalloc(sizeof(*tty_dev), GFP_KERNEL); if (!tty_dev) { ret = -ENOMEM; goto err_free_mux; diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index b593525..3b9bf07 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -226,7 +226,7 @@ int register_lte_tty_device(struct tty_dev *tty_dev, struct device *device) for (i = 0; i < TTY_MAX_COUNT; i++) { - gdm = kmalloc(sizeof(struct gdm), GFP_KERNEL); + gdm = kmalloc(sizeof(*gdm), GFP_KERNEL); if (!gdm) return -ENOMEM; diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging/gdm724x/gdm_usb.c index 36fe1b4..e81b266 100644 --- a/drivers/staging/gdm724x/gdm_usb.c +++ b/drivers/staging/gdm724x/gdm_usb.c @@ -92,7 +92,7 @@ static struct usb_tx *alloc_tx_struct(int len) struct usb_tx *t = NULL; int ret = 0; - t = kzalloc(sizeof(struct usb_tx), GFP_ATOMIC); + t = kzalloc(sizeof(*t), GFP_ATOMIC); if (!t) { ret = -ENOMEM; goto out; @@ -125,7 +125,7 @@ static struct usb_tx_sdu *alloc_tx_sdu_struct(void) { struct usb_tx_sdu *t_sdu; - t_sdu = kzalloc(sizeof(struct usb_tx_sdu), GFP_KERNEL); + t_sdu = kzalloc(sizeof(*t_sdu), GFP_KERNEL); if (!t_sdu) return NULL; @@ -183,7 +183,7 @@ static struct usb_rx *alloc_rx_struct(void) struct usb_rx *r = NULL; int ret = 0; - r = kmalloc(sizeof(struct usb_rx), GFP_KERNEL); + r = kmalloc(sizeof(*r), GFP_KERNEL); if (!r) { ret = -ENOMEM; goto out; @@ -829,11 +829,11 @@ static int gdm_usb_probe(struct usb_interface *intf, return -ENODEV; } - phy_dev = kzalloc(sizeof(struct phy_dev), GFP_KERNEL); + phy_dev = kzalloc(sizeof(*phy_dev), GFP_KERNEL); if (!phy_dev) return -ENOMEM; - udev = kzalloc(sizeof(struct lte_udev), GFP_KERNEL); + udev = kzalloc(sizeof(*udev), GFP_KERNEL); if (!udev) { ret = -ENOMEM; goto err_udev; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 5/5] Staging: gdm724x: code style improvements
Unnecessary blank lines removed Signed-off-by: Tolga Ceylan --- drivers/staging/gdm724x/gdm_endian.c | 1 - drivers/staging/gdm724x/gdm_mux.c| 5 - drivers/staging/gdm724x/gdm_tty.c| 1 - drivers/staging/gdm724x/gdm_tty.h| 1 - drivers/staging/gdm724x/hci_packet.h | 1 - 5 files changed, 9 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_endian.c b/drivers/staging/gdm724x/gdm_endian.c index f6cc90a..4044453 100644 --- a/drivers/staging/gdm724x/gdm_endian.c +++ b/drivers/staging/gdm724x/gdm_endian.c @@ -31,7 +31,6 @@ void gdm_set_endian(struct gdm_endian *ed, u8 dev_endian) ed->host_ed = ENDIANNESS_LITTLE; else ed->host_ed = ENDIANNESS_BIG; - } u16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x) diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index 522f3cd..7584d7a 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -48,7 +48,6 @@ static const struct usb_device_id id_table[] = { {} }; - MODULE_DEVICE_TABLE(usb, id_table); static int packet_type_to_index(u16 packetType) @@ -150,7 +149,6 @@ static void put_rx_struct(struct rx_cxt *rx, struct mux_rx *r) spin_unlock_irqrestore(&rx->free_list_lock, flags); } - static int up_to_host(struct mux_rx *r) { struct mux_dev *mux_dev = (struct mux_dev *)r->mux_dev; @@ -477,7 +475,6 @@ static void release_usb(struct mux_dev *mux_dev) spin_unlock_irqrestore(&rx->to_host_lock, flags); } - static int init_usb(struct mux_dev *mux_dev) { struct mux_rx *r; @@ -615,7 +612,6 @@ static int gdm_mux_suspend(struct usb_interface *intf, pm_message_t pm_msg) mux_dev->usb_state = PM_SUSPEND; - spin_lock_irqsave(&rx->submit_list_lock, flags); list_for_each_entry_safe(r, r_next, &rx->rx_submit_list, rx_submit_list) { @@ -663,7 +659,6 @@ static struct usb_driver gdm_mux_driver = { static int __init gdm_usb_mux_init(void) { - mux_rx_wq = create_workqueue("mux_rx_wq"); if (!mux_rx_wq) { pr_err("work queue create fail\n"); diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index 3b9bf07..60b52a3 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -225,7 +225,6 @@ int register_lte_tty_device(struct tty_dev *tty_dev, struct device *device) int j; for (i = 0; i < TTY_MAX_COUNT; i++) { - gdm = kmalloc(sizeof(*gdm), GFP_KERNEL); if (!gdm) return -ENOMEM; diff --git a/drivers/staging/gdm724x/gdm_tty.h b/drivers/staging/gdm724x/gdm_tty.h index 297438b..195c590 100644 --- a/drivers/staging/gdm724x/gdm_tty.h +++ b/drivers/staging/gdm724x/gdm_tty.h @@ -17,7 +17,6 @@ #include #include - #define TTY_MAX_COUNT 2 #define MAX_ISSUE_NUM 3 diff --git a/drivers/staging/gdm724x/hci_packet.h b/drivers/staging/gdm724x/hci_packet.h index 7fba8a6..46e0fc4 100644 --- a/drivers/staging/gdm724x/hci_packet.h +++ b/drivers/staging/gdm724x/hci_packet.h @@ -89,5 +89,4 @@ struct hci_connect_ind { u32 connect; } __packed; - #endif /* _HCI_PACKET_H_ */ -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/5] Staging: gdm724x: code style improvements
Alignment should match open paranthesis cases corrected Signed-off-by: Tolga Ceylan --- drivers/staging/gdm724x/gdm_lte.c | 32 drivers/staging/gdm724x/gdm_lte.h | 14 +++--- drivers/staging/gdm724x/gdm_mux.c | 5 +++-- drivers/staging/gdm724x/gdm_usb.c | 18 +- drivers/staging/gdm724x/netlink_k.c | 3 ++- drivers/staging/gdm724x/netlink_k.h | 4 ++-- 6 files changed, 39 insertions(+), 37 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index dab5ba7..2c3931b 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -162,11 +162,11 @@ static int gdm_lte_emulate_arp(struct sk_buff *skb_in, u32 nic_type) skb_reserve(skb_out, NET_IP_ALIGN); memcpy(skb_put(skb_out, mac_header_len), mac_header_data, - mac_header_len); + mac_header_len); memcpy(skb_put(skb_out, sizeof(struct arphdr)), arp_out, - sizeof(struct arphdr)); + sizeof(struct arphdr)); memcpy(skb_put(skb_out, sizeof(struct arpdata)), arp_data_out, - sizeof(struct arpdata)); + sizeof(struct arpdata)); skb_out->protocol = ((struct ethhdr *)mac_header_data)->h_proto; skb_out->dev = skb_in->dev; @@ -300,13 +300,13 @@ static int gdm_lte_emulate_ndp(struct sk_buff *skb_in, u32 nic_type) memcpy(&ipv6_out, ipv6_in, sizeof(struct ipv6hdr)); memcpy(ipv6_out.saddr.in6_u.u6_addr8, &na.target_address, 16); memcpy(ipv6_out.daddr.in6_u.u6_addr8, - ipv6_in->saddr.in6_u.u6_addr8, 16); + ipv6_in->saddr.in6_u.u6_addr8, 16); ipv6_out.payload_len = htons(sizeof(struct icmp6hdr) + sizeof(struct neighbour_advertisement)); memcpy(icmp_na, &icmp6_out, sizeof(struct icmp6hdr)); memcpy(icmp_na + sizeof(struct icmp6hdr), &na, - sizeof(struct neighbour_advertisement)); + sizeof(struct neighbour_advertisement)); icmp6_out.icmp6_cksum = icmp6_checksum(&ipv6_out, (u16 *)icmp_na, sizeof(icmp_na)); @@ -326,13 +326,13 @@ static int gdm_lte_emulate_ndp(struct sk_buff *skb_in, u32 nic_type) skb_reserve(skb_out, NET_IP_ALIGN); memcpy(skb_put(skb_out, mac_header_len), mac_header_data, - mac_header_len); + mac_header_len); memcpy(skb_put(skb_out, sizeof(struct ipv6hdr)), &ipv6_out, - sizeof(struct ipv6hdr)); + sizeof(struct ipv6hdr)); memcpy(skb_put(skb_out, sizeof(struct icmp6hdr)), &icmp6_out, - sizeof(struct icmp6hdr)); + sizeof(struct icmp6hdr)); memcpy(skb_put(skb_out, sizeof(struct neighbour_advertisement)), &na, - sizeof(struct neighbour_advertisement)); + sizeof(struct neighbour_advertisement)); skb_out->protocol = ((struct ethhdr *)mac_header_data)->h_proto; skb_out->dev = skb_in->dev; @@ -530,7 +530,7 @@ static int gdm_lte_event_send(struct net_device *dev, char *buf, int len) } static void gdm_lte_event_rcv(struct net_device *dev, u16 type, - void *msg, int len) + void *msg, int len) { struct nic *nic = netdev_priv(dev); @@ -572,7 +572,7 @@ static u8 find_dev_index(u32 nic_type) } static void gdm_lte_netif_rx(struct net_device *dev, char *buf, - int len, int flagged_nic_type) +int len, int flagged_nic_type) { u32 nic_type; struct nic *nic; @@ -697,9 +697,9 @@ static void gdm_lte_multi_sdu_pkt(struct phy_dev *phy_dev, char *buf, int len) u8 index; hci_len = gdm_dev16_to_cpu(phy_dev->get_endian(phy_dev->priv_dev), - multi_sdu->len); + multi_sdu->len); num_packet = gdm_dev16_to_cpu(phy_dev->get_endian(phy_dev->priv_dev), - multi_sdu->num_packet); + multi_sdu->num_packet); for (i = 0; i < num_packet; i++) { sdu = (struct sdu *)data; @@ -724,7 +724,7 @@ static void gdm_lte_multi_sdu_pkt(struct phy_dev *phy_dev, char *buf, int len) if (index < MAX_NIC_TYPE) { dev = phy_dev->dev[index]; gdm_lte_netif_rx(dev, (char *)sdu->data, - (int)(hci_len - 12), nic_type); +(int)(hci_len - 12), nic_type); } else { pr_err("rx sdu invalid nic_type :%x\n", nic_type);
[PATCH 1/5] Staging: gdm724x: code style improvements
Corrections based on checkpatch.pl with --strict. Added missing spaces between operators. Signed-off-by: Tolga Ceylan --- drivers/staging/gdm724x/gdm_lte.c | 6 +++--- drivers/staging/gdm724x/gdm_mux.c | 4 ++-- drivers/staging/gdm724x/gdm_mux.h | 4 ++-- drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/staging/gdm724x/gdm_usb.c | 6 +++--- drivers/staging/gdm724x/gdm_usb.h | 6 +++--- drivers/staging/gdm724x/netlink_k.c | 10 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index 7c4a77b..dab5ba7 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -724,12 +724,12 @@ static void gdm_lte_multi_sdu_pkt(struct phy_dev *phy_dev, char *buf, int len) if (index < MAX_NIC_TYPE) { dev = phy_dev->dev[index]; gdm_lte_netif_rx(dev, (char *)sdu->data, - (int)(hci_len-12), nic_type); + (int)(hci_len - 12), nic_type); } else { pr_err("rx sdu invalid nic_type :%x\n", nic_type); } - data += ((hci_len+3) & 0xfffc) + HCI_HEADER_SIZE; + data += ((hci_len + 3) & 0xfffc) + HCI_HEADER_SIZE; } } @@ -850,7 +850,7 @@ static void form_mac_address(u8 *dev_addr, u8 *nic_src, u8 *nic_dest, /* The last byte of the mac address * should be less than or equal to 0xFC */ - dev_addr[ETH_ALEN-1] += index; + dev_addr[ETH_ALEN - 1] += index; /* Create random nic src and copy the first * 3 bytes to be the same as dev_addr diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index d1ab996..826b537 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -391,8 +391,8 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index, mux_header->payload_size = __cpu_to_le32((u32)len); mux_header->packet_type = __cpu_to_le16(packet_type[tty_index]); - memcpy(t->buf+MUX_HEADER_SIZE, data, len); - memset(t->buf+MUX_HEADER_SIZE+len, 0, dummy_cnt); + memcpy(t->buf + MUX_HEADER_SIZE, data, len); + memset(t->buf + MUX_HEADER_SIZE + len, 0, dummy_cnt); t->len = total_len; t->callback = cb; diff --git a/drivers/staging/gdm724x/gdm_mux.h b/drivers/staging/gdm724x/gdm_mux.h index 3d50383..0871b8f 100644 --- a/drivers/staging/gdm724x/gdm_mux.h +++ b/drivers/staging/gdm724x/gdm_mux.h @@ -27,8 +27,8 @@ #define START_FLAG 0xA512485A #define MUX_HEADER_SIZE 14 -#define MUX_TX_MAX_SIZE (1024*10) -#define MUX_RX_MAX_SIZE (1024*30) +#define MUX_TX_MAX_SIZE (1024 * 10) +#define MUX_RX_MAX_SIZE (1024 * 30) #define AT_PKT_TYPE 0xF011 #define DM_PKT_TYPE 0xF010 diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index 001348c..f8c18a9 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -193,7 +193,7 @@ static int gdm_tty_write(struct tty_struct *tty, const unsigned char *buf, sending_len = remain > MUX_TX_MAX_SIZE ? MUX_TX_MAX_SIZE : remain; gdm_tty_send(gdm, -(void *)(buf+sent_len), +(void *)(buf + sent_len), sending_len, gdm->index, gdm_tty_send_complete, diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging/gdm724x/gdm_usb.c index d2a3b35..f4a2824 100644 --- a/drivers/staging/gdm724x/gdm_usb.c +++ b/drivers/staging/gdm724x/gdm_usb.c @@ -347,7 +347,7 @@ static int init_usb(struct lte_udev *udev) tx->avail_count++; } - for (i = 0; i < MAX_RX_SUBMIT_COUNT*2; i++) { + for (i = 0; i < MAX_RX_SUBMIT_COUNT * 2; i++) { r = alloc_rx_struct(); if (r == NULL) { ret = -ENOMEM; @@ -576,7 +576,7 @@ static int send_tx_packet(struct usb_device *usbdev, struct usb_tx *t, u32 len) { int ret = 0; - if (!(len%512)) + if (!(len % 512)) len++; usb_fill_bulk_urb(t->urb, @@ -744,7 +744,7 @@ static int gdm_usb_sdu_send(void *priv_dev, void *data, int len, } else { send_len = len - ETH_HLEN; send_len += SDU_PARAM_LEN; - memcpy(sdu->data, data+ETH_HLEN, len-ETH_HLEN); + memcpy(sdu->data, data + ETH_HLEN, len - ETH_HLEN); } sdu->len = gdm_cpu_to_dev16(&udev->gdm_ed, send_len); diff --git a/drivers/staging/gdm724x/gdm_usb.h b/drivers/staging/gdm724x/gdm_usb.h index e6486e7..ffb3d99 100644 --- a/drive
[PATCH 3/5] Staging: gdm724x: code style improvements
Comparisons such as if (x == NULL) rewritten as if (!x) Signed-off-by: Tolga Ceylan --- drivers/staging/gdm724x/gdm_lte.c | 6 +++--- drivers/staging/gdm724x/gdm_mux.c | 4 ++-- drivers/staging/gdm724x/gdm_tty.c | 2 +- drivers/staging/gdm724x/gdm_usb.c | 14 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index 2c3931b..7a86184 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -775,7 +775,7 @@ static int gdm_lte_receive_pkt(struct phy_dev *phy_dev, char *buf, int len) hci->cmd_evt); dev = phy_dev->dev[0]; - if (dev == NULL) + if (!dev) return 0; switch (cmd_evt) { @@ -889,7 +889,7 @@ int register_lte_device(struct phy_dev *phy_dev, /* Allocate netdev */ net = alloc_netdev(sizeof(struct nic), pdn_dev_name, NET_NAME_UNKNOWN, ether_setup); - if (net == NULL) { + if (!net) { pr_err("alloc_netdev failed\n"); ret = -ENOMEM; goto err; @@ -938,7 +938,7 @@ void unregister_lte_device(struct phy_dev *phy_dev) for (index = 0; index < MAX_NIC_TYPE; index++) { net = phy_dev->dev[index]; - if (net == NULL) + if (!net) continue; unregister_netdev(net); diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c index 9b5e6b8..b025a49 100644 --- a/drivers/staging/gdm724x/gdm_mux.c +++ b/drivers/staging/gdm724x/gdm_mux.c @@ -495,7 +495,7 @@ static int init_usb(struct mux_dev *mux_dev) for (i = 0; i < MAX_ISSUE_NUM * 2; i++) { r = alloc_mux_rx(); - if (r == NULL) { + if (!r) { ret = -ENOMEM; break; } @@ -665,7 +665,7 @@ static int __init gdm_usb_mux_init(void) { mux_rx_wq = create_workqueue("mux_rx_wq"); - if (mux_rx_wq == NULL) { + if (!mux_rx_wq) { pr_err("work queue create fail\n"); return -1; } diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c index f8c18a9..b593525 100644 --- a/drivers/staging/gdm724x/gdm_tty.c +++ b/drivers/staging/gdm724x/gdm_tty.c @@ -88,7 +88,7 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty) mutex_lock(&gdm_table_lock); gdm = gdm_table[i][j]; - if (gdm == NULL) { + if (!gdm) { mutex_unlock(&gdm_table_lock); return -ENODEV; } diff --git a/drivers/staging/gdm724x/gdm_usb.c b/drivers/staging/gdm724x/gdm_usb.c index 786c177..36fe1b4 100644 --- a/drivers/staging/gdm724x/gdm_usb.c +++ b/drivers/staging/gdm724x/gdm_usb.c @@ -338,7 +338,7 @@ static int init_usb(struct lte_udev *udev) for (i = 0; i < MAX_NUM_SDU_BUF; i++) { t_sdu = alloc_tx_sdu_struct(); - if (t_sdu == NULL) { + if (!t_sdu) { ret = -ENOMEM; goto fail; } @@ -349,7 +349,7 @@ static int init_usb(struct lte_udev *udev) for (i = 0; i < MAX_RX_SUBMIT_COUNT * 2; i++) { r = alloc_rx_struct(); - if (r == NULL) { + if (!r) { ret = -ENOMEM; goto fail; } @@ -681,7 +681,7 @@ static void do_tx(struct work_struct *work) } t = alloc_tx_struct(TX_BUF_SIZE); - if (t == NULL) { + if (!t) { spin_unlock_irqrestore(&tx->lock, flags); return; } @@ -731,7 +731,7 @@ static int gdm_usb_sdu_send(void *priv_dev, void *data, int len, t_sdu = get_tx_sdu_struct(tx, &no_spc); spin_unlock_irqrestore(&tx->lock, flags); - if (t_sdu == NULL) { + if (!t_sdu) { pr_err("sdu send - free list empty\n"); return TX_NO_SPC; } @@ -781,7 +781,7 @@ static int gdm_usb_hci_send(void *priv_dev, void *data, int len, } t = alloc_tx_struct(len); - if (t == NULL) { + if (!t) { pr_err("hci_send - out of memory\n"); return -ENOMEM; } @@ -1005,11 +1005,11 @@ static int __init gdm_usb_lte_init(void) } usb_tx_wq = create_workqueue("usb_tx_wq"); - if (usb_tx_wq == NULL) + if (!usb_tx_wq) return -1; usb_rx_wq = create_workqueue("usb_rx_wq"); - if (usb_rx_wq == NULL) + if (!usb_rx_wq)
Re: [PATCH 1/1] Staging: gdm724x: code style improvements
On Fri, Feb 13, 2015 at 1:05 AM, Dan Carpenter wrote: > > You're doing too many things at one. This should probably be split into > 7 patches. I will split this up and resubmit. > > >> u16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x) >> @@ -39,7 +38,7 @@ u16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x) >> if (ed->dev_ed == ed->host_ed) >> return x; >> >> - return Endian16_Swap(x); >> + return ENDIAN16_SWAP(x); >> } > > All the changes are good except these. We have standard macros > cpu_to_be16()/le16() and back for these. > > regards, > dan carpenter Thanks, I'll skip this one. Regards, Tolga Ceylan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] Staging: iio: meter: ade7854-i2c: code style improvements
On Fri, Feb 13, 2015 at 12:27 AM, Sudip Mukherjee wrote: > > you are doing three different types of changes here. one patch should have > only one type of change. > > regards > sudip Thank you, I'll split this up and resubmit. Regards, Tolga -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: gdm724x: code style improvements
Corrections based on checkpatch.pl with --strict. 1) Lines over 80 were corrected 2) Alignment should match open paranthesis cases corrected 3) Comparisons such as if (x == NULL) rewritten as if (!x) 4) CamelCase variables renamed 5) Missing spaces between operators added 6) Unnecessary blank lines removed 7) in mem alloc arguments sizeof(struct foo) rewritten as sizeof(*foo_obj) Signed-off-by: Tolga Ceylan --- drivers/staging/gdm724x/gdm_endian.c | 9 +++ drivers/staging/gdm724x/gdm_endian.h | 4 +-- drivers/staging/gdm724x/gdm_lte.c| 42 ++--- drivers/staging/gdm724x/gdm_lte.h| 14 +- drivers/staging/gdm724x/gdm_mux.c| 27 +-- drivers/staging/gdm724x/gdm_mux.h| 4 +-- drivers/staging/gdm724x/gdm_tty.c| 7 +++-- drivers/staging/gdm724x/gdm_tty.h| 6 ++--- drivers/staging/gdm724x/gdm_usb.c| 52 ++-- drivers/staging/gdm724x/gdm_usb.h| 6 ++--- drivers/staging/gdm724x/hci_packet.h | 5 ++-- drivers/staging/gdm724x/netlink_k.c | 13 - drivers/staging/gdm724x/netlink_k.h | 3 ++- 13 files changed, 93 insertions(+), 99 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_endian.c b/drivers/staging/gdm724x/gdm_endian.c index f6cc90a..032aafa 100644 --- a/drivers/staging/gdm724x/gdm_endian.c +++ b/drivers/staging/gdm724x/gdm_endian.c @@ -31,7 +31,6 @@ void gdm_set_endian(struct gdm_endian *ed, u8 dev_endian) ed->host_ed = ENDIANNESS_LITTLE; else ed->host_ed = ENDIANNESS_BIG; - } u16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x) @@ -39,7 +38,7 @@ u16 gdm_cpu_to_dev16(struct gdm_endian *ed, u16 x) if (ed->dev_ed == ed->host_ed) return x; - return Endian16_Swap(x); + return ENDIAN16_SWAP(x); } u16 gdm_dev16_to_cpu(struct gdm_endian *ed, u16 x) @@ -47,7 +46,7 @@ u16 gdm_dev16_to_cpu(struct gdm_endian *ed, u16 x) if (ed->dev_ed == ed->host_ed) return x; - return Endian16_Swap(x); + return ENDIAN16_SWAP(x); } u32 gdm_cpu_to_dev32(struct gdm_endian *ed, u32 x) @@ -55,7 +54,7 @@ u32 gdm_cpu_to_dev32(struct gdm_endian *ed, u32 x) if (ed->dev_ed == ed->host_ed) return x; - return Endian32_Swap(x); + return ENDIAN32_SWAP(x); } u32 gdm_dev32_to_cpu(struct gdm_endian *ed, u32 x) @@ -63,5 +62,5 @@ u32 gdm_dev32_to_cpu(struct gdm_endian *ed, u32 x) if (ed->dev_ed == ed->host_ed) return x; - return Endian32_Swap(x); + return ENDIAN32_SWAP(x); } diff --git a/drivers/staging/gdm724x/gdm_endian.h b/drivers/staging/gdm724x/gdm_endian.h index 9b2531f..12e3fb0 100644 --- a/drivers/staging/gdm724x/gdm_endian.h +++ b/drivers/staging/gdm724x/gdm_endian.h @@ -16,11 +16,11 @@ #include -#define Endian16_Swap(value) \ +#define ENDIAN16_SWAP(value) \ u16)((value) & 0x00FF)) << 8) | \ (((u16)((value) & 0xFF00)) >> 8)) -#define Endian32_Swap(value) \ +#define ENDIAN32_SWAP(value) \ u32)((value) & 0x00FF)) << 24) | \ (((u32)((value) & 0xFF00)) << 8) | \ (((u32)((value) & 0x00FF)) >> 8) | \ diff --git a/drivers/staging/gdm724x/gdm_lte.c b/drivers/staging/gdm724x/gdm_lte.c index 7c4a77b..7a86184 100644 --- a/drivers/staging/gdm724x/gdm_lte.c +++ b/drivers/staging/gdm724x/gdm_lte.c @@ -162,11 +162,11 @@ static int gdm_lte_emulate_arp(struct sk_buff *skb_in, u32 nic_type) skb_reserve(skb_out, NET_IP_ALIGN); memcpy(skb_put(skb_out, mac_header_len), mac_header_data, - mac_header_len); + mac_header_len); memcpy(skb_put(skb_out, sizeof(struct arphdr)), arp_out, - sizeof(struct arphdr)); + sizeof(struct arphdr)); memcpy(skb_put(skb_out, sizeof(struct arpdata)), arp_data_out, - sizeof(struct arpdata)); + sizeof(struct arpdata)); skb_out->protocol = ((struct ethhdr *)mac_header_data)->h_proto; skb_out->dev = skb_in->dev; @@ -300,13 +300,13 @@ static int gdm_lte_emulate_ndp(struct sk_buff *skb_in, u32 nic_type) memcpy(&ipv6_out, ipv6_in, sizeof(struct ipv6hdr)); memcpy(ipv6_out.saddr.in6_u.u6_addr8, &na.target_address, 16); memcpy(ipv6_out.daddr.in6_u.u6_addr8, - ipv6_in->saddr.in6_u.u6_addr8, 16); + ipv6_in->saddr.in6_u.u6_addr8, 16); ipv6_out.payload_len = htons(sizeof(struct icmp6hdr) + sizeof(struct neighbour_advertisement)); memcpy(icmp_na, &icmp6_out, sizeof(struct icmp6hdr)); memcpy(icmp_na + sizeof(struct icmp6hdr), &na, - sizeof(struct neighbour_advertisement)); +
Re: [PATCH 1/1] Staging: dgnc: dgnc_tty: code style improvements
On 02/12/2015 10:20 PM, Joe Perches wrote: On Thu, 2015-02-12 at 21:58 -0800, Tolga Ceylan wrote: On Wed, Feb 11, 2015 at 2:36 AM, Dan Carpenter wrote: That looks kind of uglier than before. Please run your patch throught scripts/checkpatch.pl --strict. [] Running with --strict helped, but now I'm also getting warnings for camel case usage. You can use --strict --ignore=camelcase If I try to fix camel case, then the patch will get much larger spanning many dgnc_* files. I can proceed with this if you think it is valuable/acceptable. I suggest not. Just noticed this warning in all dgnc_* files: * NOTE TO LINUX KERNEL HACKERS: DO NOT REFORMAT THIS CODE! * * This is shared code between Digi's CVS archive and the * Linux Kernel sources. * Changing the source just for reformatting needlessly breaks * our CVS diff history. * * Send any bug fixes/changes to: Eng.Linux at digi dot com. * Thank you. Seems unusual. Also get_maintainers.pl does not return any digi dot com addresses. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: iio: meter: ade7854-i2c: code style improvements
Code reformatting based on checkpatch.pl with --strict: 1) Lines over 80 characters were fixed 2) Alignment should match open paranthesis cases corrected 3) Comparison to NULL rewritten as !indio_dev Signed-off-by: Tolga Ceylan --- drivers/staging/iio/meter/ade7854-i2c.c | 39 + 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c index 5b33c7f..fcb4714 100644 --- a/drivers/staging/iio/meter/ade7854-i2c.c +++ b/drivers/staging/iio/meter/ade7854-i2c.c @@ -16,8 +16,8 @@ #include "ade7854.h" static int ade7854_i2c_write_reg_8(struct device *dev, - u16 reg_address, - u8 value) + u16 reg_address, + u8 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -35,8 +35,8 @@ static int ade7854_i2c_write_reg_8(struct device *dev, } static int ade7854_i2c_write_reg_16(struct device *dev, - u16 reg_address, - u16 value) + u16 reg_address, + u16 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -55,8 +55,8 @@ static int ade7854_i2c_write_reg_16(struct device *dev, } static int ade7854_i2c_write_reg_24(struct device *dev, - u16 reg_address, - u32 value) + u16 reg_address, + u32 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -76,8 +76,8 @@ static int ade7854_i2c_write_reg_24(struct device *dev, } static int ade7854_i2c_write_reg_32(struct device *dev, - u16 reg_address, - u32 value) + u16 reg_address, + u32 value) { int ret; struct iio_dev *indio_dev = dev_to_iio_dev(dev); @@ -98,8 +98,8 @@ static int ade7854_i2c_write_reg_32(struct device *dev, } static int ade7854_i2c_read_reg_8(struct device *dev, - u16 reg_address, - u8 *val) + u16 reg_address, + u8 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -124,8 +124,8 @@ out: } static int ade7854_i2c_read_reg_16(struct device *dev, - u16 reg_address, - u16 *val) + u16 reg_address, + u16 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -150,8 +150,8 @@ out: } static int ade7854_i2c_read_reg_24(struct device *dev, - u16 reg_address, - u32 *val) + u16 reg_address, + u32 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -176,8 +176,8 @@ out: } static int ade7854_i2c_read_reg_32(struct device *dev, - u16 reg_address, - u32 *val) + u16 reg_address, + u32 *val) { struct iio_dev *indio_dev = dev_to_iio_dev(dev); struct ade7854_state *st = iio_priv(indio_dev); @@ -195,21 +195,22 @@ static int ade7854_i2c_read_reg_32(struct device *dev, if (ret) goto out; - *val = (st->rx[0] << 24) | (st->rx[1] << 16) | (st->rx[2] << 8) | st->rx[3]; + *val = (st->rx[0] << 24) | (st->rx[1] << 16) + | (st->rx[2] << 8) | st->rx[3]; out: mutex_unlock(&st->buf_lock); return ret; } static int ade7854_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +const struct i2c_device_id *id) { int ret; struct ade7854_state *st; struct iio_dev *indio_dev; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); - if (indio_dev == NULL) + if (!indio_dev) return -ENOMEM; st = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 1/1] Staging: dgnc: dgnc_tty: code style improvements
On Wed, Feb 11, 2015 at 2:36 AM, Dan Carpenter wrote: > That looks kind of uglier than before. Please run your patch throught > scripts/checkpatch.pl --strict. > > regards, > dan carpenter > Running with --strict helped, but now I'm also getting warnings for camel case usage. If I try to fix camel case, then the patch will get much larger spanning many dgnc_* files. I can proceed with this if you think it is valuable/acceptable. Regards, Tolga -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: dgnc: dgnc_tty: code style improvements
Coding style improvements based on check_patch.pl: 1) Modified lines over 80 characters to fit. 2) Removed curly braces from a single line if block at dgnc_check_queue_flow_control(). 3) Combined two if statements to reduce nesting in dgnc_wakeup_writes(). 4) Combined and reverted logic in if statement in dgnc_tty_ioctl() at case TCLFLSH to reduce nesting. Signed-off-by: Tolga Ceylan --- drivers/staging/dgnc/dgnc_tty.c | 266 +--- 1 file changed, 168 insertions(+), 98 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index f81a375..ff650cb 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -105,10 +105,14 @@ static struct ktermios DgncDefaultTermios = { /* Our function prototypes */ static int dgnc_tty_open(struct tty_struct *tty, struct file *file); static void dgnc_tty_close(struct tty_struct *tty, struct file *file); -static int dgnc_block_til_ready(struct tty_struct *tty, struct file *file, struct channel_t *ch); -static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned long arg); -static int dgnc_tty_digigeta(struct tty_struct *tty, struct digi_t __user *retinfo); -static int dgnc_tty_digiseta(struct tty_struct *tty, struct digi_t __user *new_info); +static int dgnc_block_til_ready(struct tty_struct *tty, struct file *file, + struct channel_t *ch); +static int dgnc_tty_ioctl(struct tty_struct *tty, unsigned int cmd, + unsigned long arg); +static int dgnc_tty_digigeta(struct tty_struct *tty, + struct digi_t __user *retinfo); +static int dgnc_tty_digiseta(struct tty_struct *tty, + struct digi_t __user *new_info); static int dgnc_tty_write_room(struct tty_struct *tty); static int dgnc_tty_put_char(struct tty_struct *tty, unsigned char c); static int dgnc_tty_chars_in_buffer(struct tty_struct *tty); @@ -119,14 +123,19 @@ static void dgnc_tty_unthrottle(struct tty_struct *tty); static void dgnc_tty_flush_chars(struct tty_struct *tty); static void dgnc_tty_flush_buffer(struct tty_struct *tty); static void dgnc_tty_hangup(struct tty_struct *tty); -static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, unsigned int __user *value); -static int dgnc_get_modem_info(struct channel_t *ch, unsigned int __user *value); +static int dgnc_set_modem_info(struct tty_struct *tty, unsigned int command, + unsigned int __user *value); +static int dgnc_get_modem_info(struct channel_t *ch, + unsigned int __user *value); static int dgnc_tty_tiocmget(struct tty_struct *tty); -static int dgnc_tty_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear); +static int dgnc_tty_tiocmset(struct tty_struct *tty, unsigned int set, + unsigned int clear); static int dgnc_tty_send_break(struct tty_struct *tty, int msec); static void dgnc_tty_wait_until_sent(struct tty_struct *tty, int timeout); -static int dgnc_tty_write(struct tty_struct *tty, const unsigned char *buf, int count); -static void dgnc_tty_set_termios(struct tty_struct *tty, struct ktermios *old_termios); +static int dgnc_tty_write(struct tty_struct *tty, + const unsigned char *buf, int count); +static void dgnc_tty_set_termios(struct tty_struct *tty, + struct ktermios *old_termios); static void dgnc_tty_send_xchar(struct tty_struct *tty, char ch); @@ -207,18 +216,22 @@ int dgnc_tty_register(struct dgnc_board *brd) brd->SerialDriver.subtype = SERIAL_TYPE_NORMAL; brd->SerialDriver.init_termios = DgncDefaultTermios; brd->SerialDriver.driver_name = DRVSTR; - brd->SerialDriver.flags = (TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV | TTY_DRIVER_HARDWARE_BREAK); + brd->SerialDriver.flags = (TTY_DRIVER_REAL_RAW | + TTY_DRIVER_DYNAMIC_DEV | + TTY_DRIVER_HARDWARE_BREAK); /* * The kernel wants space to store pointers to * tty_struct's and termios's. */ - brd->SerialDriver.ttys = kcalloc(brd->maxports, sizeof(*brd->SerialDriver.ttys), GFP_KERNEL); + brd->SerialDriver.ttys = kcalloc(brd->maxports, + sizeof(*brd->SerialDriver.ttys), GFP_KERNEL); if (!brd->SerialDriver.ttys) return -ENOMEM; kref_init(&brd->SerialDriver.kref); - brd->SerialDriver.termios = kcalloc(brd->maxports, sizeof(*brd->SerialDriver.termios), GFP_KERNEL); + brd->SerialDriver.termios = kcalloc(brd->maxports, + sizeof(*brd->SerialDriver.termios), GFP_KERNEL); if (!brd->SerialDriver.termios) return -ENOMEM; @@ -256,18 +269,22 @@ int dgnc_tty_register(struct dgnc_board *brd) brd->PrintDriver.subtype = SERIAL_TYPE_NORMAL; brd->PrintDriver.init_termios = DgncDefaultTermios; brd->PrintDriver.driver_name = DRVSTR; - brd->PrintDriver.flags = (T
[PATCH] Staging: rtl8192u: r8190_rtl8256: coding style and format string type connections
Lines over 80 were corrected RT_TRACE format strings should specify unsigned instead of signed int Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r8190_rtl8256.c | 244 ++- 1 file changed, 174 insertions(+), 70 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 1868352..1d7338a 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -37,43 +37,71 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth) switch (Bandwidth) { case HT_CHANNEL_WIDTH_20: - if (priv->card_8192_version == VERSION_819xU_A - || priv->card_8192_version - == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ - rtl8192_phy_SetRFReg(dev, - (RF90_RADIO_PATH_E)eRFPath, - 0x0b, bMask12Bits, 0x100); /* phy para:1ba */ - rtl8192_phy_SetRFReg(dev, - (RF90_RADIO_PATH_E)eRFPath, - 0x2c, bMask12Bits, 0x3d7); + /* 8256 D-cut, E-cut, xiong: consider it later! */ + if (priv->card_8192_version == VERSION_819xU_A || + priv->card_8192_version == VERSION_819xU_B) { + + /* phy para:1ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x100); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3d7); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x021); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x14, bMask12Bits, 0x5ab); + + } else { + RT_TRACE(COMP_ERR, + "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); + } + break; + case HT_CHANNEL_WIDTH_20_40: + /* 8256 D-cut, E-cut, xiong: consider it later! */ + if (priv->card_8192_version == VERSION_819xU_A || + priv->card_8192_version == VERSION_819xU_B) { + + /* phy para:3ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x300); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3df); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x0a1); + + if (priv->chan == 3 || priv->chan == 9) + /* I need to set priv->chan whenever +* current channel changes +*/ rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, - 0x0e, bMask12Bits, 0x021); + 0x14, bMask12Bits, 0x59b); + else rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } else { - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - break; - case HT_CHANNEL_WIDTH_20_40: - if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_
Re: [PATCH 1/1] Staging: rtl8192u: Coding Style Improvements
Thank you, I'll resubmit this with additional corrections to format strings. On Sun, Feb 8, 2015 at 1:54 AM, Joe Perches wrote: > On Sun, 2015-02-08 at 01:49 -0800, Tolga Ceylan wrote: >> Lines over 80 were corrected > [] >> diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c >> b/drivers/staging/rtl8192u/r8190_rtl8256.c > [] >> @@ -37,43 +37,71 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, >> HT_CHANNEL_WIDTH Bandwidth) > [] >> + /* 8256 D-cut, E-cut, xiong: consider it later! */ >> + if (priv->card_8192_version == VERSION_819xU_A >> + || priv->card_8192_version == VERSION_819xU_B) >> { > > This is more commonly written: > > if (priv->card_8192_version == VERSION_819xU_A || > priv->card_8192_version == VERSION_819xU_B) { > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: rtl8192u: Coding Style Improvements
Lines over 80 were corrected Signed-off-by: Tolga Ceylan --- drivers/staging/rtl8192u/r8190_rtl8256.c | 244 ++- 1 file changed, 174 insertions(+), 70 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 1868352..3c3e85f 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -37,43 +37,71 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth) switch (Bandwidth) { case HT_CHANNEL_WIDTH_20: - if (priv->card_8192_version == VERSION_819xU_A - || priv->card_8192_version - == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ - rtl8192_phy_SetRFReg(dev, - (RF90_RADIO_PATH_E)eRFPath, - 0x0b, bMask12Bits, 0x100); /* phy para:1ba */ - rtl8192_phy_SetRFReg(dev, - (RF90_RADIO_PATH_E)eRFPath, - 0x2c, bMask12Bits, 0x3d7); + /* 8256 D-cut, E-cut, xiong: consider it later! */ + if (priv->card_8192_version == VERSION_819xU_A + || priv->card_8192_version == VERSION_819xU_B) { + + /* phy para:1ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x100); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3d7); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x021); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x14, bMask12Bits, 0x5ab); + + } else { + RT_TRACE(COMP_ERR, + "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); + } + break; + case HT_CHANNEL_WIDTH_20_40: + /* 8256 D-cut, E-cut, xiong: consider it later! */ + if (priv->card_8192_version == VERSION_819xU_A || + priv->card_8192_version == VERSION_819xU_B) { + + /* phy para:3ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x300); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3df); + + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x0a1); + + if (priv->chan == 3 || priv->chan == 9) + /* I need to set priv->chan whenever +* current channel changes +*/ rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, - 0x0e, bMask12Bits, 0x021); + 0x14, bMask12Bits, 0x59b); + else rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } else { - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - break; - case HT_CHANNEL_WIDTH_20_40: - if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); /* phy para:3ba */ -
[PATCH 1/1] Staging: iio: Coding Style Correction
Indentation corrections in struct initializations and one line over 80 characters split into two lines Signed-off-by: Tolga Ceylan --- drivers/staging/iio/magnetometer/hmc5843_i2c.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/iio/magnetometer/hmc5843_i2c.c b/drivers/staging/iio/magnetometer/hmc5843_i2c.c index 6acd614..e221a58 100644 --- a/drivers/staging/iio/magnetometer/hmc5843_i2c.c +++ b/drivers/staging/iio/magnetometer/hmc5843_i2c.c @@ -19,49 +19,49 @@ #include "hmc5843.h" static const struct regmap_range hmc5843_readable_ranges[] = { - regmap_reg_range(0, HMC5843_ID_END), + regmap_reg_range(0, HMC5843_ID_END), }; static struct regmap_access_table hmc5843_readable_table = { - .yes_ranges = hmc5843_readable_ranges, - .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges), + .yes_ranges = hmc5843_readable_ranges, + .n_yes_ranges = ARRAY_SIZE(hmc5843_readable_ranges), }; static const struct regmap_range hmc5843_writable_ranges[] = { - regmap_reg_range(0, HMC5843_MODE_REG), + regmap_reg_range(0, HMC5843_MODE_REG), }; static struct regmap_access_table hmc5843_writable_table = { - .yes_ranges = hmc5843_writable_ranges, - .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges), + .yes_ranges = hmc5843_writable_ranges, + .n_yes_ranges = ARRAY_SIZE(hmc5843_writable_ranges), }; static const struct regmap_range hmc5843_volatile_ranges[] = { - regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG), + regmap_reg_range(HMC5843_DATA_OUT_MSB_REGS, HMC5843_STATUS_REG), }; static struct regmap_access_table hmc5843_volatile_table = { - .yes_ranges = hmc5843_volatile_ranges, - .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges), + .yes_ranges = hmc5843_volatile_ranges, + .n_yes_ranges = ARRAY_SIZE(hmc5843_volatile_ranges), }; static struct regmap_config hmc5843_i2c_regmap_config = { - .reg_bits = 8, - .val_bits = 8, + .reg_bits = 8, + .val_bits = 8, - .rd_table = &hmc5843_readable_table, - .wr_table = &hmc5843_writable_table, - .volatile_table = &hmc5843_volatile_table, + .rd_table = &hmc5843_readable_table, + .wr_table = &hmc5843_writable_table, + .volatile_table = &hmc5843_volatile_table, - .cache_type = REGCACHE_RBTREE, + .cache_type = REGCACHE_RBTREE, }; static int hmc5843_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) { return hmc5843_common_probe(&client->dev, - devm_regmap_init_i2c(client, &hmc5843_i2c_regmap_config), - id->driver_data); + devm_regmap_init_i2c(client, &hmc5843_i2c_regmap_config), + id->driver_data); } static int hmc5843_i2c_remove(struct i2c_client *client) -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 1/1] Staging: iio: Coding style correction
Line over 80 characters corrected Signed-off-by: Tolga Ceylan --- drivers/staging/iio/meter/ade7854-i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c index 5b33c7f..5d0671a 100644 --- a/drivers/staging/iio/meter/ade7854-i2c.c +++ b/drivers/staging/iio/meter/ade7854-i2c.c @@ -195,7 +195,8 @@ static int ade7854_i2c_read_reg_32(struct device *dev, if (ret) goto out; - *val = (st->rx[0] << 24) | (st->rx[1] << 16) | (st->rx[2] << 8) | st->rx[3]; + *val = (st->rx[0] << 24) | (st->rx[1] << 16) | + (st->rx[2] << 8) | st->rx[3]; out: mutex_unlock(&st->buf_lock); return ret; -- 2.3.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Staging: NetLogic: Coding style correction
Misspelled comment corrected Signed-off-by: tolga ceylan --- drivers/staging/netlogic/xlr_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index 5ecb3e6..e8aae09 100644 --- a/drivers/staging/netlogic/xlr_net.c +++ b/drivers/staging/netlogic/xlr_net.c @@ -788,7 +788,7 @@ void xlr_set_gmac_speed(struct xlr_net_priv *priv) xlr_nae_wreg(priv->base_addr, R_MAC_CONFIG_2, 0x7117); priv->phy_speed = speed; } - /* Set SGMII speed in Interface controll reg */ + /* Set SGMII speed in Interface control reg */ if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { if (speed == SPEED_10) xlr_nae_wreg(priv->base_addr, -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/