[PATCH 2/2] staging: dgnc: remove redundant check

2015-04-05 Thread Giedrius Statkevicius
count doesn't get changed in between identical checks in dgnc_tty_write() so remove the second check Signed-off-by: Giedrius Statkevičius --- v2: no change drivers/staging/dgnc/dgnc_tty.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/

[PATCH 1/2] staging: dgnc: remove dead code in dgnc_tty_write()

2015-04-05 Thread Giedrius Statkevicius
Remove the dead code protected by in_user in dgnc_tty_write() because it is set to 0 and never changed to 1 thus the code in ifs never gets executed. Signed-off-by: Giedrius Statkevičius --- v2: Just remove the dead code protected by in_user and join the first and third patches. drivers/staging

[PATCH 3/3] staging: dgnc: improve the coding style in unlocking part of dgnc_tty_write()

2015-04-05 Thread Giedrius Statkevicius
do if (blah) foo(); bar(); instead of if (blah) { foo(); bar(); } else { bar(); } Signed-off-by: Giedrius Statkevičius --- drivers/staging/dgnc/dgnc_tty.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/driv

[PATCH 2/3] staging: dgnc: remove redundant check

2015-04-05 Thread Giedrius Statkevicius
count doesn't change between the last check a few lines before so remove this redundant check Signed-off-by: Giedrius Statkevičius --- drivers/staging/dgnc/dgnc_tty.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index

[PATCH 1/3] staging: dgnc: use a real mutex instead of masquerading a semaphore as a mutex

