[PATCH] cpupower: fix potential memory leak

2016-02-13 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan --- tools/power/cpupower/bench/parse.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/power/cpupower/bench/parse.c b/tools/power/cpupower/bench/parse.c index f503fb5..058a351 100644 --- a/tools/power/cpupower/bench/parse.c

[PATCH] cpupower: fix potential memory leak

2016-02-13 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan <arjun...@gmail.com> --- tools/power/cpupower/bench/parse.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/power/cpupower/bench/parse.c b/tools/power/cpupower/bench/parse.c index f503fb5..058a351 100644 --- a/tools

Re: [PATCH] cpupower: fix potential memory leak

2015-09-11 Thread Arjun Sreedharan
Ping ! On 22 August 2015 at 17:31, Arjun Sreedharan wrote: > Signed-off-by: Arjun Sreedharan > --- > tools/power/cpupower/bench/parse.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/tools/power/cpupower/bench/parse.c > b/tools/power/c

Re: [PATCH] cpupower: fix potential memory leak

2015-09-11 Thread Arjun Sreedharan
Ping ! On 22 August 2015 at 17:31, Arjun Sreedharan <arjun...@gmail.com> wrote: > Signed-off-by: Arjun Sreedharan <arjun...@gmail.com> > --- > tools/power/cpupower/bench/parse.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/tool

[PATCH] cpupower: fix potential memory leak

2015-08-22 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan --- tools/power/cpupower/bench/parse.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/power/cpupower/bench/parse.c b/tools/power/cpupower/bench/parse.c index f503fb5..058a351 100644 --- a/tools/power/cpupower/bench/parse.c

[PATCH] cpupower: fix potential memory leak

2015-08-22 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- tools/power/cpupower/bench/parse.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/power/cpupower/bench/parse.c b/tools/power/cpupower/bench/parse.c index f503fb5..058a351 100644 --- a/tools/power

[tip:x86/boot] x86/boot: Standardize strcmp()

2015-03-23 Thread tip-bot for Arjun Sreedharan
Commit-ID: 1c1d046be692493d00a4831d4fbc266745008e09 Gitweb: http://git.kernel.org/tip/1c1d046be692493d00a4831d4fbc266745008e09 Author: Arjun Sreedharan AuthorDate: Mon, 16 Mar 2015 21:07:47 +0530 Committer: Ingo Molnar CommitDate: Mon, 23 Mar 2015 10:24:12 +0100 x86/boot: Standardize

[tip:x86/boot] x86/boot: Standardize strcmp()

2015-03-23 Thread tip-bot for Arjun Sreedharan
Commit-ID: 1c1d046be692493d00a4831d4fbc266745008e09 Gitweb: http://git.kernel.org/tip/1c1d046be692493d00a4831d4fbc266745008e09 Author: Arjun Sreedharan arjun...@gmail.com AuthorDate: Mon, 16 Mar 2015 21:07:47 +0530 Committer: Ingo Molnar mi...@kernel.org CommitDate: Mon, 23 Mar 2015 10

[PATCH] x86,boot: standardize strcmp()

2015-03-18 Thread Arjun Sreedharan
Sorry for the previous messed up email. Here's a patch. -- >8 -- Subject: [PATCH] arm,x86: limit strcmp() rc to {-1,0,1} Signed-off-by: Arjun Sreedharan --- arch/arm/boot/compressed/string.c | 2 +- arch/x86/boot/string.c| 2 +- 2 files changed, 2 insertions(+), 2 deleti

Re: [PATCH] x86,boot: standardize strcmp()

2015-03-18 Thread Arjun Sreedharan
On 18 March 2015 at 07:06, Bernd Petrovitsch wrote: > On Die, 2015-03-17 at 19:43 +0530, Arjun Sreedharan wrote: > [...] >> On a related note, IMO strcmp() should return {-1,0,1} since many >> programmers just expect this behavior. just my opinion. > > -ENOPATCH

[PATCH] x86,boot: standardize strcmp()

