[PATCH] staging: lustre: ptlrpc: lproc_ptlrpc.c - fix dereferenceing user space buffer
- this fixes sparse warning for directly deferencing user space buffer drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:expected void const [noderef] *from drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:got char const *buffer Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 6b9c6db..455c6c7 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -628,7 +628,8 @@ out: * if the optional token is omitted, the operation is performed on both the * regular and high-priority (if the service has one) NRS head. */ -static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, const char *buffer, +static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, + const char __user *buffer, size_t count, loff_t *off) { struct ptlrpc_service *svc = ((struct seq_file *)file->private_data)->private; -- 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/
[PATCH] staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer
- this fixes sparse warning for directly deferencing user space buffer ./lustre/ldlm/ldlm_resource.c:202:35: warning: incorrect type in argument 2 (different address spaces) ./lustre/ldlm/ldlm_resource.c:202:35:expected void const [noderef] *from ./lustre/ldlm/ldlm_resource.c:202:35:got char const *buffer Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 91d028b..efd45e5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -189,8 +189,9 @@ static int lprocfs_lru_size_seq_show(struct seq_file *m, void *v) return lprocfs_rd_uint(m, nr); } -static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer, - size_t count, loff_t *off) +static ssize_t lprocfs_lru_size_seq_write(struct file *file, + const char __user *buffer, + size_t count, loff_t *off) { struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private; char dummy[MAX_STRING_SIZE + 1]; -- 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/
[PATCH] staging: lustre: ldlm: ldlm_resource.c - fix dereferenceing user space buffer
- this fixes sparse warning for directly deferencing user space buffer ./lustre/ldlm/ldlm_resource.c:202:35: warning: incorrect type in argument 2 (different address spaces) ./lustre/ldlm/ldlm_resource.c:202:35:expected void const [noderef] asn:1*from ./lustre/ldlm/ldlm_resource.c:202:35:got char const *buffer Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 91d028b..efd45e5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -189,8 +189,9 @@ static int lprocfs_lru_size_seq_show(struct seq_file *m, void *v) return lprocfs_rd_uint(m, nr); } -static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer, - size_t count, loff_t *off) +static ssize_t lprocfs_lru_size_seq_write(struct file *file, + const char __user *buffer, + size_t count, loff_t *off) { struct ldlm_namespace *ns = ((struct seq_file *)file-private_data)-private; char dummy[MAX_STRING_SIZE + 1]; -- 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/
[PATCH] staging: lustre: ptlrpc: lproc_ptlrpc.c - fix dereferenceing user space buffer
- this fixes sparse warning for directly deferencing user space buffer drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:expected void const [noderef] asn:1*from drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:652:33:got char const *buffer Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 6b9c6db..455c6c7 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -628,7 +628,8 @@ out: * if the optional token is omitted, the operation is performed on both the * regular and high-priority (if the service has one) NRS head. */ -static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, const char *buffer, +static ssize_t ptlrpc_lprocfs_nrs_seq_write(struct file *file, + const char __user *buffer, size_t count, loff_t *off) { struct ptlrpc_service *svc = ((struct seq_file *)file-private_data)-private; -- 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/
[PATCH v3] staging: vt6655: ioctl.c - missing __user annotation
- private_ioctl() internally calls copy_{to,from}_user() and does not use '__user' which gives out several sparse warnings - these sparse warnings were fixed by adding __user annotation to the data member of struct tagSCmdRequest: drivers/staging/vt6655/ioctl.c:78:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:78:51:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:78:51:got void *data Signed-off-by: Anil Belur --- v2: - replaced the 'void __user *' casts by adding '__user' annotation to the data member of struct tagSCmdRequest which is much cleaner approach as suggested by tklau...@distanz.ch v1: - added 'void __user *' casts to supress the warnings drivers/staging/vt6655/iocmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/iocmd.h b/drivers/staging/vt6655/iocmd.h index e499f1b..dd12498 100644 --- a/drivers/staging/vt6655/iocmd.h +++ b/drivers/staging/vt6655/iocmd.h @@ -100,7 +100,7 @@ typedef enum tagWZONETYPE { #pragma pack(1) typedef struct tagSCmdRequest { u8 name[16]; - void*data; + void __user *data; u16 wResult; u16 wCmdCode; } SCmdRequest, *PSCmdRequest; -- 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/
[PATCH v2 1/1] staging: vt6655: ioctl.c - missing __user annotation
From: Anil Belur v2: - private_ioctl() internally calls copy_{to,from}_user() and does not use '__user' which gives out several sparse warnings - this patch adds __user annotation to the data member of struct tagSCmdRequest as suggested by tklau...@distanz.ch - sparse warnings fixed: drivers/staging/vt6655/ioctl.c:78:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:78:51:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:78:51:got void *data drivers/staging/vt6655/ioctl.c:117:55: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:117:55:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:117:55:got void *data drivers/staging/vt6655/ioctl.c:149:46: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:149:46:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:149:46:got void *data drivers/staging/vt6655/ioctl.c:166:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:166:51:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:166:51:got void *data drivers/staging/vt6655/ioctl.c:212:50: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:212:50:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:212:50:got void *data drivers/staging/vt6655/ioctl.c:276:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:276:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:276:38:got void *data drivers/staging/vt6655/ioctl.c:292:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:292:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:292:38:got void *data drivers/staging/vt6655/ioctl.c:300:48: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:300:48:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:300:48:got void *data drivers/staging/vt6655/ioctl.c:344:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:344:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:344:38:got void *data drivers/staging/vt6655/ioctl.c:353:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:353:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:353:38:got void *data drivers/staging/vt6655/ioctl.c:360:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:360:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:360:38:got void *data drivers/staging/vt6655/ioctl.c:401:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:401:49:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:401:49:got void *data drivers/staging/vt6655/ioctl.c:424:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:424:49:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:424:49:got void *data drivers/staging/vt6655/ioctl.c:440:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:440:49:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:440:49:got void *data drivers/staging/vt6655/ioctl.c:457:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:457:49:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:457:49:got void *data drivers/staging/vt6655/ioctl.c:479:54: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:479:54:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:479:54:got void *data drivers/staging/vt6655/ioctl.c:563:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:563:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:563:38:got void *data drivers/staging/vt6655/ioctl.c:571:52: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:571:52:expected void const [noderef] asn:1>*from drivers/staging/vt6655/ioctl.c:571:52:got void *data drivers/staging/vt6655/ioctl.c:615:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:615:38:expected void [noderef] asn:1>*to drivers/staging/vt6655/ioctl.c:
[PATCH v2 1/1] staging: vt6655: ioctl.c - missing __user annotation
From: Anil Belur ask...@gmail.com v2: - private_ioctl() internally calls copy_{to,from}_user() and does not use '__user' which gives out several sparse warnings - this patch adds __user annotation to the data member of struct tagSCmdRequest as suggested by tklau...@distanz.ch - sparse warnings fixed: drivers/staging/vt6655/ioctl.c:78:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:78:51:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:78:51:got void *data drivers/staging/vt6655/ioctl.c:117:55: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:117:55:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:117:55:got void *data drivers/staging/vt6655/ioctl.c:149:46: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:149:46:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:149:46:got void *data drivers/staging/vt6655/ioctl.c:166:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:166:51:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:166:51:got void *data drivers/staging/vt6655/ioctl.c:212:50: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:212:50:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:212:50:got void *data drivers/staging/vt6655/ioctl.c:276:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:276:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:276:38:got void *data drivers/staging/vt6655/ioctl.c:292:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:292:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:292:38:got void *data drivers/staging/vt6655/ioctl.c:300:48: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:300:48:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:300:48:got void *data drivers/staging/vt6655/ioctl.c:344:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:344:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:344:38:got void *data drivers/staging/vt6655/ioctl.c:353:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:353:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:353:38:got void *data drivers/staging/vt6655/ioctl.c:360:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:360:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:360:38:got void *data drivers/staging/vt6655/ioctl.c:401:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:401:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:401:49:got void *data drivers/staging/vt6655/ioctl.c:424:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:424:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:424:49:got void *data drivers/staging/vt6655/ioctl.c:440:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:440:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:440:49:got void *data drivers/staging/vt6655/ioctl.c:457:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:457:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:457:49:got void *data drivers/staging/vt6655/ioctl.c:479:54: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:479:54:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:479:54:got void *data drivers/staging/vt6655/ioctl.c:563:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:563:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:563:38:got void *data drivers/staging/vt6655/ioctl.c:571:52: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:571:52:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:571:52:got void *data drivers/staging/vt6655/ioctl.c:615:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:615:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:615:38:got void *data drivers/staging/vt6655/ioctl.c:631
[PATCH v3] staging: vt6655: ioctl.c - missing __user annotation
- private_ioctl() internally calls copy_{to,from}_user() and does not use '__user' which gives out several sparse warnings - these sparse warnings were fixed by adding __user annotation to the data member of struct tagSCmdRequest: drivers/staging/vt6655/ioctl.c:78:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:78:51:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:78:51:got void *data Signed-off-by: Anil Belur ask...@gmail.com --- v2: - replaced the 'void __user *' casts by adding '__user' annotation to the data member of struct tagSCmdRequest which is much cleaner approach as suggested by tklau...@distanz.ch v1: - added 'void __user *' casts to supress the warnings drivers/staging/vt6655/iocmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/iocmd.h b/drivers/staging/vt6655/iocmd.h index e499f1b..dd12498 100644 --- a/drivers/staging/vt6655/iocmd.h +++ b/drivers/staging/vt6655/iocmd.h @@ -100,7 +100,7 @@ typedef enum tagWZONETYPE { #pragma pack(1) typedef struct tagSCmdRequest { u8 name[16]; - void*data; + void __user *data; u16 wResult; u16 wCmdCode; } SCmdRequest, *PSCmdRequest; -- 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/
[PATCH 1/1] drivers: staging: vt6655: ioctl.c - missing __user annotation
From: Anil Belur - private_ioctl() the internally calls copy_{to,from}_user() and does not use '__user' while refrencing user space pointers. - this patch passes __user annotation as a cast, when the pointer is being refernced. - this patch fixes the following sparse errors: drivers/staging/vt6655/ioctl.c:44:12: warning: symbol 'wpa_Result' was not declared. Should it be static? drivers/staging/vt6655/ioctl.c:78:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:78:51:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:78:51:got void *data drivers/staging/vt6655/ioctl.c:117:55: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:117:55:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:117:55:got void *data drivers/staging/vt6655/ioctl.c:149:46: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:149:46:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:149:46:got void *data drivers/staging/vt6655/ioctl.c:166:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:166:51:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:166:51:got void *data drivers/staging/vt6655/ioctl.c:212:50: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:212:50:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:212:50:got void *data drivers/staging/vt6655/ioctl.c:276:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:276:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:276:38:got void *data drivers/staging/vt6655/ioctl.c:292:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:292:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:292:38:got void *data drivers/staging/vt6655/ioctl.c:300:48: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:300:48:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:300:48:got void *data drivers/staging/vt6655/ioctl.c:344:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:344:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:344:38:got void *data drivers/staging/vt6655/ioctl.c:353:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:353:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:353:38:got void *data drivers/staging/vt6655/ioctl.c:360:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:360:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:360:38:got void *data drivers/staging/vt6655/ioctl.c:401:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:401:49:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:401:49:got void *data drivers/staging/vt6655/ioctl.c:424:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:424:49:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:424:49:got void *data drivers/staging/vt6655/ioctl.c:440:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:440:49:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:440:49:got void *data drivers/staging/vt6655/ioctl.c:457:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:457:49:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:457:49:got void *data drivers/staging/vt6655/ioctl.c:479:54: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:479:54:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:479:54:got void *data drivers/staging/vt6655/ioctl.c:563:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:563:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:563:38:got void *data drivers/staging/vt6655/ioctl.c:571:52: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:571:52:expected void const [noderef] *from drivers/staging/vt6655/ioctl.c:571:52:got void *data drivers/staging/vt6655/ioctl.c:615:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:615:38:expected void [noderef] *to drivers/staging/vt6655/ioctl.c:615:38:got void *data drivers/staging/vt6655/ioctl.c:631:53: warning: incorrect type in argument 2 (different address spaces
[PATCH 1/1] drivers: staging: vt6655: ioctl.c - missing __user annotation
From: Anil Belur ask...@gmail.com - private_ioctl() the internally calls copy_{to,from}_user() and does not use '__user' while refrencing user space pointers. - this patch passes __user annotation as a cast, when the pointer is being refernced. - this patch fixes the following sparse errors: drivers/staging/vt6655/ioctl.c:44:12: warning: symbol 'wpa_Result' was not declared. Should it be static? drivers/staging/vt6655/ioctl.c:78:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:78:51:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:78:51:got void *data drivers/staging/vt6655/ioctl.c:117:55: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:117:55:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:117:55:got void *data drivers/staging/vt6655/ioctl.c:149:46: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:149:46:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:149:46:got void *data drivers/staging/vt6655/ioctl.c:166:51: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:166:51:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:166:51:got void *data drivers/staging/vt6655/ioctl.c:212:50: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:212:50:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:212:50:got void *data drivers/staging/vt6655/ioctl.c:276:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:276:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:276:38:got void *data drivers/staging/vt6655/ioctl.c:292:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:292:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:292:38:got void *data drivers/staging/vt6655/ioctl.c:300:48: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:300:48:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:300:48:got void *data drivers/staging/vt6655/ioctl.c:344:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:344:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:344:38:got void *data drivers/staging/vt6655/ioctl.c:353:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:353:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:353:38:got void *data drivers/staging/vt6655/ioctl.c:360:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:360:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:360:38:got void *data drivers/staging/vt6655/ioctl.c:401:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:401:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:401:49:got void *data drivers/staging/vt6655/ioctl.c:424:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:424:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:424:49:got void *data drivers/staging/vt6655/ioctl.c:440:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:440:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:440:49:got void *data drivers/staging/vt6655/ioctl.c:457:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:457:49:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:457:49:got void *data drivers/staging/vt6655/ioctl.c:479:54: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:479:54:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:479:54:got void *data drivers/staging/vt6655/ioctl.c:563:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:563:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:563:38:got void *data drivers/staging/vt6655/ioctl.c:571:52: warning: incorrect type in argument 2 (different address spaces) drivers/staging/vt6655/ioctl.c:571:52:expected void const [noderef] asn:1*from drivers/staging/vt6655/ioctl.c:571:52:got void *data drivers/staging/vt6655/ioctl.c:615:38: warning: incorrect type in argument 1 (different address spaces) drivers/staging/vt6655/ioctl.c:615:38:expected void [noderef] asn:1*to drivers/staging/vt6655/ioctl.c:615:38:got void
[PATCH 1/1] drivers: staging: cxt1e1: linux.c - missing __user annotation
From: Anil Belur - Some of the functions internally call copy_{to,from}_user() but does not use '__user'. this patch fixes missing __user annotations. - this patch fixes the following sparse errors: drivers/staging/cxt1e1/linux.c:488:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:488:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:488:33:got void *data drivers/staging/cxt1e1/linux.c:499:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:499:26:expected void [noderef] *to drivers/staging/cxt1e1/linux.c:499:26:got void *data drivers/staging/cxt1e1/linux.c:512:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:512:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:512:33:got void *data drivers/staging/cxt1e1/linux.c:534:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:534:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:534:33:got void *data drivers/staging/cxt1e1/linux.c:550:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:550:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:550:33:got void *data drivers/staging/cxt1e1/linux.c:558:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:558:26:expected void [noderef] *to drivers/staging/cxt1e1/linux.c:558:26:got void *data drivers/staging/cxt1e1/linux.c:571:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:571:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:571:33:got void *data drivers/staging/cxt1e1/linux.c:580:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:580:26:expected void [noderef] *to drivers/staging/cxt1e1/linux.c:580:26:got void *data drivers/staging/cxt1e1/linux.c:593:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:593:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:593:33:got void *data drivers/staging/cxt1e1/linux.c:601:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:601:26:expected void [noderef] *to drivers/staging/cxt1e1/linux.c:601:26:got void *data drivers/staging/cxt1e1/linux.c:612:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:612:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:612:33:got void *data drivers/staging/cxt1e1/linux.c:620:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:620:26:expected void [noderef] *to drivers/staging/cxt1e1/linux.c:620:26:got void *data drivers/staging/cxt1e1/linux.c:631:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:631:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:631:33:got void *data drivers/staging/cxt1e1/linux.c:647:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:647:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:647:33:got void *data drivers/staging/cxt1e1/linux.c:673:34: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:673:34:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:673:34:got void *data drivers/staging/cxt1e1/linux.c:681:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:681:26:expected void [noderef] *to drivers/staging/cxt1e1/linux.c:681:26:got void *data drivers/staging/cxt1e1/linux.c:691:47: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:691:47:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:691:47:got void *data drivers/staging/cxt1e1/linux.c:738:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:738:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:738:33:got void *data drivers/staging/cxt1e1/linux.c:785:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:785:33:expected void const [noderef] *from drivers/staging/cxt1e1/linux.c:785:33:got void *data drivers/staging/cxt1e1/linux.c:839:14: warning: incorrect type in assignment (different address spaces) drivers/staging/cxt1e1/linux.c:839:14:expected void *data drivers/staging/cxt1e1/linux.c:839:14:got void [noderef] * drivers/staging/cxt1e1/linux.c:840:34
[PATCH 1/1] drivers: staging: cxt1e1: linux.c - missing __user annotation
From: Anil Belur ask...@gmail.com - Some of the functions internally call copy_{to,from}_user() but does not use '__user'. this patch fixes missing __user annotations. - this patch fixes the following sparse errors: drivers/staging/cxt1e1/linux.c:488:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:488:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:488:33:got void *data drivers/staging/cxt1e1/linux.c:499:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:499:26:expected void [noderef] asn:1*to drivers/staging/cxt1e1/linux.c:499:26:got void *data drivers/staging/cxt1e1/linux.c:512:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:512:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:512:33:got void *data drivers/staging/cxt1e1/linux.c:534:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:534:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:534:33:got void *data drivers/staging/cxt1e1/linux.c:550:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:550:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:550:33:got void *data drivers/staging/cxt1e1/linux.c:558:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:558:26:expected void [noderef] asn:1*to drivers/staging/cxt1e1/linux.c:558:26:got void *data drivers/staging/cxt1e1/linux.c:571:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:571:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:571:33:got void *data drivers/staging/cxt1e1/linux.c:580:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:580:26:expected void [noderef] asn:1*to drivers/staging/cxt1e1/linux.c:580:26:got void *data drivers/staging/cxt1e1/linux.c:593:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:593:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:593:33:got void *data drivers/staging/cxt1e1/linux.c:601:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:601:26:expected void [noderef] asn:1*to drivers/staging/cxt1e1/linux.c:601:26:got void *data drivers/staging/cxt1e1/linux.c:612:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:612:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:612:33:got void *data drivers/staging/cxt1e1/linux.c:620:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:620:26:expected void [noderef] asn:1*to drivers/staging/cxt1e1/linux.c:620:26:got void *data drivers/staging/cxt1e1/linux.c:631:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:631:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:631:33:got void *data drivers/staging/cxt1e1/linux.c:647:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:647:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:647:33:got void *data drivers/staging/cxt1e1/linux.c:673:34: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:673:34:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:673:34:got void *data drivers/staging/cxt1e1/linux.c:681:26: warning: incorrect type in argument 1 (different address spaces) drivers/staging/cxt1e1/linux.c:681:26:expected void [noderef] asn:1*to drivers/staging/cxt1e1/linux.c:681:26:got void *data drivers/staging/cxt1e1/linux.c:691:47: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:691:47:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:691:47:got void *data drivers/staging/cxt1e1/linux.c:738:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:738:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:738:33:got void *data drivers/staging/cxt1e1/linux.c:785:33: warning: incorrect type in argument 2 (different address spaces) drivers/staging/cxt1e1/linux.c:785:33:expected void const [noderef] asn:1*from drivers/staging/cxt1e1/linux.c:785:33:got void *data drivers/staging/cxt1e1/linux.c:839:14: warning: incorrect type in assignment (different address spaces) drivers/staging/cxt1e1/linux.c:839:14:expected
[PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()
From: Anil Belur - as kfree() internally check for NULL, additional check it not required. Signed-off-by: Anil Belur --- drivers/staging/rtl8723au/core/rtw_ap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index c8700b3..8714ae3 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -1270,8 +1270,7 @@ static void update_bcn_wps_ie(struct rtw_adapter *padapter) pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen; } - if (pbackup_remainder_ie) - kfree(pbackup_remainder_ie); + kfree(pbackup_remainder_ie); } static void update_bcn_p2p_ie(struct rtw_adapter *padapter) -- 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/
[PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c - removed NULL pointer check before kfree()
From: Anil Belur - as kfree() internally checks for NULL, additional check it not required. Signed-off-by: Anil Belur --- drivers/staging/rtl8723au/core/rtw_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 1696cb8..b160780 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -516,8 +516,7 @@ int rtw_joinbss_cmd23a(struct rtw_adapter *padapter, psecnetwork = >sec_bss; if (!psecnetwork) { - if (pcmd) - kfree(pcmd); + kfree(pcmd); res = _FAIL; -- 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/
[PATCH 2/2] staging: nokia_h4p: nokia_core.c - removed IRQF_DISABLED macro
From: Anil Belur - this patch removes the IRQF_DISABLED macro, as this is deprecated/noop. Signed-off-by: Anil Belur --- drivers/staging/nokia_h4p/nokia_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nokia_h4p/nokia_core.c b/drivers/staging/nokia_h4p/nokia_core.c index 5e19cd6..840cc66 100644 --- a/drivers/staging/nokia_h4p/nokia_core.c +++ b/drivers/staging/nokia_h4p/nokia_core.c @@ -1141,7 +1141,7 @@ static int hci_h4p_probe(struct platform_device *pdev) err = devm_request_irq(>dev, gpio_to_irq(info->host_wakeup_gpio), hci_h4p_wakeup_interrupt, IRQF_TRIGGER_FALLING | - IRQF_TRIGGER_RISING | IRQF_DISABLED, + IRQF_TRIGGER_RISING, "hci_h4p_wkup", info); if (err < 0) { dev_err(info->dev, "hci_h4p: unable to get wakeup IRQ %d\n", -- 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/
[PATCH 1/2] staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro
From: Anil Belur - this patch removes IRQF_DISABLED macro, as this is deprecated/noop. Signed-off-by: Anil Belur --- drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index bbf236e..8760eca 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2618,7 +2618,7 @@ static int bcm2048_i2c_driver_probe(struct i2c_client *client, if (client->irq) { err = request_irq(client->irq, - bcm2048_handler, IRQF_TRIGGER_FALLING | IRQF_DISABLED, + bcm2048_handler, IRQF_TRIGGER_FALLING, client->name, bdev); if (err < 0) { dev_err(>dev, "Could not request IRQ\n"); -- 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/
[PATCH 1/2] staging: rtl8723au: core: rtw_ap.c - removed NULL pointer check before kfree()
From: Anil Belur ask...@gmail.com - as kfree() internally check for NULL, additional check it not required. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/rtl8723au/core/rtw_ap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index c8700b3..8714ae3 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -1270,8 +1270,7 @@ static void update_bcn_wps_ie(struct rtw_adapter *padapter) pnetwork-IELength = wps_offset + (wps_ielen+2) + remainder_ielen; } - if (pbackup_remainder_ie) - kfree(pbackup_remainder_ie); + kfree(pbackup_remainder_ie); } static void update_bcn_p2p_ie(struct rtw_adapter *padapter) -- 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/
[PATCH 2/2] staging: rtl8723au: core: rtw_cmd.c - removed NULL pointer check before kfree()
From: Anil Belur ask...@gmail.com - as kfree() internally checks for NULL, additional check it not required. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/rtl8723au/core/rtw_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 1696cb8..b160780 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -516,8 +516,7 @@ int rtw_joinbss_cmd23a(struct rtw_adapter *padapter, psecnetwork = psecuritypriv-sec_bss; if (!psecnetwork) { - if (pcmd) - kfree(pcmd); + kfree(pcmd); res = _FAIL; -- 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/
[PATCH 1/2] staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro
From: Anil Belur ask...@gmail.com - this patch removes IRQF_DISABLED macro, as this is deprecated/noop. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index bbf236e..8760eca 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2618,7 +2618,7 @@ static int bcm2048_i2c_driver_probe(struct i2c_client *client, if (client-irq) { err = request_irq(client-irq, - bcm2048_handler, IRQF_TRIGGER_FALLING | IRQF_DISABLED, + bcm2048_handler, IRQF_TRIGGER_FALLING, client-name, bdev); if (err 0) { dev_err(client-dev, Could not request IRQ\n); -- 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/
[PATCH 2/2] staging: nokia_h4p: nokia_core.c - removed IRQF_DISABLED macro
From: Anil Belur ask...@gmail.com - this patch removes the IRQF_DISABLED macro, as this is deprecated/noop. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/nokia_h4p/nokia_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/nokia_h4p/nokia_core.c b/drivers/staging/nokia_h4p/nokia_core.c index 5e19cd6..840cc66 100644 --- a/drivers/staging/nokia_h4p/nokia_core.c +++ b/drivers/staging/nokia_h4p/nokia_core.c @@ -1141,7 +1141,7 @@ static int hci_h4p_probe(struct platform_device *pdev) err = devm_request_irq(pdev-dev, gpio_to_irq(info-host_wakeup_gpio), hci_h4p_wakeup_interrupt, IRQF_TRIGGER_FALLING | - IRQF_TRIGGER_RISING | IRQF_DISABLED, + IRQF_TRIGGER_RISING, hci_h4p_wkup, info); if (err 0) { dev_err(info-dev, hci_h4p: unable to get wakeup IRQ %d\n, -- 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/
[PATCH v2 1/1] staging: lustre: libcfs: nidstrings.c - use ARRAY_SIZE macro
From: Anil Belur - this patch replaces sizeof(a)/sizeof(a[0]) with the ARRAY_SIZE macro to get the number of nidstrings (and netstrfns) - v2: also for netstrfns Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/libcfs/nidstrings.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/nidstrings.c b/drivers/staging/lustre/lustre/libcfs/nidstrings.c index 87705ae..4fc7b45 100644 --- a/drivers/staging/lustre/lustre/libcfs/nidstrings.c +++ b/drivers/staging/lustre/lustre/libcfs/nidstrings.c @@ -74,8 +74,7 @@ libcfs_next_nidstring(void) spin_lock_irqsave(_nidstring_lock, flags); str = libcfs_nidstrings[libcfs_nidstring_idx++]; - if (libcfs_nidstring_idx == - sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0])) + if (libcfs_nidstring_idx == ARRAY_SIZE(libcfs_nidstrings)) libcfs_nidstring_idx = 0; spin_unlock_irqrestore(_nidstring_lock, flags); @@ -198,7 +197,7 @@ static struct netstrfns libcfs_netstrfns[] = { {/* .nf_type */ -1}, }; -const int libcfs_nnetstrfns = sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]); +const int libcfs_nnetstrfns = ARRAY_SIZE(libcfs_netstrfns); int libcfs_lo_str2addr(const char *str, int nob, __u32 *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/
[PATCH v2 1/1] staging: lustre: libcfs: nidstrings.c - use ARRAY_SIZE macro
From: Anil Belur ask...@gmail.com - this patch replaces sizeof(a)/sizeof(a[0]) with the ARRAY_SIZE macro to get the number of nidstrings (and netstrfns) - v2: also for netstrfns Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/libcfs/nidstrings.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/nidstrings.c b/drivers/staging/lustre/lustre/libcfs/nidstrings.c index 87705ae..4fc7b45 100644 --- a/drivers/staging/lustre/lustre/libcfs/nidstrings.c +++ b/drivers/staging/lustre/lustre/libcfs/nidstrings.c @@ -74,8 +74,7 @@ libcfs_next_nidstring(void) spin_lock_irqsave(libcfs_nidstring_lock, flags); str = libcfs_nidstrings[libcfs_nidstring_idx++]; - if (libcfs_nidstring_idx == - sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0])) + if (libcfs_nidstring_idx == ARRAY_SIZE(libcfs_nidstrings)) libcfs_nidstring_idx = 0; spin_unlock_irqrestore(libcfs_nidstring_lock, flags); @@ -198,7 +197,7 @@ static struct netstrfns libcfs_netstrfns[] = { {/* .nf_type */ -1}, }; -const int libcfs_nnetstrfns = sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]); +const int libcfs_nnetstrfns = ARRAY_SIZE(libcfs_netstrfns); int libcfs_lo_str2addr(const char *str, int nob, __u32 *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/
[PATCH 1/1] staging: speakup: main.c - use time_after()
From: Anil Belur - this patch fixes jiffies comparision with a safer function to prevent any overflows Signed-off-by: Anil Belur --- drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 7de79d5..0cd3cdb 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -2067,7 +2067,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, if (up_flag) goto out; if (last_keycode == keycode && - last_spk_jiffy + MAX_DELAY > jiffies) { + time_after(last_spk_jiffy + MAX_DELAY, jiffies)) { spk_close_press = 1; offset = spk_shift_table[shift_info + 32]; /* double press? */ -- 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/
[PATCH 1/1] staging: speakup: main.c - use time_after()
From: Anil Belur ask...@gmail.com - this patch fixes jiffies comparision with a safer function to prevent any overflows Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/speakup/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 7de79d5..0cd3cdb 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -2067,7 +2067,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym, if (up_flag) goto out; if (last_keycode == keycode - last_spk_jiffy + MAX_DELAY jiffies) { + time_after(last_spk_jiffy + MAX_DELAY, jiffies)) { spk_close_press = 1; offset = spk_shift_table[shift_info + 32]; /* double press? */ -- 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/
[PATCH 1/1] staging: lustre: libcfs: nidstrings.c - use ARRAY_SIZE macro
From: Anil Belur - this patch replaces sizeof(a)/sizeof(a[0]) with the ARRAY_SIZE macro to get the number of nidstrings Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/libcfs/nidstrings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/nidstrings.c b/drivers/staging/lustre/lustre/libcfs/nidstrings.c index 87705ae..13a2791 100644 --- a/drivers/staging/lustre/lustre/libcfs/nidstrings.c +++ b/drivers/staging/lustre/lustre/libcfs/nidstrings.c @@ -74,8 +74,7 @@ libcfs_next_nidstring(void) spin_lock_irqsave(_nidstring_lock, flags); str = libcfs_nidstrings[libcfs_nidstring_idx++]; - if (libcfs_nidstring_idx == - sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0])) + if (libcfs_nidstring_idx == ARRAY_SIZE(libcfs_nidstrings)) libcfs_nidstring_idx = 0; spin_unlock_irqrestore(_nidstring_lock, flags); -- 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/
[PATCH 1/1] staging: speakup: speakup_dectlk.c - use time_before_eq()
From: Anil Belur - this replaces jiffies comparision with safer function using time_after_eq() Signed-off-by: Anil Belur --- drivers/staging/speakup/speakup_dectlk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c index af84868..c07c967 100644 --- a/drivers/staging/speakup/speakup_dectlk.c +++ b/drivers/staging/speakup/speakup_dectlk.c @@ -267,7 +267,7 @@ static void do_catch_up(struct spk_synth *synth) else if (ch <= SPACE) { if (!in_escape && strchr(",.!?;:", last)) spk_serial_out(PROCSPEECH); - if (jiffies >= jiff_max) { + if (time_after_eq(jiffies, jiff_max)) { if (!in_escape) spk_serial_out(PROCSPEECH); spin_lock_irqsave(_info.spinlock, -- 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/
[PATCH 1/1] staging: speakup: speakup_dectlk.c - use time_before_eq()
From: Anil Belur ask...@gmail.com - this replaces jiffies comparision with safer function using time_after_eq() Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/speakup/speakup_dectlk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c index af84868..c07c967 100644 --- a/drivers/staging/speakup/speakup_dectlk.c +++ b/drivers/staging/speakup/speakup_dectlk.c @@ -267,7 +267,7 @@ static void do_catch_up(struct spk_synth *synth) else if (ch = SPACE) { if (!in_escape strchr(,.!?;:, last)) spk_serial_out(PROCSPEECH); - if (jiffies = jiff_max) { + if (time_after_eq(jiffies, jiff_max)) { if (!in_escape) spk_serial_out(PROCSPEECH); spin_lock_irqsave(speakup_info.spinlock, -- 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/
[PATCH 1/1] staging: lustre: libcfs: nidstrings.c - use ARRAY_SIZE macro
From: Anil Belur ask...@gmail.com - this patch replaces sizeof(a)/sizeof(a[0]) with the ARRAY_SIZE macro to get the number of nidstrings Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/libcfs/nidstrings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/nidstrings.c b/drivers/staging/lustre/lustre/libcfs/nidstrings.c index 87705ae..13a2791 100644 --- a/drivers/staging/lustre/lustre/libcfs/nidstrings.c +++ b/drivers/staging/lustre/lustre/libcfs/nidstrings.c @@ -74,8 +74,7 @@ libcfs_next_nidstring(void) spin_lock_irqsave(libcfs_nidstring_lock, flags); str = libcfs_nidstrings[libcfs_nidstring_idx++]; - if (libcfs_nidstring_idx == - sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0])) + if (libcfs_nidstring_idx == ARRAY_SIZE(libcfs_nidstrings)) libcfs_nidstring_idx = 0; spin_unlock_irqrestore(libcfs_nidstring_lock, flags); -- 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/
[PATCH 1/1] staging: media: msi3101: sdr-msi3101.c - replace with time_before_eq()
From: Anil Belur - this fix replaces jiffies interval comparision with safer function to avoid any overflow and wrap around ? Signed-off-by: Anil Belur --- drivers/staging/media/msi3101/sdr-msi3101.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index 08d0d09..b828857 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -180,6 +180,7 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -208,7 +209,8 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -332,6 +334,7 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -360,7 +363,8 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -397,6 +401,7 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -425,7 +430,8 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; @@ -460,6 +466,7 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -488,7 +495,8 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s->jiffies_next + msecs_to_jiffies(1)) <= jiffies) { + expires = s->jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s->jiffies_next); unsigned int samples = sample_num[i_max - 1] - s->sample; -- 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/
[PATCH v2 1/1] staging: lustre: lnet: api-ni.c: fixed sparse warnings
From: Anil Belur - this fixes few sparse warnings for missing static in functions: drivers/staging/lustre/lnet/lnet/api-ni.c:63:6: warning: symbol 'lnet_get_routes' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:69:6: warning: symbol 'lnet_get_networks' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:93:1: warning: symbol 'lnet_init_locks' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:102:1: warning: symbol 'lnet_fini_locks' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:180:6: warning: symbol 'lnet_assert_wire_constants' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:273:7: warning: symbol 'lnet_find_lnd_by_type' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:419:1: warning: symbol 'lnet_create_interface_cookie' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:450:1: warning: symbol 'lnet_res_container_cleanup' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:494:1: warning: symbol 'lnet_res_container_setup' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:612:1: warning: symbol 'lnet_prepare' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:917:1: warning: symbol 'lnet_shutdown_lndnis' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:1034:1: warning: symbol 'lnet_startup_lndnis' was not declared. Should it be static? Signed-off-by: Anil Belur --- drivers/staging/lustre/lnet/lnet/api-ni.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 3f878de..cd6792e 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -60,13 +60,13 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT; module_param(rnet_htable_size, int, 0444); MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table"); -char * +static char * lnet_get_routes(void) { return routes; } -char * +static char * lnet_get_networks(void) { char *nets; @@ -89,7 +89,7 @@ lnet_get_networks(void) return "tcp"; } -void +static void lnet_init_locks(void) { spin_lock_init(_lnet.ln_eq_wait_lock); @@ -98,7 +98,7 @@ lnet_init_locks(void) mutex_init(_lnet.ln_api_mutex); } -void +static void lnet_fini_locks(void) { } @@ -177,7 +177,7 @@ lnet_create_locks(void) return -ENOMEM; } -void lnet_assert_wire_constants (void) +static void lnet_assert_wire_constants (void) { /* Wire protocol assertions generated by 'wirecheck' * running on Linux robert.bartonsoftware.com 2.6.8-1.521 @@ -270,7 +270,7 @@ void lnet_assert_wire_constants (void) CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4); } -lnd_t * +static lnd_t * lnet_find_lnd_by_type (int type) { lnd_t *lnd; @@ -415,7 +415,7 @@ lnet_freelist_fini (lnet_freelist_t *fl) #endif /* LNET_USE_LIB_FREELIST */ -__u64 +static __u64 lnet_create_interface_cookie (void) { /* NB the interface cookie in wire handles guards against delayed @@ -446,7 +446,7 @@ lnet_res_type2str(int type) } } -void +static void lnet_res_container_cleanup(struct lnet_res_container *rec) { int count = 0; @@ -490,7 +490,7 @@ lnet_res_container_cleanup(struct lnet_res_container *rec) rec->rec_type = 0; /* mark it as finalized */ } -int +static int lnet_res_container_setup(struct lnet_res_container *rec, int cpt, int type, int objnum, int objsz) { @@ -608,7 +608,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) int lnet_unprepare(void); -int +static int lnet_prepare(lnet_pid_t requested_pid) { /* Prepare to bring up the network */ @@ -913,7 +913,7 @@ lnet_ni_tq_credits(lnet_ni_t *ni) return credits; } -void +static void lnet_shutdown_lndnis (void) { int i; @@ -1030,7 +1030,7 @@ lnet_shutdown_lndnis (void) } } -int +static int lnet_startup_lndnis (void) { lnd_t *lnd; -- 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/
[PATCH v2 1/1] staging: lustre: lnet: api-ni.c: fixed sparse warnings
From: Anil Belur ask...@gmail.com - this fixes few sparse warnings for missing static in functions: drivers/staging/lustre/lnet/lnet/api-ni.c:63:6: warning: symbol 'lnet_get_routes' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:69:6: warning: symbol 'lnet_get_networks' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:93:1: warning: symbol 'lnet_init_locks' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:102:1: warning: symbol 'lnet_fini_locks' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:180:6: warning: symbol 'lnet_assert_wire_constants' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:273:7: warning: symbol 'lnet_find_lnd_by_type' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:419:1: warning: symbol 'lnet_create_interface_cookie' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:450:1: warning: symbol 'lnet_res_container_cleanup' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:494:1: warning: symbol 'lnet_res_container_setup' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:612:1: warning: symbol 'lnet_prepare' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:917:1: warning: symbol 'lnet_shutdown_lndnis' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/api-ni.c:1034:1: warning: symbol 'lnet_startup_lndnis' was not declared. Should it be static? Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lnet/lnet/api-ni.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 3f878de..cd6792e 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -60,13 +60,13 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT; module_param(rnet_htable_size, int, 0444); MODULE_PARM_DESC(rnet_htable_size, size of remote network hash table); -char * +static char * lnet_get_routes(void) { return routes; } -char * +static char * lnet_get_networks(void) { char *nets; @@ -89,7 +89,7 @@ lnet_get_networks(void) return tcp; } -void +static void lnet_init_locks(void) { spin_lock_init(the_lnet.ln_eq_wait_lock); @@ -98,7 +98,7 @@ lnet_init_locks(void) mutex_init(the_lnet.ln_api_mutex); } -void +static void lnet_fini_locks(void) { } @@ -177,7 +177,7 @@ lnet_create_locks(void) return -ENOMEM; } -void lnet_assert_wire_constants (void) +static void lnet_assert_wire_constants (void) { /* Wire protocol assertions generated by 'wirecheck' * running on Linux robert.bartonsoftware.com 2.6.8-1.521 @@ -270,7 +270,7 @@ void lnet_assert_wire_constants (void) CLASSERT ((int)sizeof(((lnet_hdr_t *)0)-msg.hello.type) == 4); } -lnd_t * +static lnd_t * lnet_find_lnd_by_type (int type) { lnd_t *lnd; @@ -415,7 +415,7 @@ lnet_freelist_fini (lnet_freelist_t *fl) #endif /* LNET_USE_LIB_FREELIST */ -__u64 +static __u64 lnet_create_interface_cookie (void) { /* NB the interface cookie in wire handles guards against delayed @@ -446,7 +446,7 @@ lnet_res_type2str(int type) } } -void +static void lnet_res_container_cleanup(struct lnet_res_container *rec) { int count = 0; @@ -490,7 +490,7 @@ lnet_res_container_cleanup(struct lnet_res_container *rec) rec-rec_type = 0; /* mark it as finalized */ } -int +static int lnet_res_container_setup(struct lnet_res_container *rec, int cpt, int type, int objnum, int objsz) { @@ -608,7 +608,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) int lnet_unprepare(void); -int +static int lnet_prepare(lnet_pid_t requested_pid) { /* Prepare to bring up the network */ @@ -913,7 +913,7 @@ lnet_ni_tq_credits(lnet_ni_t *ni) return credits; } -void +static void lnet_shutdown_lndnis (void) { int i; @@ -1030,7 +1030,7 @@ lnet_shutdown_lndnis (void) } } -int +static int lnet_startup_lndnis (void) { lnd_t *lnd; -- 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/
[PATCH 1/1] staging: media: msi3101: sdr-msi3101.c - replace with time_before_eq()
From: Anil Belur ask...@gmail.com - this fix replaces jiffies interval comparision with safer function to avoid any overflow and wrap around ? Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/media/msi3101/sdr-msi3101.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c index 08d0d09..b828857 100644 --- a/drivers/staging/media/msi3101/sdr-msi3101.c +++ b/drivers/staging/media/msi3101/sdr-msi3101.c @@ -180,6 +180,7 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -208,7 +209,8 @@ static int msi3101_convert_stream_504(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s-jiffies_next + msecs_to_jiffies(1)) = jiffies) { + expires = s-jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s-jiffies_next); unsigned int samples = sample_num[i_max - 1] - s-sample; @@ -332,6 +334,7 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -360,7 +363,8 @@ static int msi3101_convert_stream_384(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s-jiffies_next + msecs_to_jiffies(1)) = jiffies) { + expires = s-jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s-jiffies_next); unsigned int samples = sample_num[i_max - 1] - s-sample; @@ -397,6 +401,7 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -425,7 +430,8 @@ static int msi3101_convert_stream_336(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s-jiffies_next + msecs_to_jiffies(1)) = jiffies) { + expires = s-jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s-jiffies_next); unsigned int samples = sample_num[i_max - 1] - s-sample; @@ -460,6 +466,7 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, { int i, i_max, dst_len = 0; u32 sample_num[3]; + unsigned long expires; /* There could be 1-3 1024 bytes URB frames */ i_max = src_len / 1024; @@ -488,7 +495,8 @@ static int msi3101_convert_stream_252(struct msi3101_state *s, u8 *dst, } /* calculate samping rate and output it in 10 seconds intervals */ - if ((s-jiffies_next + msecs_to_jiffies(1)) = jiffies) { + expires = s-jiffies_next + msecs_to_jiffies(1); + if (time_before_eq(expires, jiffies)) { unsigned long jiffies_now = jiffies; unsigned long msecs = jiffies_to_msecs(jiffies_now) - jiffies_to_msecs(s-jiffies_next); unsigned int samples = sample_num[i_max - 1] - s-sample; -- 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/
[PATCH 2/4] staging: lustre: llite: llite_capa.c - fixed warning to use recomended headers
From: Anil Belur - this fixes "WARNING: Use #include instead of " Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/llite/llite_capa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c index 7ed45a4..2f11cbf 100644 --- a/drivers/staging/lustre/lustre/llite/llite_capa.c +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c @@ -41,7 +41,7 @@ #define DEBUG_SUBSYSTEM S_LLITE #include -#include +#include #include #include -- 1.9.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: lustre: llite: dir.c - fix for coding style issues
From: Anil Belur - this fixes some coding style issues "ERROR: "(foo*)" should be "(foo *)" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/llite/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 5d096d8..6efaf03 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1266,7 +1266,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 *)arg)) return -EFAULT; return 0; @@ -1778,7 +1778,7 @@ out_quotactl: return -EFAULT; return 0; case LL_IOC_GET_CONNECT_FLAGS: { - return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void*)arg); + return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void *)arg); } case OBD_IOC_CHANGELOG_SEND: case OBD_IOC_CHANGELOG_CLEAR: -- 1.9.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: lustre: llite: dir.c - fixes indented labels in code
From: Anil Belur - this fixes "WARNING: labels should not be indented" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/llite/dir.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index ae6f61a..5d096d8 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1501,7 +1501,7 @@ out_rmdir: GOTO(out_req, rc = -EFAULT); rc = -EOVERFLOW; } - skip_lmm: +skip_lmm: if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) { struct lov_user_mds_data *lmdp; lstat_t st = { 0 }; @@ -1525,7 +1525,7 @@ out_rmdir: GOTO(out_req, rc = -EFAULT); } - out_req: +out_req: ptlrpc_req_finished(request); if (filename) ll_putname(filename); @@ -1589,9 +1589,9 @@ out_rmdir: if (copy_to_user(>lmd_st, , sizeof(st))) GOTO(free_lsm, rc = -EFAULT); - free_lsm: +free_lsm: obd_free_memmd(sbi->ll_dt_exp, ); - free_lmm: +free_lmm: OBD_FREE_LARGE(lmm, lmmsize); return rc; } @@ -1653,7 +1653,7 @@ out_rmdir: CDEBUG(D_QUOTA, "copy_to_user failed\n"); GOTO(out_poll, rc); } - out_poll: +out_poll: OBD_FREE_PTR(check); return rc; } @@ -1702,9 +1702,9 @@ out_rmdir: rc = -EFAULT; } - out_quotactl_20: +out_quotactl_20: OBD_FREE_PTR(qctl_20); - out_quotactl_18: +out_quotactl_18: OBD_FREE_PTR(qctl_18); return rc; } @@ -1726,7 +1726,7 @@ out_rmdir: if (rc == 0 && copy_to_user((void *)arg,qctl,sizeof(*qctl))) rc = -EFAULT; - out_quotactl: +out_quotactl: OBD_FREE_PTR(qctl); return rc; } -- 1.9.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: lustre: llite: llite_capa.c - fixes checkpatch errors - unecessary init of static variables to 0
From: Anil Belur - this commit fixes some "ERROR: do not initialise statics to 0 or NULL" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/llite/llite_capa.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c index d06d0b1..7ed45a4 100644 --- a/drivers/staging/lustre/lustre/llite/llite_capa.c +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c @@ -63,10 +63,10 @@ static struct list_head *ll_capa_list = _list[CAPA_SITE_CLIENT]; struct timer_list ll_capa_timer; /* for debug: indicate whether capa on llite is enabled or not */ static atomic_t ll_capa_debug = ATOMIC_INIT(0); -static unsigned long long ll_capa_renewed = 0; -static unsigned long long ll_capa_renewal_noent = 0; -static unsigned long long ll_capa_renewal_failed = 0; -static unsigned long long ll_capa_renewal_retries = 0; +static unsigned long long ll_capa_renewed; +static unsigned long long ll_capa_renewal_noent; +static unsigned long long ll_capa_renewal_failed; +static unsigned long long ll_capa_renewal_retries; static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa); -- 1.9.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: lustre: llite: dir.c - fixes indented labels in code
From: Anil Belur ask...@gmail.com - this fixes WARNING: labels should not be indented Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/llite/dir.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index ae6f61a..5d096d8 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1501,7 +1501,7 @@ out_rmdir: GOTO(out_req, rc = -EFAULT); rc = -EOVERFLOW; } - skip_lmm: +skip_lmm: if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) { struct lov_user_mds_data *lmdp; lstat_t st = { 0 }; @@ -1525,7 +1525,7 @@ out_rmdir: GOTO(out_req, rc = -EFAULT); } - out_req: +out_req: ptlrpc_req_finished(request); if (filename) ll_putname(filename); @@ -1589,9 +1589,9 @@ out_rmdir: if (copy_to_user(lumd-lmd_st, st, sizeof(st))) GOTO(free_lsm, rc = -EFAULT); - free_lsm: +free_lsm: obd_free_memmd(sbi-ll_dt_exp, lsm); - free_lmm: +free_lmm: OBD_FREE_LARGE(lmm, lmmsize); return rc; } @@ -1653,7 +1653,7 @@ out_rmdir: CDEBUG(D_QUOTA, copy_to_user failed\n); GOTO(out_poll, rc); } - out_poll: +out_poll: OBD_FREE_PTR(check); return rc; } @@ -1702,9 +1702,9 @@ out_rmdir: rc = -EFAULT; } - out_quotactl_20: +out_quotactl_20: OBD_FREE_PTR(qctl_20); - out_quotactl_18: +out_quotactl_18: OBD_FREE_PTR(qctl_18); return rc; } @@ -1726,7 +1726,7 @@ out_rmdir: if (rc == 0 copy_to_user((void *)arg,qctl,sizeof(*qctl))) rc = -EFAULT; - out_quotactl: +out_quotactl: OBD_FREE_PTR(qctl); return rc; } -- 1.9.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/4] staging: lustre: llite: llite_capa.c - fixed warning to use recomended headers linux/uaccess.h
From: Anil Belur ask...@gmail.com - this fixes WARNING: Use #include linux/uaccess.h instead of asm/uaccess.h Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/llite/llite_capa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c index 7ed45a4..2f11cbf 100644 --- a/drivers/staging/lustre/lustre/llite/llite_capa.c +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c @@ -41,7 +41,7 @@ #define DEBUG_SUBSYSTEM S_LLITE #include linux/fs.h -#include asm/uaccess.h +#include linux/uaccess.h #include linux/file.h #include linux/kmod.h -- 1.9.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: lustre: llite: dir.c - fix for coding style issues
From: Anil Belur ask...@gmail.com - this fixes some coding style issues ERROR: (foo*) should be (foo *) Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/llite/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 5d096d8..6efaf03 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1266,7 +1266,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 *)arg)) return -EFAULT; return 0; @@ -1778,7 +1778,7 @@ out_quotactl: return -EFAULT; return 0; case LL_IOC_GET_CONNECT_FLAGS: { - return obd_iocontrol(cmd, sbi-ll_md_exp, 0, NULL, (void*)arg); + return obd_iocontrol(cmd, sbi-ll_md_exp, 0, NULL, (void *)arg); } case OBD_IOC_CHANGELOG_SEND: case OBD_IOC_CHANGELOG_CLEAR: -- 1.9.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: lustre: llite: llite_capa.c - fixes checkpatch errors - unecessary init of static variables to 0
From: Anil Belur ask...@gmail.com - this commit fixes some ERROR: do not initialise statics to 0 or NULL Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/llite/llite_capa.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c index d06d0b1..7ed45a4 100644 --- a/drivers/staging/lustre/lustre/llite/llite_capa.c +++ b/drivers/staging/lustre/lustre/llite/llite_capa.c @@ -63,10 +63,10 @@ static struct list_head *ll_capa_list = capa_list[CAPA_SITE_CLIENT]; struct timer_list ll_capa_timer; /* for debug: indicate whether capa on llite is enabled or not */ static atomic_t ll_capa_debug = ATOMIC_INIT(0); -static unsigned long long ll_capa_renewed = 0; -static unsigned long long ll_capa_renewal_noent = 0; -static unsigned long long ll_capa_renewal_failed = 0; -static unsigned long long ll_capa_renewal_retries = 0; +static unsigned long long ll_capa_renewed; +static unsigned long long ll_capa_renewal_noent; +static unsigned long long ll_capa_renewal_failed; +static unsigned long long ll_capa_renewal_retries; static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa); -- 1.9.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: lustre: lustre: libcfs: fail.c - fix sparse warnings EXPORT_SYMBOL
From: Anil Belur - this fixes "WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/libcfs/fail.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/fail.c b/drivers/staging/lustre/lustre/libcfs/fail.c index ba43ff7..f63eac9 100644 --- a/drivers/staging/lustre/lustre/libcfs/fail.c +++ b/drivers/staging/lustre/lustre/libcfs/fail.c @@ -36,13 +36,15 @@ #include unsigned long cfs_fail_loc = 0; -unsigned int cfs_fail_val = 0; -wait_queue_head_t cfs_race_waitq; -int cfs_race_state; - EXPORT_SYMBOL(cfs_fail_loc); + +unsigned int cfs_fail_val = 0; EXPORT_SYMBOL(cfs_fail_val); + +wait_queue_head_t cfs_race_waitq; EXPORT_SYMBOL(cfs_race_waitq); + +int cfs_race_state; EXPORT_SYMBOL(cfs_race_state); int __cfs_fail_check_set(__u32 id, __u32 value, int set) -- 1.9.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: lustre: lustre: libcfs: fail.c - fix sparse warnings EXPORT_SYMBOL
From: Anil Belur ask...@gmail.com - this fixes WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/libcfs/fail.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/fail.c b/drivers/staging/lustre/lustre/libcfs/fail.c index ba43ff7..f63eac9 100644 --- a/drivers/staging/lustre/lustre/libcfs/fail.c +++ b/drivers/staging/lustre/lustre/libcfs/fail.c @@ -36,13 +36,15 @@ #include linux/libcfs/libcfs.h unsigned long cfs_fail_loc = 0; -unsigned int cfs_fail_val = 0; -wait_queue_head_t cfs_race_waitq; -int cfs_race_state; - EXPORT_SYMBOL(cfs_fail_loc); + +unsigned int cfs_fail_val = 0; EXPORT_SYMBOL(cfs_fail_val); + +wait_queue_head_t cfs_race_waitq; EXPORT_SYMBOL(cfs_race_waitq); + +int cfs_race_state; EXPORT_SYMBOL(cfs_race_state); int __cfs_fail_check_set(__u32 id, __u32 value, int set) -- 1.9.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: lustre: lustre: ldlm: ldlm_lib.c - removed unnecessary braces
From: Anil Belur - this change fixes "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 8bb5915..5d69af5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -74,9 +74,8 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid, if (create) { OBD_ALLOC(imp_conn, sizeof(*imp_conn)); - if (!imp_conn) { + if (!imp_conn) GOTO(out_put, rc = -ENOMEM); - } } spin_lock(>imp_lock); @@ -662,9 +661,8 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id) struct ptlrpc_reply_state *rs; struct obd_export*exp; - if (req->rq_no_reply) { + if (req->rq_no_reply) return; - } svcpt = req->rq_rqbd->rqbd_svcpt; rs = req->rq_reply_state; -- 1.9.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: lustre: ldlm: ldlm_resource.c removed unecessary braces
From: Anil Belur - this fixed the "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c55d72f..e5171da 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -854,9 +854,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, { int rc; - if (!ns) { + if (!ns) return; - } spin_lock(>ns_lock); ns->ns_stopping = 1; @@ -888,9 +887,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, */ void ldlm_namespace_free_post(struct ldlm_namespace *ns) { - if (!ns) { + if (!ns) return; - } /* Make sure that nobody can find this ns in its list. */ ldlm_namespace_unregister(ns, ns->ns_client); -- 1.9.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: lustre: ldlm: ldlm_lib.c removed unecessary space after function name
From: Anil Belur - this fixes "WARNING: space prohibited between function name and open parenthesis '(" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 5d69af5..d8ad808 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -510,7 +510,7 @@ int client_connect_import(const struct lu_env *env, rc = ptlrpc_connect_import(imp); if (rc != 0) { - LASSERT (imp->imp_state == LUSTRE_IMP_DISCON); + LASSERT(imp->imp_state == LUSTRE_IMP_DISCON); GOTO(out_ldlm, rc); } LASSERT(*exp != NULL && (*exp)->exp_connection); @@ -668,25 +668,25 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id) rs = req->rq_reply_state; if (rs == NULL || !rs->rs_difficult) { /* no notifiers */ - target_send_reply_msg (req, rc, fail_id); + target_send_reply_msg(req, rc, fail_id); return; } /* must be an export if locks saved */ - LASSERT (req->rq_export != NULL); + LASSERT(req->rq_export != NULL); /* req/reply consistent */ LASSERT(rs->rs_svcpt == svcpt); /* "fresh" reply */ - LASSERT (!rs->rs_scheduled); - LASSERT (!rs->rs_scheduled_ever); - LASSERT (!rs->rs_handled); - LASSERT (!rs->rs_on_net); - LASSERT (rs->rs_export == NULL); - LASSERT (list_empty(>rs_obd_list)); - LASSERT (list_empty(>rs_exp_list)); - - exp = class_export_get (req->rq_export); + LASSERT(!rs->rs_scheduled); + LASSERT(!rs->rs_scheduled_ever); + LASSERT(!rs->rs_handled); + LASSERT(!rs->rs_on_net); + LASSERT(rs->rs_export == NULL); + LASSERT(list_empty(>rs_obd_list)); + LASSERT(list_empty(>rs_exp_list)); + + exp = class_export_get(req->rq_export); /* disable reply scheduling while I'm setting up */ rs->rs_scheduled = 1; -- 1.9.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: lustre: ldlm: ldlm_resource.c removed unecessary braces
From: Anil Belur - this fixed the "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c55d72f..e5171da 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -854,9 +854,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, { int rc; - if (!ns) { + if (!ns) return; - } spin_lock(>ns_lock); ns->ns_stopping = 1; @@ -888,9 +887,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, */ void ldlm_namespace_free_post(struct ldlm_namespace *ns) { - if (!ns) { + if (!ns) return; - } /* Make sure that nobody can find this ns in its list. */ ldlm_namespace_unregister(ns, ns->ns_client); -- 1.9.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: lustre: ldlm: ldlm_resource.c replace obsolete function with kstrtoul()
From: Anil Belur - this change fixes the warning "WARNING: simple_strtoul is obsolete, use kstrtoul instead" - removed the unused var 'end' as this is no longer required for kstrtoul() Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c55d72f..5070a60 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -194,9 +194,10 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer, size_t count, loff_t *off) { struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private; - char dummy[MAX_STRING_SIZE + 1], *end; + char dummy[MAX_STRING_SIZE + 1]; unsigned long tmp; int lru_resize; + int err; dummy[MAX_STRING_SIZE] = '\0'; if (copy_from_user(dummy, buffer, MAX_STRING_SIZE)) @@ -228,8 +229,8 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer, return count; } - tmp = simple_strtoul(dummy, , 0); - if (dummy == end) { + err = kstrtoul(dummy, 10, ); + if (err != 0) { CERROR("invalid value written\n"); return -EINVAL; } -- 1.9.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: lustre: lustre: fld: lproc_fld.c fixed warning
From: Anil Belur fixed warning "WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/fld/fld_request.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 1f8abba..211430d 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -324,7 +324,6 @@ void fld_client_proc_fini(struct lu_client_fld *fld) return; } #endif - EXPORT_SYMBOL(fld_client_proc_fini); static inline int hash_is_sane(int hash) -- 1.9.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: lustre: lustre: fld: lproc_fld.c fixed warning
From: Anil Belur fixed warning for line over 80 characters by moving the struct init onto a diff line. Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c b/drivers/staging/lustre/lustre/fld/lproc_fld.c index b6fff2e..01380b6 100644 --- a/drivers/staging/lustre/lustre/fld/lproc_fld.c +++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c @@ -91,10 +91,11 @@ static ssize_t fld_proc_hash_seq_write(struct file *file, const char *buffer, size_t count, loff_t *off) { - struct lu_client_fld *fld = ((struct seq_file *)file->private_data)->private; + struct lu_client_fld *fld; struct lu_fld_hash *hash = NULL; int i; + fld = ((struct seq_file *)file->private_data)->private; LASSERT(fld != NULL); for (i = 0; fld_hash[i].fh_name != NULL; i++) { -- 1.9.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 : lustre : lustre : fid : lproc_fid.c: fixed warning
From: Anil Belur fixed warning for line over 80 characters by moving the initilation onto a diff line. Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/fid/lproc_fid.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index 6f5674d..20078df 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -98,9 +98,10 @@ static ssize_t lprocfs_fid_space_seq_write(struct file *file, const char __user *buffer, size_t count, loff_t *off) { - struct lu_client_seq *seq = ((struct seq_file *)file->private_data)->private; + struct lu_client_seq *seq; int rc; + seq = ((struct seq_file *)file->private_data)->private; LASSERT(seq != NULL); mutex_lock(>lcs_mutex); @@ -135,10 +136,11 @@ static ssize_t lprocfs_fid_width_seq_write(struct file *file, const char __user *buffer, size_t count, loff_t *off) { - struct lu_client_seq *seq = ((struct seq_file *)file->private_data)->private; + struct lu_client_seq *seq; __u64 max; int rc, val; + seq = ((struct seq_file *)file->private_data)->private; LASSERT(seq != NULL); rc = lprocfs_write_helper(buffer, count, ); -- 1.9.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 : lustre : lustre : fid : lproc_fid.c: fixed warning
From: Anil Belur ask...@gmail.com fixed warning for line over 80 characters by moving the initilation onto a diff line. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/fid/lproc_fid.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index 6f5674d..20078df 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -98,9 +98,10 @@ static ssize_t lprocfs_fid_space_seq_write(struct file *file, const char __user *buffer, size_t count, loff_t *off) { - struct lu_client_seq *seq = ((struct seq_file *)file-private_data)-private; + struct lu_client_seq *seq; int rc; + seq = ((struct seq_file *)file-private_data)-private; LASSERT(seq != NULL); mutex_lock(seq-lcs_mutex); @@ -135,10 +136,11 @@ static ssize_t lprocfs_fid_width_seq_write(struct file *file, const char __user *buffer, size_t count, loff_t *off) { - struct lu_client_seq *seq = ((struct seq_file *)file-private_data)-private; + struct lu_client_seq *seq; __u64 max; int rc, val; + seq = ((struct seq_file *)file-private_data)-private; LASSERT(seq != NULL); rc = lprocfs_write_helper(buffer, count, val); -- 1.9.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: lustre: lustre: fld: lproc_fld.c fixed warning
From: Anil Belur ask...@gmail.com fixed warning WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/fld/fld_request.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 1f8abba..211430d 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -324,7 +324,6 @@ void fld_client_proc_fini(struct lu_client_fld *fld) return; } #endif - EXPORT_SYMBOL(fld_client_proc_fini); static inline int hash_is_sane(int hash) -- 1.9.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: lustre: lustre: fld: lproc_fld.c fixed warning
From: Anil Belur ask...@gmail.com fixed warning for line over 80 characters by moving the struct init onto a diff line. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c b/drivers/staging/lustre/lustre/fld/lproc_fld.c index b6fff2e..01380b6 100644 --- a/drivers/staging/lustre/lustre/fld/lproc_fld.c +++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c @@ -91,10 +91,11 @@ static ssize_t fld_proc_hash_seq_write(struct file *file, const char *buffer, size_t count, loff_t *off) { - struct lu_client_fld *fld = ((struct seq_file *)file-private_data)-private; + struct lu_client_fld *fld; struct lu_fld_hash *hash = NULL; int i; + fld = ((struct seq_file *)file-private_data)-private; LASSERT(fld != NULL); for (i = 0; fld_hash[i].fh_name != NULL; i++) { -- 1.9.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: lustre: ldlm: ldlm_resource.c replace obsolete function with kstrtoul()
From: Anil Belur ask...@gmail.com - this change fixes the warning WARNING: simple_strtoul is obsolete, use kstrtoul instead - removed the unused var 'end' as this is no longer required for kstrtoul() Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c55d72f..5070a60 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -194,9 +194,10 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer, size_t count, loff_t *off) { struct ldlm_namespace *ns = ((struct seq_file *)file-private_data)-private; - char dummy[MAX_STRING_SIZE + 1], *end; + char dummy[MAX_STRING_SIZE + 1]; unsigned long tmp; int lru_resize; + int err; dummy[MAX_STRING_SIZE] = '\0'; if (copy_from_user(dummy, buffer, MAX_STRING_SIZE)) @@ -228,8 +229,8 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer, return count; } - tmp = simple_strtoul(dummy, end, 0); - if (dummy == end) { + err = kstrtoul(dummy, 10, tmp); + if (err != 0) { CERROR(invalid value written\n); return -EINVAL; } -- 1.9.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: lustre: ldlm: ldlm_resource.c removed unecessary braces
From: Anil Belur ask...@gmail.com - this fixed the WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c55d72f..e5171da 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -854,9 +854,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, { int rc; - if (!ns) { + if (!ns) return; - } spin_lock(ns-ns_lock); ns-ns_stopping = 1; @@ -888,9 +887,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, */ void ldlm_namespace_free_post(struct ldlm_namespace *ns) { - if (!ns) { + if (!ns) return; - } /* Make sure that nobody can find this ns in its list. */ ldlm_namespace_unregister(ns, ns-ns_client); -- 1.9.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: lustre: lustre: ldlm: ldlm_lib.c - removed unnecessary braces
From: Anil Belur ask...@gmail.com - this change fixes WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 8bb5915..5d69af5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -74,9 +74,8 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid, if (create) { OBD_ALLOC(imp_conn, sizeof(*imp_conn)); - if (!imp_conn) { + if (!imp_conn) GOTO(out_put, rc = -ENOMEM); - } } spin_lock(imp-imp_lock); @@ -662,9 +661,8 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id) struct ptlrpc_reply_state *rs; struct obd_export*exp; - if (req-rq_no_reply) { + if (req-rq_no_reply) return; - } svcpt = req-rq_rqbd-rqbd_svcpt; rs = req-rq_reply_state; -- 1.9.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: lustre: ldlm: ldlm_resource.c removed unecessary braces
From: Anil Belur ask...@gmail.com - this fixed the WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index c55d72f..e5171da 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -854,9 +854,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, { int rc; - if (!ns) { + if (!ns) return; - } spin_lock(ns-ns_lock); ns-ns_stopping = 1; @@ -888,9 +887,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns, */ void ldlm_namespace_free_post(struct ldlm_namespace *ns) { - if (!ns) { + if (!ns) return; - } /* Make sure that nobody can find this ns in its list. */ ldlm_namespace_unregister(ns, ns-ns_client); -- 1.9.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: lustre: ldlm: ldlm_lib.c removed unecessary space after function name
From: Anil Belur ask...@gmail.com - this fixes WARNING: space prohibited between function name and open parenthesis '( Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 5d69af5..d8ad808 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -510,7 +510,7 @@ int client_connect_import(const struct lu_env *env, rc = ptlrpc_connect_import(imp); if (rc != 0) { - LASSERT (imp-imp_state == LUSTRE_IMP_DISCON); + LASSERT(imp-imp_state == LUSTRE_IMP_DISCON); GOTO(out_ldlm, rc); } LASSERT(*exp != NULL (*exp)-exp_connection); @@ -668,25 +668,25 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id) rs = req-rq_reply_state; if (rs == NULL || !rs-rs_difficult) { /* no notifiers */ - target_send_reply_msg (req, rc, fail_id); + target_send_reply_msg(req, rc, fail_id); return; } /* must be an export if locks saved */ - LASSERT (req-rq_export != NULL); + LASSERT(req-rq_export != NULL); /* req/reply consistent */ LASSERT(rs-rs_svcpt == svcpt); /* fresh reply */ - LASSERT (!rs-rs_scheduled); - LASSERT (!rs-rs_scheduled_ever); - LASSERT (!rs-rs_handled); - LASSERT (!rs-rs_on_net); - LASSERT (rs-rs_export == NULL); - LASSERT (list_empty(rs-rs_obd_list)); - LASSERT (list_empty(rs-rs_exp_list)); - - exp = class_export_get (req-rq_export); + LASSERT(!rs-rs_scheduled); + LASSERT(!rs-rs_scheduled_ever); + LASSERT(!rs-rs_handled); + LASSERT(!rs-rs_on_net); + LASSERT(rs-rs_export == NULL); + LASSERT(list_empty(rs-rs_obd_list)); + LASSERT(list_empty(rs-rs_exp_list)); + + exp = class_export_get(req-rq_export); /* disable reply scheduling while I'm setting up */ rs-rs_scheduled = 1; -- 1.9.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 v7 5/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 1f39219..de0ad37e 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -266,7 +266,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev, * fails. Access to this environment is serialized by ccc_inode_fini_guard * mutex. */ -static struct lu_env *ccc_inode_fini_env = NULL; +static struct lu_env *ccc_inode_fini_env; /** * A mutex serializing calls to slp_inode_fini() under extreme memory -- 1.9.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 v7 6/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: inline keyword should sit between storage class and type Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index de0ad37e..2f51b76 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -1273,7 +1273,7 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode) return lov_lsm_get(cl_i2info(inode)->lli_clob); } -void inline ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) +inline void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) { lov_lsm_put(cl_i2info(inode)->lli_clob, lsm); } -- 1.9.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 v7 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: line over 80 characters, used a new variable 'size_index' to store the offset. Replaced "unsigned long" with "loff_t" type for 'cur_index'. Removed the parenthesis around the second part of the if statement following the '||' as its not required. Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 2f51b76..b8552ab 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -821,10 +821,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * linux-2.6.18-128.1.1 miss to do that. * --bug 17336 */ loff_t size = cl_isize_read(inode); - unsigned long cur_index = start >> PAGE_CACHE_SHIFT; + loff_t cur_index = start >> PAGE_CACHE_SHIFT; + loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index)) + size_index < cur_index) *exceed = 1; } return result; -- 1.9.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 v7 4/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: Missing a blank line after declarations Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 1b0c216..1f39219 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -126,6 +126,7 @@ void ccc_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_thread_info *info = data; + OBD_SLAB_FREE_PTR(info, ccc_thread_kmem); } @@ -144,6 +145,7 @@ void ccc_session_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_session *session = data; + OBD_SLAB_FREE_PTR(session, ccc_session_kmem); } @@ -572,6 +574,7 @@ void ccc_lock_delete(const struct lu_env *env, void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice) { struct ccc_lock *clk = cl2ccc_lock(slice); + OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem); } @@ -733,6 +736,7 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io, loff_t start, loff_t end) { struct cl_object *obj = io->ci_obj; + return ccc_io_one_lock_index(env, io, enqflags, mode, cl_index(obj, start), cl_index(obj, end)); } -- 1.9.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 v7 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: suspect code indent for conditional statements (32, 32) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index b8552ab..08d6fbd 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -826,7 +826,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, if ((size == 0 && cur_index != 0) || size_index < cur_index) - *exceed = 1; + *exceed = 1; } return result; } else { -- 1.9.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 v7 1/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur Fixed "ERROR: need consistent spacing around '+' (ctx:WxV)" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index 7bbca4b..f669645 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout, io->ci_obj = clob; *envout = env; *ioout = io; - result = +1; + result = 1; } else result = PTR_ERR(env); } else -- 1.9.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 v7 2/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur fixed "WARNING: labels should not be indented" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index f669645..a658116 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -204,7 +204,7 @@ int cl_glimpse_size0(struct inode *inode, int agl) result = cl_io_get(inode, , , ); if (result > 0) { - again: +again: io->ci_verify_layout = 1; result = cl_io_init(env, io, CIT_MISC, io->ci_obj); if (result > 0) -- 1.9.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 v7 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
From: Anil Belur fixed warning: * WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c index 21de1cd..367bdad 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c @@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) if (rc) return rc; - stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); + stripes = min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT); lsm.lsm_stripe_count = stripes; easize = obd_size_diskmd(dt_exp, ); -- 1.9.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 v7] staging: lustre: lclient: fixing coding style issues
reworked patch 8/8 7/8 and 3/8, fixed changes recomemded by "andreas.dil...@intel.com" -- 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 v7 2/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed WARNING: labels should not be indented Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index f669645..a658116 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -204,7 +204,7 @@ int cl_glimpse_size0(struct inode *inode, int agl) result = cl_io_get(inode, env, io, refcheck); if (result 0) { - again: +again: io-ci_verify_layout = 1; result = cl_io_init(env, io, CIT_MISC, io-ci_obj); if (result 0) -- 1.9.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 v7] staging: lustre: lclient: fixing coding style issues
reworked patch 8/8 7/8 and 3/8, fixed changes recomemded by andreas.dil...@intel.com -- 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 v7 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed warning: * WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT) Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c index 21de1cd..367bdad 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c @@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) if (rc) return rc; - stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); + stripes = min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT); lsm.lsm_stripe_count = stripes; easize = obd_size_diskmd(dt_exp, lsm); -- 1.9.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 v7 1/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur ask...@gmail.com Fixed ERROR: need consistent spacing around '+' (ctx:WxV) Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index 7bbca4b..f669645 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout, io-ci_obj = clob; *envout = env; *ioout = io; - result = +1; + result = 1; } else result = PTR_ERR(env); } else -- 1.9.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 v7 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed: WARNING: suspect code indent for conditional statements (32, 32) Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index b8552ab..08d6fbd 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -826,7 +826,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, if ((size == 0 cur_index != 0) || size_index cur_index) - *exceed = 1; + *exceed = 1; } return result; } else { -- 1.9.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 v7 4/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed: WARNING: Missing a blank line after declarations Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 1b0c216..1f39219 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -126,6 +126,7 @@ void ccc_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_thread_info *info = data; + OBD_SLAB_FREE_PTR(info, ccc_thread_kmem); } @@ -144,6 +145,7 @@ void ccc_session_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_session *session = data; + OBD_SLAB_FREE_PTR(session, ccc_session_kmem); } @@ -572,6 +574,7 @@ void ccc_lock_delete(const struct lu_env *env, void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice) { struct ccc_lock *clk = cl2ccc_lock(slice); + OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem); } @@ -733,6 +736,7 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io, loff_t start, loff_t end) { struct cl_object *obj = io-ci_obj; + return ccc_io_one_lock_index(env, io, enqflags, mode, cl_index(obj, start), cl_index(obj, end)); } -- 1.9.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 v7 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed: WARNING: line over 80 characters, used a new variable 'size_index' to store the offset. Replaced unsigned long with loff_t type for 'cur_index'. Removed the parenthesis around the second part of the if statement following the '||' as its not required. Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 2f51b76..b8552ab 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -821,10 +821,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * linux-2.6.18-128.1.1 miss to do that. * --bug 17336 */ loff_t size = cl_isize_read(inode); - unsigned long cur_index = start PAGE_CACHE_SHIFT; + loff_t cur_index = start PAGE_CACHE_SHIFT; + loff_t size_index = ((size - 1) PAGE_CACHE_SHIFT); if ((size == 0 cur_index != 0) || - (((size - 1) PAGE_CACHE_SHIFT) cur_index)) + size_index cur_index) *exceed = 1; } return result; -- 1.9.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 v7 6/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed: ERROR: inline keyword should sit between storage class and type Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index de0ad37e..2f51b76 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -1273,7 +1273,7 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode) return lov_lsm_get(cl_i2info(inode)-lli_clob); } -void inline ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) +inline void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) { lov_lsm_put(cl_i2info(inode)-lli_clob, lsm); } -- 1.9.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 v7 5/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur ask...@gmail.com fixed: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Anil Belur ask...@gmail.com --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 1f39219..de0ad37e 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -266,7 +266,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev, * fails. Access to this environment is serialized by ccc_inode_fini_guard * mutex. */ -static struct lu_env *ccc_inode_fini_env = NULL; +static struct lu_env *ccc_inode_fini_env; /** * A mutex serializing calls to slp_inode_fini() under extreme memory -- 1.9.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 v6 4/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: Missing a blank line after declarations Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 1b0c216..1f39219 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -126,6 +126,7 @@ void ccc_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_thread_info *info = data; + OBD_SLAB_FREE_PTR(info, ccc_thread_kmem); } @@ -144,6 +145,7 @@ void ccc_session_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_session *session = data; + OBD_SLAB_FREE_PTR(session, ccc_session_kmem); } @@ -572,6 +574,7 @@ void ccc_lock_delete(const struct lu_env *env, void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice) { struct ccc_lock *clk = cl2ccc_lock(slice); + OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem); } @@ -733,6 +736,7 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io, loff_t start, loff_t end) { struct cl_object *obj = io->ci_obj; + return ccc_io_one_lock_index(env, io, enqflags, mode, cl_index(obj, start), cl_index(obj, end)); } -- 1.9.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 v6 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
From: Anil Belur fixed warning: * WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c index 21de1cd..0900bef 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c @@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) if (rc) return rc; - stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); + stripes = min_t(__u32, desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); lsm.lsm_stripe_count = stripes; easize = obd_size_diskmd(dt_exp, ); -- 1.9.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 v6 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: suspect code indent for conditional statements (32, 32) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index e2da397..3b2b995 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -825,8 +825,8 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (size_index < cur_index)) - *exceed = 1; + (size_index < cur_index)) + *exceed = 1; } return result; } else { -- 1.9.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 v6 2/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur fixed "WARNING: labels should not be indented" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index f669645..a658116 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -204,7 +204,7 @@ int cl_glimpse_size0(struct inode *inode, int agl) result = cl_io_get(inode, , , ); if (result > 0) { - again: +again: io->ci_verify_layout = 1; result = cl_io_init(env, io, CIT_MISC, io->ci_obj); if (result > 0) -- 1.9.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 v6 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: line over 80 characters, used a new variable 'size_index' to store the offset. Replaceed "unsigned long" with "loff_t" type for 'cur_index' Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 2f51b76..e2da397 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -821,10 +821,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * linux-2.6.18-128.1.1 miss to do that. * --bug 17336 */ loff_t size = cl_isize_read(inode); - unsigned long cur_index = start >> PAGE_CACHE_SHIFT; + loff_t cur_index = start >> PAGE_CACHE_SHIFT; + loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index)) + (size_index < cur_index)) *exceed = 1; } return result; -- 1.9.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 v6 6/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: inline keyword should sit between storage class and type Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index de0ad37e..2f51b76 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -1273,7 +1273,7 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode) return lov_lsm_get(cl_i2info(inode)->lli_clob); } -void inline ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) +inline void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) { lov_lsm_put(cl_i2info(inode)->lli_clob, lsm); } -- 1.9.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 v6 5/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 1f39219..de0ad37e 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -266,7 +266,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev, * fails. Access to this environment is serialized by ccc_inode_fini_guard * mutex. */ -static struct lu_env *ccc_inode_fini_env = NULL; +static struct lu_env *ccc_inode_fini_env; /** * A mutex serializing calls to slp_inode_fini() under extreme memory -- 1.9.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 v6 1/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur Fixed "ERROR: need consistent spacing around '+' (ctx:WxV)" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index 7bbca4b..f669645 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout, io->ci_obj = clob; *envout = env; *ioout = io; - result = +1; + result = 1; } else result = PTR_ERR(env); } else -- 1.9.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 v6] staging: lustre: lclient: fixing coding style issues
Revised PATCH 7/8 and updated the comment, as suggested by "oleg.dro...@intel.com" -- 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 v5 5/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index f83e6f2..7be0a93 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -267,7 +267,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev, * fails. Access to this environment is serialized by ccc_inode_fini_guard * mutex. */ -static struct lu_env *ccc_inode_fini_env = NULL; +static struct lu_env *ccc_inode_fini_env; /** * A mutex serializing calls to slp_inode_fini() under extreme memory -- 1.9.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 v5] staging: lustre: lclient: fixing coding style issues
Reworked on PATCH 8/8 as per comments provided by "oleg.dro...@intel.com". This includes changes variable name to 'size_index' and type to loff_t instead of 'unsigned long' -- 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 v5 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
From: Anil Belur fixed warning: * WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c index e04c2d3..01ce5c1 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c @@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) if (rc) return rc; - stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); + stripes = min_t(__u32, desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); lsm.lsm_stripe_count = stripes; easize = obd_size_diskmd(dt_exp, ); -- 1.9.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 v5 2/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur fixed "WARNING: labels should not be indented" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index f669645..a658116 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -204,7 +204,7 @@ int cl_glimpse_size0(struct inode *inode, int agl) result = cl_io_get(inode, , , ); if (result > 0) { - again: +again: io->ci_verify_layout = 1; result = cl_io_init(env, io, CIT_MISC, io->ci_obj); if (result > 0) -- 1.9.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 v5 4/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: Missing a blank line after declarations Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 6907a16..f83e6f2 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -127,6 +127,7 @@ void ccc_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_thread_info *info = data; + OBD_SLAB_FREE_PTR(info, ccc_thread_kmem); } @@ -145,6 +146,7 @@ void ccc_session_key_fini(const struct lu_context *ctx, struct lu_context_key *key, void *data) { struct ccc_session *session = data; + OBD_SLAB_FREE_PTR(session, ccc_session_kmem); } @@ -573,6 +575,7 @@ void ccc_lock_delete(const struct lu_env *env, void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice) { struct ccc_lock *clk = cl2ccc_lock(slice); + OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem); } @@ -753,6 +756,7 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io, loff_t start, loff_t end) { struct cl_object *obj = io->ci_obj; + return ccc_io_one_lock_index(env, io, enqflags, mode, cl_index(obj, start), cl_index(obj, end)); } -- 1.9.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 v5 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: line over 80 characters, used a new variable 'size_index' to store the offset. Replace "unsigned long" with "u64" type for 'cur_index' Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index c180a20..6c5b828 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -864,10 +864,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * linux-2.6.18-128.1.1 miss to do that. * --bug 17336 */ loff_t size = cl_isize_read(inode); - unsigned long cur_index = start >> PAGE_CACHE_SHIFT; + loff_t cur_index = start >> PAGE_CACHE_SHIFT; + loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index)) + (size_index < cur_index)) *exceed = 1; } return result; -- 1.9.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 v5 6/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: inline keyword should sit between storage class and type Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 7be0a93..c180a20 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -1316,7 +1316,7 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode) return lov_lsm_get(cl_i2info(inode)->lli_clob); } -void inline ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) +inline void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm) { lov_lsm_put(cl_i2info(inode)->lli_clob, lsm); } -- 1.9.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 v5 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: suspect code indent for conditional statements (32, 32) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 6c5b828..1bf6404 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -868,8 +868,8 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (size_index < cur_index)) - *exceed = 1; + (size_index < cur_index)) + *exceed = 1; } return result; } else { -- 1.9.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 v5 1/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur Fixed "ERROR: need consistent spacing around '+' (ctx:WxV)" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index 7bbca4b..f669645 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout, io->ci_obj = clob; *envout = env; *ioout = io; - result = +1; + result = 1; } else result = PTR_ERR(env); } else -- 1.9.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 v4 5/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index f83e6f2..7be0a93 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -267,7 +267,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev, * fails. Access to this environment is serialized by ccc_inode_fini_guard * mutex. */ -static struct lu_env *ccc_inode_fini_env = NULL; +static struct lu_env *ccc_inode_fini_env; /** * A mutex serializing calls to slp_inode_fini() under extreme memory -- 1.9.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 v4 8/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: suspect code indent for conditional statements (32, 32) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 440d7c2..a602746 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -869,7 +869,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, if ((size == 0 && cur_index != 0) || (check < cur_index)) - *exceed = 1; + *exceed = 1; } return result; } else { -- 1.9.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 v4 7/8] staging: lustre: lclient: lcommon_cl.c fixing coding style issues
From: Anil Belur fixed: WARNING: line over 80 characters, used a new variable 'check' to store the offset. Replace "unsigned long" with "u64" type fir 'cur_index' Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index c180a20..440d7c2 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -864,10 +864,11 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * linux-2.6.18-128.1.1 miss to do that. * --bug 17336 */ loff_t size = cl_isize_read(inode); - unsigned long cur_index = start >> PAGE_CACHE_SHIFT; + u64 cur_index = start >> PAGE_CACHE_SHIFT; + loff_t check = ((size - 1) >> PAGE_CACHE_SHIFT); if ((size == 0 && cur_index != 0) || - (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index)) + (check < cur_index)) *exceed = 1; } return result; -- 1.9.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 v4] staging: lustre: lclient: fixing coding style issues
Resending patches as per changes recommend by "oleg.dro...@intel.com" for 1/8 and 7/8. PATCH 1/8: Now have removed the '+' to make the code more straight forward. The patch v3 7/7 is now split into two separate patches as both are related diff warning or error. -- 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 v4 1/8] staging: lustre: lclient: glimpse.c fixing coding style issues
From: Anil Belur Fixed "ERROR: need consistent spacing around '+' (ctx:WxV)" Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/glimpse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/glimpse.c b/drivers/staging/lustre/lustre/lclient/glimpse.c index 7bbca4b..f669645 100644 --- a/drivers/staging/lustre/lustre/lclient/glimpse.c +++ b/drivers/staging/lustre/lustre/lclient/glimpse.c @@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout, io->ci_obj = clob; *envout = env; *ioout = io; - result = +1; + result = 1; } else result = PTR_ERR(env); } else -- 1.9.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 v4 3/8] staging: lustre: lclient: lcommon_misc.c fixing coding style issues
From: Anil Belur fixed warning: * WARNING: min() should probably be min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT) Signed-off-by: Anil Belur --- drivers/staging/lustre/lustre/lclient/lcommon_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c index e04c2d3..01ce5c1 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_misc.c @@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp) if (rc) return rc; - stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); + stripes = min_t(__u32, desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT); lsm.lsm_stripe_count = stripes; easize = obd_size_diskmd(dt_exp, ); -- 1.9.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/