2015-04-05 Thread Giedrius Statkevicius
A mutex should be used here (and it's name even says that) so remove the hiding of a semaphore behind a #define and use a real mutex that the kernel provides. Signed-off-by: Giedrius Statkevičius --- drivers/staging/dgnc/dgnc_tty.c | 12 1 file changed, 4 insertions(+), 8 deletions(

Re: [PATCH] platform: x86: hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails

2014-12-02 Thread Giedrius Statkevicius
On 2014.11.26 00:57, Darren Hart wrote: > On Sat, Nov 29, 2014 at 01:04:17AM +0100, Borislav Petkov wrote: >> On Sat, Nov 29, 2014 at 01:48:31AM +0200, Giedrius Statkevicius wrote: >>> On 2014.11.29 01:15, Borislav Petkov wrote: >>>> On Sat, Nov 29, 2014 at 12:14:27A

Re: [PATCH] platform: x86: hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails

2014-11-28 Thread Giedrius Statkevicius
On 2014.11.29 01:15, Borislav Petkov wrote: > On Sat, Nov 29, 2014 at 12:14:27AM +0200, Giedrius Statkevicius wrote: >> In hpwl_add() there is a unused variable err to which we assign the >> result of hp_wireless_input_setup() but we don't do anything depending >> on

[PATCH] platform: x86: hp_wireless: Inform the user if hp_wireless_input_setup()/add() fails

2014-11-28 Thread Giedrius Statkevicius
ng in this case. Signed-off-by: Giedrius Statkevicius --- drivers/platform/x86/hp-wireless.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/hp-wireless.c b/drivers/platform/x86/hp-wireless.c index 415348f..4e4cc8b 100644 --- a/drivers/platform/x86/hp-wireless.c +++

[PATCH] staging: lustre: Fix sparse warnings for lnet/lnet/router.c

2014-11-23 Thread Giedrius Statkevicius
outer.c:1337:1: warning: symbol 'lnet_rtrpool_init' was not declared. Should it be static? Signed-off-by: Giedrius Statkevicius --- drivers/staging/lustre/lnet/lnet/router.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/lne

Re: [PATCH] fuse: don't check for file->private_data on open().

2014-11-12 Thread Giedrius Statkevicius
On 2014.11.12 18:31, Martin Kepplinger wrote: > The miscdevice core now sets file->private_data to the struct miscdevice > so don't fail when this is not NULL. > > Reported-by: Thierry Reding > Signed-off-by: Martin Kepplinger > --- Hello, Looks like this patch does not solve the problem with F

Re: [Bisected] Regression: cpu stuck in gvfsd-fuse, can't shutdown

2014-11-11 Thread Giedrius Statkevicius
On 2014.11.11 23:05, Greg KH wrote: > > If you revert this patch, does things go back to "normal" for you? Originally I've only tested where the HEAD was 32eca22180804f71b06b63fd29b72f58be8b3c47 versus 32eca22180804f71b06b63fd29b72f58be8b3c47~1 but now I recompiled and tested a vanilla 3.18.0-rc4

[PATCH] platform: hp_accel: Add SERIO_I8042 as a dependency since it now includes i8042.h/serio.h

2014-11-10 Thread Giedrius Statkevicius
Make hp_accel dependent on SERIO_I8042 in the Kconfig because since commit a4c724d0723b078e4ab4670e557cda1795036a7a ('platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream') hp_accel includes i8042.h and serio.h. Reported-by: Jim Davis Signed-off-by: Giedrius Statkeviči

Re: randconfig build error with next-20141110, in drivers/platform/x86/hp_accel.c

2014-11-10 Thread Giedrius Statkevicius
Hi Jim, On 2014.11.10 18:20, Jim Davis wrote: > Building with the attached random configuration file, > > drivers/built-in.o: In function `lis3lv02d_remove': > /home/jim/linux/drivers/platform/x86/hp_accel.c:389: undefined > reference to `i8042_remove_filter' > drivers/built-in.o: In function `li

[PATCH] platform: x86: remove redundant variable in hp-wireless.c

2014-11-04 Thread Giedrius Statkevicius
Remove a variable because it only holds the results of a function call and then gets returned so instead just return the result of a function call. Signed-off-by: Giedrius Statkevičius --- drivers/platform/x86/hp-wireless.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/

[PATCH v2] platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream

2014-10-30 Thread Giedrius Statkevicius
Add a i8042 filter to hp_accel to remove accelerometer's data with acpi id HPQ6000 from keyboard bus stream. The codes sent by accelerometer are e0 25, e0 26, e0 27 and e0 28. The relevant information is already passed through /dev/freefall so no need to send these undocumented weird signals throug

Re: [PATCH] platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream

2014-10-30 Thread Giedrius Statkevicius
On 2014.10.30 18:28, Dmitry Torokhov wrote: > On Wed, Oct 29, 2014 at 06:40:56PM -0700, Darren Hart wrote: >> On Wed, Oct 29, 2014 at 09:16:22PM +0200, Giedrius Statkevicius wrote: >>> Add a i8042 filter to hp_accel to remove accelerometer's data with acpi >>> id

[PATCH] platform: hp_accel: add a i8042 filter to remove HPQ6000 data from kb bus stream

2014-10-29 Thread Giedrius Statkevicius
Add a i8042 filter to hp_accel to remove accelerometer's data with acpi id HPQ6000 from keyboard bus stream. The codes sent by accelerometer are e0 25, e0 26, e0 27 and e0 28. The relevant information is already passed through /dev/freefall so no need to send these undocumented weird signals throug

Re: [PATCH RFC] platform: hp_accel: add a i8042 filter to remove accelerometer data

2014-10-22 Thread Giedrius Statkevicius
On 2014.10.22 17:19, Éric Piel wrote: > On the HP laptop I had (with HPQ0004), no fake keys were reported. I guess this is a new "feature", then. > It should be noted that on my laptop, the accelerometer is completely > decoupled from the hard disk. For example, when freefall is detected, > nothin

Re: [PATCH RFC] platform: hp_accel: add a i8042 filter to remove accelerometer data

2014-10-22 Thread Giedrius Statkevicius
On 2014.10.22 00:45, Darren Hart wrote: > On Sat, Oct 18, 2014 at 11:59:22PM +0300, Giedrius Statkevicius wrote: >> Hello, > > Hi Giedrius, > >> this patch fixes bug #84941 from the kernel bugzilla. Basically, it >> seems that the accelerometer sends some signal

Re: [PATCH 0/2] Staging: rts5208: rtsx_reset_chip style clean up

2014-10-19 Thread Giedrius Statkevicius
On 2014.10.19 12:55, Fabio Falzoi wrote: > Clean up the code in rtsx_reset_chip function defining two new helper > functions rtsx_reset_aspm and rtsx_enable_pcie_intr. > Specifically, the following checkpatch warnings are corrected: > * PARENTHESIS_ALIGNMENT at rows 271, 302, 343 and 346 > * LONG_L

[PATCH RFC] platform: hp_accel: add a i8042 filter to remove accelerometer data

2014-10-18 Thread Giedrius Statkevicius
Hello, this patch fixes bug #84941 from the kernel bugzilla. Basically, it seems that the accelerometer sends some signals as button presses through the keyboard bus. The keys in the report are 0xa5-0xa8 but in the filter function they are reported as 0x25-0x28. This patch adds a i8042 filter that

[PATCH] drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters

2014-10-17 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/

[PATCH 3/5] staging: rts5208: align divided lines to opening paranthesis

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Make all divided lines aligned to the opening paranthesis. Basically makes all lines aligned to the opening paranthesis to make the code more readable and it also gets rid of a lot of checkpatch.pl "checks". Signed-off-by: Giedrius Statkevičius --- drivers/staging/

[PATCH 0/5] staging: rts5208: clean up coding style in rtsx_chip.c

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius This patch set is a general code style clean up for rtsx_chip.c. After this patch set checkpatch.pl without --strict doesn't complain anything about at all and with --strict it only complains about unmatched parantheses in those few places where I can't fix them becaus

[PATCH 5/5] staging: rts5208: use ternary operators to reduce indentation level

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Convert code in format of if (a) if(b) { [...] } to one line with a simple ternary operation to avoid unnecesary increase of indentation level. Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 90 ++--- 1

[PATCH 4/5] staging: rts5208: divide lines to make them less than 80 characters long

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Make a couple of lines shorter than the max limit by diving them and also make sure to align them properly where possible. Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 31 ++- 1 file changed, 22 insertion

[PATCH 1/5] staging: rts5208: combine ifs where possible

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Join together chained if's where possible to lower the indentation level. In a lot of places of this code the indentation level is already very high. As a result, this patch increases the code flow and readability. Signed-off-by: Giedrius Statkevičius --- drivers/s

[PATCH 2/5] staging: rts5208: get rid of Camel Case, remove unneeded lines and parantheses

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Convert labels from Camel Case to lower case, remove unnecessary parantheses around operands of dereference operators and remove unneeded empty lines before }. Gets rid of a checkpatch.pl "check" that code should avoid Camel Case, also the code had a bunch of &(a) whe

