[PATCH 0/2] staging: lustre: Minor lnet module cleanup

2014-10-24 Thread Mariusz Gorski
These patches fix some sparse warnings and apply __init and __exit markers to module's init and exit functions. Mariusz Gorski (2): staging: lustre: Reduce function visibility staging: lustre: Use __init and __exit markers for lifecycle functions drivers/staging/lustre/lnet/lnet/module.c

[PATCH 1/2] staging: lustre: Reduce function visibility

2014-10-24 Thread Mariusz Gorski
This patch fixes the following sparse warnings: drivers/staging/lustre/lnet/lnet/module.c:47:1: warning: symbol 'lnet_configure' was not declared. Should it be static? drivers/staging/lustre/lnet/lnet/module.c:67:1: warning: symbol 'lnet_unconfigure' was not declared. Should it be static?

[PATCH 2/2] staging: lustre: Use __init and __exit markers for lifecycle functions

2014-10-24 Thread Mariusz Gorski
Apply __init marker to module's init function and __exit to module's exit function as they both have no other usage. --- drivers/staging/lustre/lnet/lnet/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/module.c

[PATCH v2 0/2] staging: lustre: Minor lnet module cleanup

2014-10-24 Thread Mariusz Gorski
These patches fix some sparse warnings and apply __init and __exit markers to module's init and exit functions. v2: Add missing commit sign-offs Mariusz Gorski (2): staging: lustre: Reduce function visibility staging: lustre: Use __init and __exit markers for lifecycle functions drivers

[PATCH v2 2/2] staging: lustre: Use __init and __exit markers for lifecycle functions

2014-10-24 Thread Mariusz Gorski
Apply __init marker to module's init function and __exit to module's exit function as they both have no other usage. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/lustre/lnet/lnet/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v2 1/2] staging: lustre: Reduce function visibility

2014-10-24 Thread Mariusz Gorski
'fini_lnet' was not declared. Should it be static? Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/lustre/lnet/lnet/module.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre

[PATCH] staging: panel: Use designated initializers

2014-10-29 Thread Mariusz Gorski
Fix warning: missing initializer [-Wmissing-field-initializers] by using designated struct initializers. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/panel

[PATCH] Remove outdated TODO tasks

2014-10-31 Thread Mariusz Gorski
Remove Lindent and checkpatch.pl tasks from TODO file as the first one is obsolete and the other one is already done. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/panel/TODO b/drivers

[PATCH v2] staging: panel: Remove outdated TODO tasks

2014-10-31 Thread Mariusz Gorski
Remove Lindent and checkpatch.pl tasks from TODO file as the first one is obsolete and the other one is already done. v2: Fixed commit summary Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers

[PATCH v3] staging: panel: Remove outdated TODO tasks

2014-10-31 Thread Mariusz Gorski
Remove Lindent and checkpatch.pl tasks from TODO file as the first one is obsolete and the other one is already done. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- v3: Fixed commit summary drivers/staging/panel/TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers

Re: [PATCH v3] staging: panel: Remove outdated TODO tasks

2014-11-01 Thread Mariusz Gorski
On Sat, Nov 01, 2014 at 10:29:16AM +0530, Sudip Mukherjee wrote: On Fri, Oct 31, 2014 at 11:08:34PM +0100, Konrad Zapalowicz wrote: On 10/31, Mariusz Gorski wrote: Remove Lindent and checkpatch.pl tasks from TODO file as the first one is obsolete and the other one is already done

[PATCH v4] staging: panel: Remove outdated TODO task

2014-11-01 Thread Mariusz Gorski
Remove Lindent task from TODO file as it's obsolete. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- v4: Keep checkpatch.pl on the list as there are still some strict issues. drivers/staging/panel/TODO | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/panel/TODO b

[PATCH] staging: panel: Fix single-open policy race condition

2014-11-04 Thread Mariusz Gorski
Fix the implementation of a single-open policy for both devices (lcd and keypad) by using atomic_t instead of plain ints. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git

Re: [PATCH] staging: panel: Fix single-open policy race condition

