mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: David Laight <david.laight@aculab.com>,
	linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	Jason@zx2c4.com, hch@infradead.org,
	andriy.shevchenko@linux.intel.com, akpm@linux-foundation.org
Subject: Re: + minmax-add-umina-b-and-umaxa-b.patch added to mm-nonmm-unstable branch
Date: Thu, 28 Sep 2023 11:38:38 +0300	[thread overview]
Message-ID: <b1198988-b60e-41e2-99bf-6af145e1d201@p183> (raw)
In-Reply-To: <ZRSJ5QMNGV7ObfrL@casper.infradead.org>

On Wed, Sep 27, 2023 at 09:00:37PM +0100, Matthew Wilcox wrote:
> On Wed, Sep 27, 2023 at 10:21:41PM +0300, Alexey Dobriyan wrote:
> > On Wed, Sep 27, 2023 at 10:30:33AM -0700, Andrew Morton wrote:
> > > +#define umin(x, y)	\
> > > +	__careful_cmp((x) + 0u + 0ul + 0ull, (y) + 0u + 0ul + 0ull, <)
> > 
> > kmin() and kmax() are (of course!) much better names.
> 
> it's unsigned, not user.

Yes, but the same idea applies to signed types:

min, max require identical types
min_t force type
kmin, kmax are relaxed min/max versions if signednesses match.

  reply	other threads:[~2023-09-28  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230927173033.AF86DC433C7@smtp.kernel.org>
2023-09-27 19:21 ` Alexey Dobriyan
2023-09-27 20:00   ` Matthew Wilcox
2023-09-28  8:38     ` Alexey Dobriyan [this message]
2023-09-28  8:55       ` David Laight

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=b1198988-b60e-41e2-99bf-6af145e1d201@p183 \
    --to=adobriyan@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.laight@aculab.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®