All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle.com>
To: "John Anthony Kazos Jr." <jakj@j-a-k-j.com>
Cc: Richard Knutsson <ricknu-0@student.ltu.se>,
	Jiri Bohac <jbohac@suse.cz>,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] fix abs() macro to work with types wider than int
Date: Wed, 25 Apr 2007 08:38:39 -0700	[thread overview]
Message-ID: <462F75FF.5090008@oracle.com> (raw)
In-Reply-To: <alpine.DEB.0.98.0704251123370.19149@sigma.j-a-k-j.com>

John Anthony Kazos Jr. wrote:
>>>> I think it's like it is just to be consistent with abs() in C,
>>>> which also contains labs() and llabs().
>>>>   
>>> We actually had labs() before (few months ago), but since it was not 
>>> used, and if it would it seemed better to just fix abs(), it was 
>>> removed. So I think this is the appropriate way to go.
>> Sounds like when someone actually needs labs() or llabs()
>> they can submit a patch for however they would like to use it.
> 
> However they would like to use *abs()? What different ways are possible to 
> take the arithmetic absolute value? I see record of many cases where 
> dozens of authors have macros that then get collapsed to include files. So 
> why not avoid that annoyance this time and -start- with it in the include 
> files?
> 
> Can there even be any reason beyond unnecessary pedantics to have 
> [l[l]]abs?

See Paragraph 1 above.  We do lots of functions in a manner that is
like C (or libc) so that we don't confuse developers.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  reply	other threads:[~2007-04-25 15:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-19  9:23 [RFC][PATCH] fix abs() macro to work with types wider than int Jiri Bohac
2007-04-19 15:43 ` Randy Dunlap
2007-04-20 12:44   ` Richard Knutsson
2007-04-25 15:20     ` Randy Dunlap
2007-04-25 15:26       ` John Anthony Kazos Jr.
2007-04-25 15:38         ` Randy Dunlap [this message]
2007-04-25 23:42           ` John Anthony Kazos Jr.
2007-04-25 18:24         ` linux-os (Dick Johnson)
2007-04-25 20:05           ` Andreas Schwab
2007-04-25 20:30             ` linux-os (Dick Johnson)
2007-04-25 21:57               ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=462F75FF.5090008@oracle.com \
    --to=randy.dunlap@oracle.com \
    --cc=akpm@osdl.org \
    --cc=jakj@j-a-k-j.com \
    --cc=jbohac@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ricknu-0@student.ltu.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.