2015-03-18 Thread Arjun Sreedharan
Sorry for the previous messed up email. Here's a patch. -- 8 -- Subject: [PATCH] arm,x86: limit strcmp() rc to {-1,0,1} Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- arch/arm/boot/compressed/string.c | 2 +- arch/x86/boot/string.c| 2 +- 2 files changed, 2 insertions(+), 2

Re: [PATCH] x86,boot: standardize strcmp()

2015-03-18 Thread Arjun Sreedharan
On 18 March 2015 at 07:06, Bernd Petrovitsch be...@petrovitsch.priv.at wrote: On Die, 2015-03-17 at 19:43 +0530, Arjun Sreedharan wrote: [...] On a related note, IMO strcmp() should return {-1,0,1} since many programmers just expect this behavior. just my opinion. -ENOPATCH. Here's a patch

Re: [PATCH] x86,boot: standardize strcmp()

2015-03-17 Thread Arjun Sreedharan
On 17 March 2015 at 13:16, Ingo Molnar wrote: > > * Arjun Sreedharan wrote: > >> strcmp() is always expected to return 0 when args are >> same, <0 when arg1 is lesser and >0 otherwise. >> Previously strcmp("a","b") returned 1. Now it give

Re: [PATCH] x86,boot: standardize strcmp()

2015-03-17 Thread Arjun Sreedharan
On 17 March 2015 at 13:16, Ingo Molnar mi...@kernel.org wrote: * Arjun Sreedharan arjun...@gmail.com wrote: strcmp() is always expected to return 0 when args are same, 0 when arg1 is lesser and 0 otherwise. Previously strcmp(a,b) returned 1. Now it gives -1. I'd also add the following

[PATCH] x86,boot: standardize strcmp()

2015-03-16 Thread Arjun Sreedharan
strcmp() is always expected to return 0 when args are same, <0 when arg1 is lesser and >0 otherwise. Previously strcmp("a","b") returned 1. Now it gives -1. Signed-off-by: Arjun Sreedharan --- arch/x86/boot/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] x86,boot: standardize strcmp()

2015-03-16 Thread Arjun Sreedharan
strcmp() is always expected to return 0 when args are same, 0 when arg1 is lesser and 0 otherwise. Previously strcmp(a,b) returned 1. Now it gives -1. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- arch/x86/boot/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] docproc: handle realloc() failure in find_all_symbols()

2015-02-28 Thread Arjun Sreedharan
check realloc rc and avoid potential null dereference and memory leak Signed-off-by: Arjun Sreedharan --- scripts/docproc.c | 8 1 file changed, 8 insertions(+) diff --git a/scripts/docproc.c b/scripts/docproc.c index e267e621..438fc91 100644 --- a/scripts/docproc.c +++ b/scripts

[PATCH] docproc: handle realloc() failure in find_all_symbols()

2015-02-28 Thread Arjun Sreedharan
check realloc rc and avoid potential null dereference and memory leak Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- scripts/docproc.c | 8 1 file changed, 8 insertions(+) diff --git a/scripts/docproc.c b/scripts/docproc.c index e267e621..438fc91 100644 --- a/scripts/docproc.c

Re: [PATCH] mn10300: remove redundant hex()

2015-01-26 Thread Arjun Sreedharan
Ping !! On 30 November 2014 at 16:29, Arjun Sreedharan wrote: > replace rendundant hex() with kernel's hex_to_bin() > > Signed-off-by: Arjun Sreedharan > --- > arch/mn10300/kernel/gdb-stub.c | 61 > -- > 1 file changed, 23 insert

Re: [PATCH] mn10300: remove redundant hex()

2015-01-26 Thread Arjun Sreedharan
Ping !! On 30 November 2014 at 16:29, Arjun Sreedharan arjun...@gmail.com wrote: replace rendundant hex() with kernel's hex_to_bin() Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- arch/mn10300/kernel/gdb-stub.c | 61 -- 1 file changed, 23

[tip:perf/urgent] calloc/xcalloc: Fix argument order

2014-12-12 Thread tip-bot for Arjun Sreedharan
Commit-ID: e4e458b45c5861808674eebfea94cee2258bb2ea Gitweb: http://git.kernel.org/tip/e4e458b45c5861808674eebfea94cee2258bb2ea Author: Arjun Sreedharan AuthorDate: Sat, 6 Dec 2014 17:10:43 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 9 Dec 2014 10:06:29 -0300 calloc