2014-11-05 Thread Mariusz Gorski
On Wed, Nov 05, 2014 at 01:19:10PM +0300, Dan Carpenter wrote: On Tue, Nov 04, 2014 at 10:47:19PM +0100, Mariusz Gorski wrote: Fix the implementation of a single-open policy for both devices (lcd and keypad) by using atomic_t instead of plain ints. This seems like it might be a real

[PATCH 1/4] staging: panel: Reorder initial DEFAULT_* defines

2014-11-11 Thread Mariusz Gorski
Change the order of the initial DEFAULT_* defines so that it matches the Kconfig order. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers

[PATCH 2/4] staging: panel: Reorder DEFAULT_* values redefines

2014-11-11 Thread Mariusz Gorski
Change the order of the DEFAULT_* values redefines so that it matches the Kconfig order. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/panel

[PATCH 3/4] staging: panel: Reorder module parameter declarations

2014-11-11 Thread Mariusz Gorski
Change the order of the module parameter declarations so that it matches the Kconfig order. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 73 ++- 1 file changed, 38 insertions(+), 35 deletions(-) diff --git

[PATCH 0/4] staging: panel: Module parameters clean-up

2014-11-11 Thread Mariusz Gorski
clean-up of current init code. Mariusz Gorski (4): staging: panel: Reorder initial DEFAULT_* defines staging: panel: Reorder DEFAULT_* values redefines staging: panel: Reorder module parameter declarations staging: panel: Use better names for two defined values drivers/staging/panel

[PATCH 4/4] staging: panel: Use better names for two defined values

2014-11-11 Thread Mariusz Gorski
Give DEFAULT_KEYPAD and DEFAULT_LCD defines better names, so that their meaning is emphasized. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/panel

[PATCH 2/9] staging: panel: Call init function directly

2014-11-18 Thread Mariusz Gorski
Remove useless function and let the kernel call the actual init function directly. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging

[PATCH 6/9] staging: panel: Make two more module params read-only

2014-11-18 Thread Mariusz Gorski
Make keypad_type and lcd_type module params read-only. This step also starts making it more clear what is the precedence of device params coming from different sources (device profile, runtime module param values etc). Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging

[PATCH 5/9] staging: panel: Start making module params read-only

2014-11-18 Thread Mariusz Gorski
Start decoupling module params from the actual device state, both for lcd and keypad, by keeping the params read-only and moving the device state to related structs. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 35

[PATCH 4/9] staging: panel: Use a macro for checking module params state

2014-11-18 Thread Mariusz Gorski
Avoid values comparison and use a macro instead that checks whether module param has been set by the user to some value at loading time. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 88 ++- 1 file changed, 45

[PATCH 0/9] staging: panel: Refactor panel initialization

2014-11-18 Thread Mariusz Gorski
to behaviour of the code itself (at least for now), so all hacky places are kept. Mariusz Gorski (9): staging: panel: Set default parport module param value staging: panel: Call init function directly staging: panel: Remove magic numbers staging: panel: Use a macro for checking module

[PATCH 8/9] staging: panel: Remove more magic number comparison

2014-11-18 Thread Mariusz Gorski
Use a macro instead of magic number comparison for checking whether a module param value has been set. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH 9/9] staging: panel: Move LCD-related state into struct lcd

2014-11-18 Thread Mariusz Gorski
Move more or less all LCD-related state into struct lcd in order to get better cohesion; use bool instead of int where it makes sense. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 255 ++ 1 file changed, 134

[PATCH 1/9] staging: panel: Set default parport module param value

2014-11-18 Thread Mariusz Gorski
Set default parport module param value to DEFAULT_PARPORT so that a if-block can be avoided. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers

[PATCH 3/9] staging: panel: Remove magic numbers

2014-11-18 Thread Mariusz Gorski
Get rid of magic numbers indicating that the value of a module param is not set. Use a defined value instead. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git

[PATCH 7/9] staging: panel: Refactor LCD init code