[PATCH 0/5] staging: rts5208: clean up coding style in rtsx_chip.c

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius This patch set is a general code style clean up for rtsx_chip.c. After this patch set checkpatch.pl without --strict doesn't complain anything about at all and with --strict it only complains about unmatched parantheses in those few places where I can't fix them becaus

[PATCH 2/5] Convert Camel Case labels to lower case, remove unnecessary parantheses after a dereference operator and remove empty lines before }

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Convert labels from Camel Case to lower case, remove unnecessary parantheses around operands of dereference operators and remove unneeded empty lines before }. Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 52 +++---

[PATCH 0/5] staging: rts5208: clean up coding style in rtsx_chip.c

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Align divided lines to the first line's opening paranthesis Where two or more if's are in form 'if (a) if (b) { [...] }' convert them into one to lower the indentation level. Use the ternary operator in places where there is code in format of: 'if (a) { b = foo1; } e

[PATCH 3/5] Align lines of divided lines to the opening paranthesis where possible

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Make all divided lines aligned to the opening paranthesis Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 87 +++-- 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rts5208

[PATCH 4/5] Divide lines to make them less than 80 characters long, align to the opening paranthesis where possible

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Make a couple of lines shorter than the max limit by diving them and also make sure to align them properly where possible. Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 31 ++- 1 file changed, 22 insertio

[PATCH 5/5] Use ternary operators where possible and sensible to avoid unnecessary increase of indentation level

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Convert code in format of if (a) if(b) { [...] } to one line with a simple ternary operation to avoid unnecesary increase of indentation level. Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 90 ++---

[PATCH 1/5] Combine ifs into one where possible to avoid unnecessary indentation level increase

2014-10-03 Thread Giedrius Statkevicius
From: Giedrius Statkevičius Join together chained if's where possible to lower the indentation level. Signed-off-by: Giedrius Statkevičius --- drivers/staging/rts5208/rtsx_chip.c | 100 1 file changed, 44 insertions(+), 56 deletions(-) diff --git a/drivers

[PATCH v3] staging: rts5208: Clean up coding style in rtsx_chip.c

2014-10-03 Thread Giedrius Statkevicius
thout creating more functions and moving code to them. This patch is against Greg KH's staging-next tree. Signed-off-by: Giedrius Statkevicius --- Changes in v3: - Change blocks that have form of if (a) { b = 1; } else { b = 0; } to 'b = a ? 1 : 0;' and use ternary operator other

Re: [PATCH v2] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings and combine two ifs into one

2014-10-02 Thread Giedrius Statkevicius
On 2014.10.02 14:45, Joe Perches wrote: > On Thu, 2014-10-02 at 14:13 +0300, Giedrius Statkevicius wrote: >> Fix 10 occurences of coding style errors where the line exceeds 80 >> characters by breaking them into more lines. >> Checkpatch.pl reports these errors as: &

[PATCH v2] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings and combine two ifs into one

2014-10-02 Thread Giedrius Statkevicius
ckpatch.pl reports these errors as: 'WARNING: void function return statements are not generally useful' Lastly it combines two if statements into one in rtsx_reset_chip() Patch is against Greg KH's staging-next tree. Signed-off-by: Giedrius Statkevicius --- Changes in v2: - Combines t

[PATCH] staging: rts5208: Clean up coding style in rtsx_chip.c to get rid of checkpatch.pl warnings

2014-10-01 Thread Giedrius Statkevicius
ckpatch.pl reports these errors as: 'WARNING: void function return statements are not generally useful' Patch is against Greg KH's staging-next tree. Signed-off-by: Giedrius Statkevicius --- drivers/staging/rts5208/rtsx_chip.c | 40 - 1 file chan