[tip:perf/urgent] calloc/xcalloc: Fix argument order

2014-12-12 Thread tip-bot for Arjun Sreedharan
Commit-ID: e4e458b45c5861808674eebfea94cee2258bb2ea Gitweb: http://git.kernel.org/tip/e4e458b45c5861808674eebfea94cee2258bb2ea Author: Arjun Sreedharan arjun...@gmail.com AuthorDate: Sat, 6 Dec 2014 17:10:43 +0530 Committer: Arnaldo Carvalho de Melo a...@redhat.com CommitDate: Tue, 9 Dec

[PATCH] docproc: fix potential memory leak in find_all_symbols()

2014-12-11 Thread Arjun Sreedharan
in case realloc() fails, @data is overwritten by NULL losing reference to the memory. This is avoided by @data_old Signed-off-by: Arjun Sreedharan --- scripts/docproc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/docproc.c b/scripts/docproc.c index

[PATCH] docproc: fix potential memory leak in find_all_symbols()

2014-12-11 Thread Arjun Sreedharan
in case realloc() fails, @data is overwritten by NULL losing reference to the memory. This is avoided by @data_old Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- scripts/docproc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/docproc.c b/scripts

[PATCH] calloc/xcalloc: fix argument order

2014-12-06 Thread Arjun Sreedharan
calloc() and xcalloc() takes @nmemb first and then @size. fix all w/ pattern "calloc\s*(\s*sizeof". Signed-off-by: Arjun Sreedharan --- scripts/kconfig/mconf.c| 4 ++-- tools/perf/ui/hist.c | 4 ++-- tools/thermal/tmon/sysfs.c | 6 +++--- 3 files changed, 7 insertions(+), 7

[PATCH] calloc/xcalloc: fix argument order