2014-11-18 Thread Mariusz Gorski
Rework lcd_init method to make it a little bit more clear about the precedence of the params, move LCD geometry and pins layout to the LCD struct and thus make the LCD-related module params effectively read-only. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel

Re: [PATCH 6/9] staging: panel: Make two more module params read-only

2014-11-18 Thread Mariusz Gorski
On Tue, Nov 18, 2014 at 10:20:34PM +0100, Willy Tarreau wrote: On Tue, Nov 18, 2014 at 09:56:11PM +0100, Mariusz Gorski wrote: Make keypad_type and lcd_type module params read-only. This step also starts making it more clear what is the precedence of device params coming from different

Re: [PATCH 4/9] staging: panel: Use a macro for checking module params state

2014-11-18 Thread Mariusz Gorski
On Tue, Nov 18, 2014 at 10:18:44PM +0100, Willy Tarreau wrote: On Tue, Nov 18, 2014 at 09:56:09PM +0100, Mariusz Gorski wrote: Avoid values comparison and use a macro instead that checks whether module param has been set by the user to some value at loading time. Signed-off-by: Mariusz

Re: [PATCH 8/9] staging: panel: Remove more magic number comparison

2014-11-18 Thread Mariusz Gorski
On Tue, Nov 18, 2014 at 10:25:23PM +0100, Willy Tarreau wrote: On Tue, Nov 18, 2014 at 09:56:13PM +0100, Mariusz Gorski wrote: Use a macro instead of magic number comparison for checking whether a module param value has been set. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com

Re: [PATCH 7/9] staging: panel: Refactor LCD init code

2014-11-18 Thread Mariusz Gorski
On Tue, Nov 18, 2014 at 10:23:26PM +0100, Willy Tarreau wrote: On Tue, Nov 18, 2014 at 09:56:12PM +0100, Mariusz Gorski wrote: Rework lcd_init method to make it a little bit more clear about the precedence of the params, move LCD geometry and pins layout to the LCD struct and thus make

[PATCH v2 4/9] staging: panel: Use defined value or checking module params state

2014-11-19 Thread Mariusz Gorski
Avoid magic number and use a comparison with a defined value instead that checks whether module param has been set by the user to some value at loading time. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- v2: Don't introduce new macros for param value check drivers/staging/panel

[PATCH v2 5/9] staging: panel: Start making module params read-only

2014-11-19 Thread Mariusz Gorski
Start decoupling module params from the actual device state, both for lcd and keypad, by keeping the params read-only and moving the device state to related structs. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 35

[PATCH v2 7/9] staging: panel: Refactor LCD init code

2014-11-19 Thread Mariusz Gorski
Rework lcd_init method to make it a little bit more clear about the precedence of the params, move LCD geometry and pins layout to the LCD struct and thus make the LCD-related module params effectively read-only. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel

[PATCH v2 3/9] staging: panel: Remove magic numbers

2014-11-19 Thread Mariusz Gorski
Get rid of magic numbers indicating that the value of a module param is not set. Use a defined value instead. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 22 -- 1 file changed, 12 insertions

[PATCH v2 9/9] staging: panel: Move LCD-related state into struct lcd

2014-11-19 Thread Mariusz Gorski
Move more or less all LCD-related state into struct lcd in order to get better cohesion; use bool instead of int where it makes sense. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 255

[PATCH v2 2/9] staging: panel: Call init function directly

2014-11-19 Thread Mariusz Gorski
Remove useless function and let the kernel call the actual init function directly. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging

[PATCH v2 8/9] staging: panel: Remove more magic number comparison

2014-11-19 Thread Mariusz Gorski
Use a defined value instead of magic number comparison for checking whether a module param value has been set. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- v2: Don't introduce new macros for param value check drivers/staging/panel/panel.c | 20 ++-- 1 file changed

Re: [PATCH v2 4/9] staging: panel: Use defined value or checking module params state

2014-11-27 Thread Mariusz Gorski
On Wed, Nov 26, 2014 at 01:58:01PM -0800, Greg Kroah-Hartman wrote: On Wed, Nov 19, 2014 at 09:38:46PM +0100, Mariusz Gorski wrote: Avoid magic number and use a comparison with a defined value instead that checks whether module param has been set by the user to some value at loading time

