public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	'Linus Torvalds' <torvalds@linux-foundation.org>,
	'Netdev' <netdev@vger.kernel.org>,
	"'dri-devel@lists.freedesktop.org'"
	<dri-devel@lists.freedesktop.org>,
	'Andy Shevchenko' <andriy.shevchenko@linux.intel.com>,
	'Andrew Morton' <akpm@linux-foundation.org>,
	"'Matthew Wilcox (Oracle)'" <willy@infradead.org>,
	'Christoph Hellwig' <hch@infradead.org>,
	'Dan Carpenter' <dan.carpenter@linaro.org>,
	'Linus Walleij' <linus.walleij@linaro.org>,
	"'David S . Miller'" <davem@davemloft.net>,
	"'linux-btrfs@vger.kernel.org'" <linux-btrfs@vger.kernel.org>,
	'Jens Axboe' <axboe@kernel.dk>
Subject: Re: [PATCH next 09/11] tree-wide: minmax: Replace all the uses of max() for array sizes with max_const()
Date: Mon, 29 Jan 2024 08:54:12 +0100	[thread overview]
Message-ID: <20240129075412.GU31555@twin.jikos.cz> (raw)
In-Reply-To: <10638249b13c43cab9a5522271aa99e2@AcuMS.aculab.com>

On Sun, Jan 28, 2024 at 07:34:23PM +0000, David Laight wrote:
> These are the only uses of max() that require a constant value
> from constant parameters.
> There don't seem to be any similar uses of min().
> 
> Replacing the max() by max_const() lets min()/max() be simplified
> speeding up compilation.
> 
> max_const() will convert enums to int (or unsigned int) so that the
> casts added by max_t() are no longer needed.
> 
> Signed-off-by: David Laight <david.laight@aculab.com>
> ---

For

>  fs/btrfs/tree-checker.c                        | 2 +-

Acked-by: David Sterba <dsterba@suse.com>

  reply	other threads:[~2024-01-29  7:54 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 19:24 [PATCH next 00/11] minmax: Optimise to reduce .i line length David Laight
2024-01-28 19:26 ` [PATCH next 01/11] minmax: Put all the clamp() definitions together David Laight
2024-01-28 19:27 ` [PATCH next 02/11] minmax: Use _Static_assert() instead of static_assert() David Laight
2024-01-28 19:27 ` [PATCH next 03/11] minmax: Simplify signedness check David Laight
2024-01-28 19:28 ` [PATCH next 04/11] minmax: Replace multiple __UNIQUE_ID() by directly using __COUNTER__ David Laight
2024-01-28 19:29 ` [PATCH next 05/11] minmax: Move the signedness check out of __cmp_once() and __clamp_once() David Laight
2024-01-28 19:30 ` [PATCH next 00611] minmax: Remove 'constexpr' check from __careful_clamp() David Laight
2024-01-28 19:31 ` [PATCH next 0711] minmax: minmax: Add __types_ok3() and optimise defines with 3 arguments David Laight
2024-01-28 19:32 ` [PATCH next 08/11 minmax: Add min_const() and max_const() David Laight
2024-01-28 19:34 ` [PATCH next 09/11] tree-wide: minmax: Replace all the uses of max() for array sizes with max_const() David Laight
2024-01-29  7:54   ` David Sterba [this message]
2024-01-28 19:35 ` [PATCH next 10/11] block: Use a boolean expression instead of max() on booleans David Laight
2024-01-28 19:59   ` Linus Torvalds
2024-01-28 22:21     ` David Laight
2024-01-28 22:32       ` Linus Torvalds
2024-01-29  9:07   ` Jani Nikula
2024-01-29  9:22     ` David Laight
2024-01-29  9:47       ` Jani Nikula
2024-01-29 10:16       ` Dan Carpenter
2024-01-28 19:36 ` [PATCH next 11/11] minmax: min() and max() don't need to return constant expressions 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=20240129075412.GU31555@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=David.Laight@ACULAB.COM \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=axboe@kernel.dk \
    --cc=dan.carpenter@linaro.org \
    --cc=davem@davemloft.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@infradead.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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