Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-25 Thread Michal Nazarewicz
On Thu, Sep 24 2015, Linus Torvalds wrote: > One thing that *is* interesting is "what if 'long' and 's64' are the > same size?" In particular, it means that right now Michal's patch > *always* returns "long" on a 64-bit architecture, but will return > "long" or "s64" on a 32-bit one. That’s not

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-25 Thread Michal Nazarewicz
On Thu, Sep 24 2015, Linus Torvalds wrote: > One thing that *is* interesting is "what if 'long' and 's64' are the > same size?" In particular, it means that right now Michal's patch > *always* returns "long" on a 64-bit architecture, but will return > "long" or "s64" on a 32-bit one. That’s not

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-24 Thread Linus Torvalds
On Wed, Sep 23, 2015 at 6:44 AM, Alexey Dobriyan wrote: > > I've sent kabs() before which didn't go in because it didn't work for > INT_MAX et al > > [PATCH v2] Add kabs() > http://marc.info/?l=linux-kernel=133518745522740=4 Yeah, no, that's bad. Testing against char/short is pointless. They

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-24 Thread Alexey Dobriyan
On Thu, Sep 24, 2015 at 4:32 PM, Michal Nazarewicz wrote: > On Wed, Sep 23 2015, Alexey Dobriyan wrote: >> I've sent kabs() before which didn't go in because it didn't work for >> INT_MAX et al >> (don't worry, this abs() doens't as well) but it is nicer that this >> version in other aspects >>

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-24 Thread Michal Nazarewicz
On Wed, Sep 23 2015, Alexey Dobriyan wrote: > I've sent kabs() before which didn't go in because it didn't work for > INT_MAX et al > (don't worry, this abs() doens't as well) but it is nicer that this > version in other aspects > (hopefully). > > [PATCH v2] Add kabs() >

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-24 Thread Michal Nazarewicz
On Wed, Sep 23 2015, Alexey Dobriyan wrote: > I've sent kabs() before which didn't go in because it didn't work for > INT_MAX et al > (don't worry, this abs() doens't as well) but it is nicer that this > version in other aspects > (hopefully). > > [PATCH v2] Add kabs() >

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-24 Thread Alexey Dobriyan
On Thu, Sep 24, 2015 at 4:32 PM, Michal Nazarewicz wrote: > On Wed, Sep 23 2015, Alexey Dobriyan wrote: >> I've sent kabs() before which didn't go in because it didn't work for >> INT_MAX et al >> (don't worry, this abs() doens't as well) but it is nicer that this >> version in

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-24 Thread Linus Torvalds
On Wed, Sep 23, 2015 at 6:44 AM, Alexey Dobriyan wrote: > > I've sent kabs() before which didn't go in because it didn't work for > INT_MAX et al > > [PATCH v2] Add kabs() > http://marc.info/?l=linux-kernel=133518745522740=4 Yeah, no, that's bad. Testing against char/short

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-23 Thread Andrew Morton
On Wed, 23 Sep 2015 16:44:29 +0300 Alexey Dobriyan wrote: > On Fri, Sep 18, 2015 at 12:36 AM, wrote: > > > > -#define abs(x) ({ \ > > - long ret; \ > > - if (sizeof(x) ==

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-23 Thread Alexey Dobriyan
On Fri, Sep 18, 2015 at 12:36 AM, wrote: > -#define abs(x) ({ \ > - long ret; \ > - if (sizeof(x) == sizeof(long)) {\ > - long __x = (x);

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-23 Thread Alexey Dobriyan
On Fri, Sep 18, 2015 at 12:36 AM, wrote: > -#define abs(x) ({ \ > - long ret; \ > - if (sizeof(x) == sizeof(long)) {\ > -

Re: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree

2015-09-23 Thread Andrew Morton
On Wed, 23 Sep 2015 16:44:29 +0300 Alexey Dobriyan wrote: > On Fri, Sep 18, 2015 at 12:36 AM, wrote: > > > > -#define abs(x) ({ \ > > - long ret; \