Re: [PATCH v2 4/9] staging: panel: Use defined value or checking module params state

2014-11-27 Thread Mariusz Gorski
On Thu, Nov 27, 2014 at 07:57:06AM -0800, Greg Kroah-Hartman wrote: On Thu, Nov 27, 2014 at 07:24:17AM -0800, Greg Kroah-Hartman wrote: On Thu, Nov 27, 2014 at 02:26:59PM +0100, Mariusz Gorski wrote: On Wed, Nov 26, 2014 at 01:58:01PM -0800, Greg Kroah-Hartman wrote: On Wed, Nov 19, 2014

[PATCH v3 2/9] staging: panel: Call init function directly

2014-11-27 Thread Mariusz Gorski
Remove useless function and let the kernel call the actual init function directly. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging

[PATCH v3 8/9] staging: panel: Remove more magic number comparison

2014-11-27 Thread Mariusz Gorski
Use a defined value instead of magic number comparison for checking whether a module param value has been set. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 20 ++-- 1 file changed, 10 insertions

[PATCH v3 0/9] staging: panel: Refactor panel initialization

2014-11-27 Thread Mariusz Gorski
to behaviour of the code itself (at least for now), so all hacky places are kept. The whole patchset is already: Acked-by: Willy Tarreau w...@1wt.eu v2: Don't introduce new macros for param value check v3: Resend, no other changes Mariusz Gorski (9): staging: panel: Set default parport module

[PATCH v3 3/9] staging: panel: Remove magic numbers

2014-11-27 Thread Mariusz Gorski
Get rid of magic numbers indicating that the value of a module param is not set. Use a defined value instead. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 22 -- 1 file changed, 12 insertions

[PATCH v3 7/9] staging: panel: Refactor LCD init code

2014-11-27 Thread Mariusz Gorski
Rework lcd_init method to make it a little bit more clear about the precedence of the params, move LCD geometry and pins layout to the LCD struct and thus make the LCD-related module params effectively read-only. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w

[PATCH v3 1/9] staging: panel: Set default parport module param value

2014-11-27 Thread Mariusz Gorski
Set default parport module param value to DEFAULT_PARPORT so that a if-block can be avoided. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com Acked-by: Willy Tarreau w...@1wt.eu --- drivers/staging/panel/panel.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers

Re: [PATCH v2 4/9] staging: panel: Use defined value or checking module params state

2014-11-28 Thread Mariusz Gorski
On Fri, Nov 28, 2014 at 12:32:48PM -0800, Greg Kroah-Hartman wrote: On Thu, Nov 27, 2014 at 08:50:55PM +0100, Mariusz Gorski wrote: On Thu, Nov 27, 2014 at 07:57:06AM -0800, Greg Kroah-Hartman wrote: On Thu, Nov 27, 2014 at 07:24:17AM -0800, Greg Kroah-Hartman wrote: On Thu, Nov 27, 2014

[PATCH] staging: panel: Remove unused variable

2014-12-03 Thread Mariusz Gorski
Remove lcd.left_shift because it is only written to at some places but never read from. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c

[PATCH] staging: panel: Remove magic numbers in LCD commands

2014-12-05 Thread Mariusz Gorski
Get rid of magic numbers in LCD commands and replace them with defined values, so that it's more obvious that the commands are doing. Signed-off-by: Mariusz Gorski marius.gor...@gmail.com --- drivers/staging/panel/panel.c | 83 +-- 1 file changed, 57

Re: [PATCH] staging: panel: Remove magic numbers in LCD commands

2014-12-06 Thread Mariusz Gorski
On Sat, Dec 06, 2014 at 01:46:52PM +0530, Sudip Mukherjee wrote: On Fri, Dec 05, 2014 at 10:10:43PM +0100, Mariusz Gorski wrote: Get rid of magic numbers in LCD commands and replace them with defined values, so that it's more obvious that the commands are doing. it is not applying to next