[PATCH] staging: isdn: To make hysdn_proc_entry static.
Made hysdn_proc_entry static as suggested by Sparse tool. Signed-off-by: Rishiraj Manwatkar --- drivers/staging/isdn/hysdn/hysdn_procconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/isdn/hysdn/hysdn_procconf.c b/drivers/staging/isdn/hysdn/hysdn_procconf.c index 73079213ec94..3d12c058a6f1 100644 --- a/drivers/staging/isdn/hysdn/hysdn_procconf.c +++ b/drivers/staging/isdn/hysdn/hysdn_procconf.c @@ -349,7 +349,7 @@ static const struct file_operations conf_fops = /*/ /* hysdn subdir in /proc/net */ /*/ -struct proc_dir_entry *hysdn_proc_entry = NULL; +static struct proc_dir_entry *hysdn_proc_entry = NULL; /***/ /* hysdn_procconf_init is called when the module is loaded and after the cards */ -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: kpc2000: To make symbols static
This patch makes 4 symbols static as suggested by Sparse tool. Signed-off-by: Rishiraj Manwatkar --- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c index cda057569163..e4056607af0b 100644 --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c @@ -36,14 +36,14 @@ struct kpc_dma_device *kpc_dma_lookup_device(int minor) return c; } -void kpc_dma_add_device(struct kpc_dma_device *ldev) +static void kpc_dma_add_device(struct kpc_dma_device *ldev) { mutex_lock(&kpc_dma_mtx); list_add(&ldev->list, &kpc_dma_list); mutex_unlock(&kpc_dma_mtx); } -void kpc_dma_del_device(struct kpc_dma_device *ldev) +static void kpc_dma_del_device(struct kpc_dma_device *ldev) { mutex_lock(&kpc_dma_mtx); list_del(&ldev->list); @@ -88,7 +88,7 @@ static const struct attribute *ndd_attr_list[] = { NULL, }; -struct class *kpc_dma_class; +static struct class *kpc_dma_class; /** Platform Driver Functions **/ static @@ -196,7 +196,7 @@ int kpc_dma_remove(struct platform_device *pldev) } /** Driver Functions **/ -struct platform_driver kpc_dma_plat_driver_i = { +static struct platform_driver kpc_dma_plat_driver_i = { .probe= kpc_dma_probe, .remove = kpc_dma_remove, .driver = { -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: kpc2000: Fix: 'kpc_dma_del_device' and other symbols were not declared
This patch removes the Sparse generated warnings. Following warnings are reported by Sparse: drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:46:6: warning: symbol 'kpc_dma_del_device' was not declared. Should it be static? drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:91:14: warning: symbol 'kpc_dma_class' was not declared. Should it be static? drivers/staging/kpc2000//kpc_dma/kpc_dma_driver.c:199:24: warning: symbol 'kpc_dma_plat_driver_i' was not declared. Should it be static? Signed-off-by: Rishiraj Manwatkar --- drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c index 9acf1eafa024..b45296b4b8b2 100644 --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c @@ -43,7 +43,7 @@ static void kpc_dma_add_device(struct kpc_dma_device *ldev) mutex_unlock(&kpc_dma_mtx); } -void kpc_dma_del_device(struct kpc_dma_device *ldev) +static void kpc_dma_del_device(struct kpc_dma_device *ldev) { mutex_lock(&kpc_dma_mtx); list_del(&ldev->list); @@ -88,7 +88,7 @@ static const struct attribute *ndd_attr_list[] = { NULL, }; -struct class *kpc_dma_class; +static struct class *kpc_dma_class; /** Platform Driver Functions **/ static @@ -196,7 +196,7 @@ int kpc_dma_remove(struct platform_device *pldev) } /** Driver Functions **/ -struct platform_driver kpc_dma_plat_driver_i = { +static struct platform_driver kpc_dma_plat_driver_i = { .probe= kpc_dma_probe, .remove = kpc_dma_remove, .driver = { -- 2.17.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v2 2/2] lustre: fix coding style issue
Comparison should have the CONSTANT on the right side of the test Signed-off-by: Rishiraj Manwatkar --- drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index 0997254..bec112f 100755 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -58,7 +58,7 @@ static inline int cl_io_type_is_valid(enum cl_io_type type) { - return CIT_READ <= type && type < CIT_OP_NR; + return type >= CIT_READ && type < CIT_OP_NR; } static inline int cl_io_is_loopable(const struct cl_io *io) @@ -389,7 +389,7 @@ void cl_io_unlock(const struct lu_env *env, struct cl_io *io) const struct cl_io_slice *scan; LASSERT(cl_io_is_loopable(io)); - LASSERT(CIS_IT_STARTED <= io->ci_state && io->ci_state < CIS_UNLOCKED); + LASSERT(io->ci_state >= CIS_IT_STARTED && io->ci_state < CIS_UNLOCKED); LINVRNT(cl_io_invariant(io)); set = &io->ci_lockset; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v2 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues
From: RishirajAM Parantheses are added for Macro argument, to avoid precedence issues. Signed-off-by: Rishiraj Manwatkar --- drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index ee7d677..0997254 100755 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -52,9 +52,9 @@ */ #define cl_io_for_each(slice, io) \ - list_for_each_entry((slice), &io->ci_layers, cis_linkage) + list_for_each_entry((slice), &(io)->ci_layers, cis_linkage) #define cl_io_for_each_reverse(slice, io) \ - list_for_each_entry_reverse((slice), &io->ci_layers, cis_linkage) + list_for_each_entry_reverse((slice), &(io)->ci_layers, cis_linkage) static inline int cl_io_type_is_valid(enum cl_io_type type) { -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v3 2/2] lustre: CONSTANTS put on right side of comparison test
Comparison should have the CONSTANT on the right side of the test Signed-off-by: Rishiraj Manwatkar --- v1 -> v2: Added mailing list in cc. v2 -> v3: Improved Subject line. drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index 0997254..bec112f 100755 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -58,7 +58,7 @@ static inline int cl_io_type_is_valid(enum cl_io_type type) { - return CIT_READ <= type && type < CIT_OP_NR; + return type >= CIT_READ && type < CIT_OP_NR; } static inline int cl_io_is_loopable(const struct cl_io *io) @@ -389,7 +389,7 @@ void cl_io_unlock(const struct lu_env *env, struct cl_io *io) const struct cl_io_slice *scan; LASSERT(cl_io_is_loopable(io)); - LASSERT(CIS_IT_STARTED <= io->ci_state && io->ci_state < CIS_UNLOCKED); + LASSERT(io->ci_state >= CIS_IT_STARTED && io->ci_state < CIS_UNLOCKED); LINVRNT(cl_io_invariant(io)); set = &io->ci_lockset; -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v3 1/2] lustre: Parantheses added for Macro argument to avoid precedence issues
Parantheses are added for Macro argument, to avoid precedence issues. Signed-off-by: Rishiraj Manwatkar --- v1 -> v2: Added mailing list in cc. v2 -> v3: Changed From: to be same as Signed-off-by:. drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index ee7d677..0997254 100755 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -52,9 +52,9 @@ */ #define cl_io_for_each(slice, io) \ - list_for_each_entry((slice), &io->ci_layers, cis_linkage) + list_for_each_entry((slice), &(io)->ci_layers, cis_linkage) #define cl_io_for_each_reverse(slice, io) \ - list_for_each_entry_reverse((slice), &io->ci_layers, cis_linkage) + list_for_each_entry_reverse((slice), &(io)->ci_layers, cis_linkage) static inline int cl_io_type_is_valid(enum cl_io_type type) { -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[Patch v4 1/2] staging/lustre: add parenthesis to macro argument
Add parenthesis to cl_io_for_each() macro to avoid potential issues with unexpected argument expansion in CPP. Signed-off-by: Rishiraj Manwatkar --- v1 -> v2: Added mailing list in cc. v2 -> v3: Changed From: to be same as Signed-off-by:. v3 -> v4: Changed Subject line and patch description as suggested by andreas.dil...@intel.com drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index ee7d677..0997254 100755 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -52,9 +52,9 @@ */ #define cl_io_for_each(slice, io) \ - list_for_each_entry((slice), &io->ci_layers, cis_linkage) + list_for_each_entry((slice), &(io)->ci_layers, cis_linkage) #define cl_io_for_each_reverse(slice, io) \ - list_for_each_entry_reverse((slice), &io->ci_layers, cis_linkage) + list_for_each_entry_reverse((slice), &(io)->ci_layers, cis_linkage) static inline int cl_io_type_is_valid(enum cl_io_type type) { -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] fbtft:Fix to avoid precedence issues
Parentheses added to avoid operator precedence issues. Signed-off-by: Rishiraj Manwatkar --- drivers/staging/fbtft/fb_hx8340bn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c index 1ca1fcd..fbd5ef5 100755 --- a/drivers/staging/fbtft/fb_hx8340bn.c +++ b/drivers/staging/fbtft/fb_hx8340bn.c @@ -157,7 +157,7 @@ static int set_var(struct fbtft_par *par) * OP0 OP1 CP0 CP1 CP2 CP3 CP4 MP0 MP1 MP2 MP3 MP4 MP5 CGM0 CGM1 * ON0 ON1 CN0 CN1 CN2 CN3 CN4 MN0 MN1 MN2 MN3 MN4 MN5 GC */ -#define CURVE(num, idx) curves[num * par->gamma.num_values + idx] +#define CURVE(num, idx) curves[(num) * par->gamma.num_values + (idx)] static int set_gamma(struct fbtft_par *par, u32 *curves) { unsigned long mask[] = { -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel