lkml.org 
[lkml]   [2015]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: + kernelh-make-abs-work-with-64-bit-types.patch added to -mm tree
Date
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()
> http://marc.info/?l=linux-kernel&m=133518745522740&w=4

Perhaps:

+ (void)(_x))))))); \

instead of:

+ _x)))))); \

at the end. Since kabs makes no sense for unsigned types it’s best to
fail with compile-time error than to let user think that the call is
actually doing something.

Also, you don’t need ({ … }) around the ‘_x < 0 ? -_x : _x’ expression,
do you?

--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, ミハウ “mina86” ナザレヴイツ (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>-----ooO--(_)--Ooo--


\
 
 \ /
  Last update: 2015-09-24 15:41    [W:0.076 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site