2014-12-06 Thread Arjun Sreedharan
calloc() and xcalloc() takes @nmemb first and then @size. fix all w/ pattern calloc\s*(\s*sizeof. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- scripts/kconfig/mconf.c| 4 ++-- tools/perf/ui/hist.c | 4 ++-- tools/thermal/tmon/sysfs.c | 6 +++--- 3 files changed, 7 insertions

[PATCH] mn10300: remove redundant hex()

2014-11-30 Thread Arjun Sreedharan
replace rendundant hex() with kernel's hex_to_bin() Signed-off-by: Arjun Sreedharan --- arch/mn10300/kernel/gdb-stub.c | 61 -- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c

[PATCH] mn10300: remove redundant hex()

2014-11-30 Thread Arjun Sreedharan
replace rendundant hex() with kernel's hex_to_bin() Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- arch/mn10300/kernel/gdb-stub.c | 61 -- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300

[PATCH] arm: early_printk: do bound check independent of @n

2014-11-21 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan --- arch/arm/kernel/early_printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c index 4307653..9e05f8a 100644 --- a/arch/arm/kernel/early_printk.c +++ b/arch/arm/kernel

[PATCH] arm: early_printk: do bound check independent of @n

2014-11-21 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- arch/arm/kernel/early_printk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c index 4307653..9e05f8a 100644 --- a/arch/arm/kernel/early_printk.c +++ b/arch

[PATCH] usb:phy: propagate __of_usb_find_phy()'s error on failure

2014-11-20 Thread Arjun Sreedharan
When __of_usb_find_phy() fails, it returns -ENODEV - its error code has to be returned by devm_usb_get_phy_by_phandle(). Only when the former function succeeds and try_module_get() fails should -EPROBE_DEFER be returned. Signed-off-by: Arjun Sreedharan --- drivers/usb/phy/phy.c | 4 +++- 1 file

[PATCH] usb:phy: propagate __of_usb_find_phy()'s error on failure

2014-11-20 Thread Arjun Sreedharan
When __of_usb_find_phy() fails, it returns -ENODEV - its error code has to be returned by devm_usb_get_phy_by_phandle(). Only when the former function succeeds and try_module_get() fails should -EPROBE_DEFER be returned. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/usb/phy

Re: [PATCH] params: fix potential memory leak in add_sysfs_param()

2014-08-21 Thread Arjun Sreedharan
On 21 August 2014 03:47, Woodhouse, David wrote: > On Thu, 2014-08-21 at 07:35 +0930, Rusty Russell wrote: >> >> Above this: >> if (!mk->mp) { >> num = 0; >> attrs = NULL; >> } else { >> num = mk->mp->num; >> attrs =

Re: [PATCH] params: fix potential memory leak in add_sysfs_param()

2014-08-21 Thread Arjun Sreedharan
On 21 August 2014 03:47, Woodhouse, David david.woodho...@intel.com wrote: On Thu, 2014-08-21 at 07:35 +0930, Rusty Russell wrote: Above this: if (!mk-mp) { num = 0; attrs = NULL; } else { num = mk-mp-num;

Re: [PATCH] params: fix potential memory leak in add_sysfs_param()

2014-08-20 Thread Arjun Sreedharan
On 21 August 2014 02:19, Rusty Russell wrote: > Arjun Sreedharan writes: >> Do not leak memory when attrs is non NULL and >> krealloc() fails. Without temporary variable, >> reference to it is lost. >> >> Signed-off-by: Arjun Sreedharan > > ... > &

[PATCH] params: fix potential memory leak in add_sysfs_param()

2014-08-20 Thread Arjun Sreedharan
Do not leak memory when attrs is non NULL and krealloc() fails. Without temporary variable, reference to it is lost. Signed-off-by: Arjun Sreedharan --- kernel/params.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/kernel/params.c b/kernel/params.c index

[PATCH] params: fix potential memory leak in add_sysfs_param()

2014-08-20 Thread Arjun Sreedharan
Do not leak memory when attrs is non NULL and krealloc() fails. Without temporary variable, reference to it is lost. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- kernel/params.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/kernel/params.c b

Re: [PATCH] params: fix potential memory leak in add_sysfs_param()

2014-08-20 Thread Arjun Sreedharan
On 21 August 2014 02:19, Rusty Russell ru...@rustcorp.com.au wrote: Arjun Sreedharan arjun...@gmail.com writes: Do not leak memory when attrs is non NULL and krealloc() fails. Without temporary variable, reference to it is lost. Signed-off-by: Arjun Sreedharan arjun...@gmail.com

[PATCH] usb: use kcalloc instead of kzalloc

2014-08-19 Thread Arjun Sreedharan
kcalloc has protection from integer overflows which could arise from the multiplication of number of elements and size. Signed-off-by: Arjun Sreedharan --- drivers/usb/core/config.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/usb/core/config.c b

[PATCH] usb: use kcalloc instead of kzalloc

2014-08-19 Thread Arjun Sreedharan
kcalloc has protection from integer overflows which could arise from the multiplication of number of elements and size. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/usb/core/config.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/usb

[PATCH] usb: misc: yurex: remove useless casting of private_data

2014-08-18 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan --- drivers/usb/misc/yurex.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 1472805..c3a45da 100644 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc/yurex.c @@ -358,7

[PATCH] tools/thermal: fix calloc argument ordering

2014-08-18 Thread Arjun Sreedharan
@number first, @size second argument Signed-off-by: Arjun Sreedharan --- tools/thermal/tmon/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/thermal/tmon/sysfs.c b/tools/thermal/tmon/sysfs.c index dfe4548..1c12536 100644 --- a/tools/thermal/tmon/sysfs.c

[PATCH] tools/thermal: fix calloc argument ordering

2014-08-18 Thread Arjun Sreedharan
@number first, @size second argument Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- tools/thermal/tmon/sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/thermal/tmon/sysfs.c b/tools/thermal/tmon/sysfs.c index dfe4548..1c12536 100644 --- a/tools

[PATCH] usb: misc: yurex: remove useless casting of private_data

2014-08-18 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/usb/misc/yurex.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c index 1472805..c3a45da 100644 --- a/drivers/usb/misc/yurex.c +++ b/drivers/usb/misc

[PATCH] usb: phy: return -ENODEV on failure of try_module_get

2014-08-17 Thread Arjun Sreedharan
When __usb_find_phy_dev() does not return error and try_module_get() fails, return -ENODEV. Signed-off-by: Arjun Sreedharan --- drivers/usb/phy/phy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 36b6bce..fd0d7f1 100644 --- a/drivers

[PATCH] usb: phy: return -ENODEV on failure of try_module_get

2014-08-17 Thread Arjun Sreedharan
When __usb_find_phy_dev() does not return error and try_module_get() fails, return -ENODEV Signed-off-by: Arjun Sreedharan --- drivers/usb/phy/phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 36b6bce..8ad3638 100644 --- a/drivers/usb

[PATCH] usb: phy: return -ENODEV on failure of try_module_get

2014-08-17 Thread Arjun Sreedharan
When __usb_find_phy_dev() does not return error and try_module_get() fails, return -ENODEV Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/usb/phy/phy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 36b6bce..8ad3638 100644

[PATCH] usb: phy: return -ENODEV on failure of try_module_get

2014-08-17 Thread Arjun Sreedharan
When __usb_find_phy_dev() does not return error and try_module_get() fails, return -ENODEV. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/usb/phy/phy.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 36b6bce..fd0d7f1

[PATCH] cpufreq: exynos: free memory immediately on unknown SoC

2014-08-16 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan --- drivers/cpufreq/exynos-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 1e0ec57..e47d165 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c

[PATCH] ata: pata_samsung_cf: change ret type to signed

2014-08-16 Thread Arjun Sreedharan
Change return type to signed int since it could be a negative errno. Signed-off-by: Arjun Sreedharan --- drivers/ata/pata_samsung_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index fb52883..0c1c03a 100644

[PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
scc_bus_softreset not necessarily should return zero. Propagate the error code. Signed-off-by: Arjun Sreedharan --- drivers/ata/pata_scc.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 4e006d7..b5013dc

Re: [PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
On 16 August 2014 17:51, Tejun Heo wrote: > On Sat, Aug 16, 2014 at 05:34:31PM +0530, Arjun Sreedharan wrote: >> On 16 August 2014 17:07, Tejun Heo wrote: >> > Hello, >> > >> > On Sat, Aug 16, 2014 at 03:47:17PM +0530, Arjun Sreedharan wrote: >> >>

Re: [PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
On 16 August 2014 17:07, Tejun Heo wrote: > Hello, > > On Sat, Aug 16, 2014 at 03:47:17PM +0530, Arjun Sreedharan wrote: >> scc_bus_softreset not necessarily should return zero. >> Propagate the error code. >> Signed-off-by: Arjun Sreedharan >> --- >> dri

[PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
scc_bus_softreset not necessarily should return zero. Propagate the error code. Signed-off-by: Arjun Sreedharan --- drivers/ata/pata_scc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 4e006d7..5618c4518 100644

[PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
scc_bus_softreset not necessarily should return zero. Propagate the error code. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/ata/pata_scc.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index 4e006d7

Re: [PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
On 16 August 2014 17:07, Tejun Heo t...@kernel.org wrote: Hello, On Sat, Aug 16, 2014 at 03:47:17PM +0530, Arjun Sreedharan wrote: scc_bus_softreset not necessarily should return zero. Propagate the error code. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/ata/pata_scc.c

Re: [PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
On 16 August 2014 17:51, Tejun Heo t...@kernel.org wrote: On Sat, Aug 16, 2014 at 05:34:31PM +0530, Arjun Sreedharan wrote: On 16 August 2014 17:07, Tejun Heo t...@kernel.org wrote: Hello, On Sat, Aug 16, 2014 at 03:47:17PM +0530, Arjun Sreedharan wrote: scc_bus_softreset not necessarily

[PATCH] ata: propagate return value of scc_wait_after_reset

2014-08-16 Thread Arjun Sreedharan
scc_bus_softreset not necessarily should return zero. Propagate the error code. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/ata/pata_scc.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index

[PATCH] ata: pata_samsung_cf: change ret type to signed

2014-08-16 Thread Arjun Sreedharan
Change return type to signed int since it could be a negative errno. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/ata/pata_samsung_cf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c index

[PATCH] cpufreq: exynos: free memory immediately on unknown SoC

2014-08-16 Thread Arjun Sreedharan
Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/cpufreq/exynos-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 1e0ec57..e47d165 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers

[PATCH] remove explicit devm_kfree

2014-08-15 Thread Arjun Sreedharan
Memory allocated with devm_kzalloc() is freed automatically when device out of scope. Signed-off-by: Arjun Sreedharan --- drivers/input/misc/soc_button_array.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c index

[PATCH] remove explicit devm_kfree

2014-08-15 Thread Arjun Sreedharan
Memory allocated with devm_kzalloc() is freed automatically when device out of scope. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/input/misc/soc_button_array.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc

[PATCH] Replace faulty is_hex_digit() by isxdigit()

2014-07-31 Thread Arjun Sreedharan
0 is ascii for NULL. Hex digit matching should be from '0'. Faulty version returns true for #,$,%,& etc. Signed-off-by: Arjun Sreedharan --- drivers/acpi/acpi_pnp.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_p

[PATCH] Replace faulty is_hex_digit() by isxdigit()

2014-07-31 Thread Arjun Sreedharan
0 is ascii for NULL. Hex digit matching should be from '0'. Faulty version returns true for #,$,%, etc. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/acpi/acpi_pnp.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers

[PATCH] Replace faulty is_hex_digit() by isxdigit()

2014-07-30 Thread Arjun Sreedharan
0 is ascii for NULL. Hex digit matching should be from '0'. Unfixed version returns true for #,$,%,& etc. Signed-off-by: Arjun Sreedharan --- drivers/acpi/acpi_pnp.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c i

[PATCH] ACPI: fix test for hex digit.

2014-07-30 Thread Arjun Sreedharan
decimal 0 is ascii for NULL. Hex digit matching should be from '0' (decimal 30 of ascii) to '9' and 'A' to 'F'. Unfixed version returns true for #,$,%,& etc. Signed-off-by: Arjun Sreedharan --- drivers/acpi/acpi_pnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH] ACPI: fix test for hex digit.

2014-07-30 Thread Arjun Sreedharan
decimal 0 is ascii for NULL. Hex digit matching should be from '0' (decimal 30 of ascii) to '9' and 'A' to 'F'. Unfixed version returns true for #,$,%, etc. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/acpi/acpi_pnp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] Replace faulty is_hex_digit() by isxdigit()

2014-07-30 Thread Arjun Sreedharan
0 is ascii for NULL. Hex digit matching should be from '0'. Unfixed version returns true for #,$,%, etc. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/acpi/acpi_pnp.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi

Re: [PATCH] PNPACPI: check return value of pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data()

2014-07-23 Thread Arjun Sreedharan
at for unsupported types like ACPI_RESOURCE_TYPE_FIXED_DMA pnpacpi_set_resources() will fail. >> On 23 July 2014 03:42, Rafael J. Wysocki wrote: >> > On Wednesday, July 23, 2014 12:43:39 AM Arjun Sreedharan wrote: >> >> Handle err

Re: [PATCH] PNPACPI: check return value of pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data()

2014-07-23 Thread Arjun Sreedharan
that for unsupported types like ACPI_RESOURCE_TYPE_FIXED_DMA pnpacpi_set_resources() will fail. On 23 July 2014 03:42, Rafael J. Wysocki r...@rjwysocki.net wrote: On Wednesday, July 23, 2014 12:43:39 AM Arjun Sreedharan wrote: Handle error condition since pnpacpi_parse_allocated_resource

[PATCH] PNPACPI: check return value of pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data()

2014-07-22 Thread Arjun Sreedharan
Handle error condition since pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data() could return -EPERM. Signed-off-by: Arjun Sreedharan --- drivers/pnp/pnpacpi/core.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pnp/pnpacpi/core.c b

[PATCH] PNPACPI: check return value of pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data()

2014-07-22 Thread Arjun Sreedharan
Handle error condition since pnpacpi_parse_allocated_resource() and pnpacpi_parse_resource_option_data() could return -EPERM. Signed-off-by: Arjun Sreedharan arjun...@gmail.com --- drivers/pnp/pnpacpi/core.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pnp