Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-03 Thread arvind Yadav
On Wednesday 03 August 2016 01:27 AM, Scott Wood wrote: On 08/02/2016 10:34 AM, arvind Yadav wrote: On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: On 08/01/2016 02:02 AM, Arnd Bergmann wrote: diff --git a/include/linux/e

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread Scott Wood
On 08/02/2016 10:34 AM, arvind Yadav wrote: > > > On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: >> On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: >>> On 08/01/2016 02:02 AM, Arnd Bergmann wrote: > diff --git a/include/linux/err.h b/include/linux/err.h > index 1e355

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread arvind Yadav
On Tuesday 02 August 2016 01:15 PM, Arnd Bergmann wrote: On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: On 08/01/2016 02:02 AM, Arnd Bergmann wrote: diff --git a/include/linux/err.h b/include/linux/err.h index 1e35588..c2a2789 100644 --- a/include/linux/err.h +++ b/include/linux/

[v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread Arvind Yadav
IS_ERR_VALUE() assumes that parameter is an unsigned long. It can not be used to check if 'unsigned int' is passed insted. Which tends to reflect an error. In 64bit architectures sizeof (int) == 4 && sizeof (long) == 8. IS_ERR_VALUE(x) is ((x) >= (unsigned long)-4095). IS_ERR_VALUE() of 'unsigned

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-02 Thread Arnd Bergmann
On Monday, August 1, 2016 4:55:43 PM CEST Scott Wood wrote: > On 08/01/2016 02:02 AM, Arnd Bergmann wrote: > >> diff --git a/include/linux/err.h b/include/linux/err.h > >> index 1e35588..c2a2789 100644 > >> --- a/include/linux/err.h > >> +++ b/include/linux/err.h > >> @@ -18,7 +18,17 @@ > >> > >

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-01 Thread Scott Wood
On 08/01/2016 02:02 AM, Arnd Bergmann wrote: > On Sunday, July 31, 2016 4:48:44 PM CEST Arvind Yadav wrote: >> IS_ERR_VALUE() assumes that parameter is an unsigned long. >> It can not be used to check if 'unsigned int' is passed insted. >> Which tends to reflect an error. >> >> In 64bit architectur

Re: [v4] Fix to avoid IS_ERR_VALUE and IS_ERR abuses on 64bit systems.

2016-08-01 Thread Arnd Bergmann
On Sunday, July 31, 2016 4:48:44 PM CEST Arvind Yadav wrote: > IS_ERR_VALUE() assumes that parameter is an unsigned long. > It can not be used to check if 'unsigned int' is passed insted. > Which tends to reflect an error. > > In 64bit architectures sizeof (int) == 4 && sizeof (long) == 8. > IS_ER