Re: [PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-07 Thread arvind Yadav
As per your concern, I have change commit message. Submit other patch. Thanks, Arvind Yadav On Thursday 07 July 2016 01:40 PM, Arnd Bergmann wrote: On Thursday, July 7, 2016 12:47:43 AM CEST Arvind Yadav wrote: Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an

Re: [PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-07 Thread arvind Yadav
As per your concern, I have change commit message. Submit other patch. Thanks, Arvind Yadav On Thursday 07 July 2016 01:40 PM, Arnd Bergmann wrote: On Thursday, July 7, 2016 12:47:43 AM CEST Arvind Yadav wrote: Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an

[PATCH] Remove lots of IS_ERR_VALUE abuses and compilation warning.

2016-07-07 Thread Arvind Yadav
Passing value in IS_ERR_VALUE() is wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. Passing an 'unsigned

[PATCH] Remove lots of IS_ERR_VALUE abuses and compilation warning.

2016-07-07 Thread Arvind Yadav
Passing value in IS_ERR_VALUE() is wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. Passing an 'unsigned

Re: [PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-07 Thread Arnd Bergmann
On Thursday, July 7, 2016 12:47:43 AM CEST Arvind Yadav wrote: > Most users of IS_ERR_VALUE() in the kernel are wrong, as they > pass an 'int' into a function that takes an 'unsigned long' > argument. This happens to work because the type is sign-extended > on 64-bit architectures

Re: [PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-07 Thread Arnd Bergmann
On Thursday, July 7, 2016 12:47:43 AM CEST Arvind Yadav wrote: > Most users of IS_ERR_VALUE() in the kernel are wrong, as they > pass an 'int' into a function that takes an 'unsigned long' > argument. This happens to work because the type is sign-extended > on 64-bit architectures

[PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-06 Thread Arvind Yadav
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However,

[PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-06 Thread Arvind Yadav
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However,

[PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-06 Thread Arvind Yadav
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However,

[PATCH] Remove lots of IS_ERR_VALUE abuses.

2016-07-06 Thread Arvind Yadav
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However,

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Linus Torvalds
On Fri, May 27, 2016 at 2:23 PM, Arnd Bergmann wrote: > > This patch changes all users of IS_ERR_VALUE() that I could find > on 32-bit ARM randconfig builds and x86 allmodconfig. For the > moment, this doesn't change the definition of IS_ERR_VALUE() > because there are probably

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Linus Torvalds
On Fri, May 27, 2016 at 2:23 PM, Arnd Bergmann wrote: > > This patch changes all users of IS_ERR_VALUE() that I could find > on 32-bit ARM randconfig builds and x86 allmodconfig. For the > moment, this doesn't change the definition of IS_ERR_VALUE() > because there are probably still architecture

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Al Viro
On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote: > @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct > lib_info *libs) > > res = prepare_binprm(); > > - if (!IS_ERR_VALUE(res)) > + if (res >= 0) if (res == 0), please -

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Al Viro
On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote: > @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct > lib_info *libs) > > res = prepare_binprm(); > > - if (!IS_ERR_VALUE(res)) > + if (res >= 0) if (res == 0), please -

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Srinivas Kandagatla
On 27/05/16 22:23, Arnd Bergmann wrote: drivers/acpi/acpi_dbg.c | 22 +++--- drivers/ata/sata_highbank.c | 2 +- drivers/clk/tegra/clk-tegra210.c | 2 +- drivers/cpufreq/omap-cpufreq.c | 2

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Srinivas Kandagatla
On 27/05/16 22:23, Arnd Bergmann wrote: drivers/acpi/acpi_dbg.c | 22 +++--- drivers/ata/sata_highbank.c | 2 +- drivers/clk/tegra/clk-tegra210.c | 2 +- drivers/cpufreq/omap-cpufreq.c | 2

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Linus Torvalds
On Fri, May 27, 2016 at 2:46 PM, Andrew Morton wrote: > > So you do plan to add some sort of typechecking into IS_ERR_VALUE()? The easiest way to do it is to just turn the (x) into (unsigned long)(void *)(x), which then complains about casting an integer to a pointer

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Linus Torvalds
On Fri, May 27, 2016 at 2:46 PM, Andrew Morton wrote: > > So you do plan to add some sort of typechecking into IS_ERR_VALUE()? The easiest way to do it is to just turn the (x) into (unsigned long)(void *)(x), which then complains about casting an integer to a pointer if the integer has the wrong

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Andrew Morton
On Fri, 27 May 2016 23:23:25 +0200 Arnd Bergmann wrote: > Most users of IS_ERR_VALUE() in the kernel are wrong, as they > pass an 'int' into a function that takes an 'unsigned long' > argument. This happens to work because the type is sign-extended > on 64-bit architectures before

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Andrew Morton
On Fri, 27 May 2016 23:23:25 +0200 Arnd Bergmann wrote: > Most users of IS_ERR_VALUE() in the kernel are wrong, as they > pass an 'int' into a function that takes an 'unsigned long' > argument. This happens to work because the type is sign-extended > on 64-bit architectures before it gets

[PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Arnd Bergmann
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However, anything that passes an

[PATCH] remove lots of IS_ERR_VALUE abuses

2016-05-27 Thread Arnd Bergmann
Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However, anything that passes an