linux/drivers/md
Linus Torvalds 89f6bf22d0 minmax: don't use max() in situations that want a C constant expression
[ Upstream commit cb04e8b1d2 ]

We only had a couple of array[] declarations, and changing them to just
use 'MAX()' instead of 'max()' fixes the issue.

This will allow us to simplify our min/max macros enormously, since they
can now unconditionally use temporary variables to avoid using the
argument values multiple times.

Cc: David Laight <David.Laight@aculab.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eliav Farber <farbere@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-19 16:21:52 +02:00
..
bcache bcache: fix NULL pointer in cache_set_flush() 2025-07-10 15:57:32 +02:00
persistent-data dm array: fix cursor index when skipping across block boundaries 2025-01-23 17:15:48 +01:00
dm-bio-prison-v1.c dm bio prison: replace spin_lock_irqsave with spin_lock_irq 2019-11-05 14:53:03 -05:00
dm-bio-prison-v1.h block: switch bios to blk_status_t 2017-06-09 09:27:32 -06:00
dm-bio-prison-v2.c dm bio prison v2: use true/false for bool variable 2020-01-07 12:07:08 -05:00
dm-bio-prison-v2.h dm bio prison v2: new interface for the bio prison 2017-03-07 11:30:16 -05:00
dm-bio-record.h block: store a block_device pointer in struct bio 2021-01-24 18:17:20 -07:00
dm-bufio.c dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size 2021-03-04 14:53:54 -05:00
dm-builtin.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dm-cache-background-tracker.c dm cache background tracker: fix sparse warning 2018-04-30 15:40:40 -04:00
dm-cache-background-tracker.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-block-types.h linux: drop __bitwise__ everywhere 2016-12-16 00:13:41 +02:00
dm-cache-metadata.c dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort 2023-01-12 11:58:52 +01:00
dm-cache-metadata.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-policy-internal.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-policy-smq.c dm cache policy smq: ensure IO doesn't prevent cleaner policy progress 2023-08-03 10:22:46 +02:00
dm-cache-policy.c dm cache: add policy name to status output 2014-01-16 13:44:11 -05:00
dm-cache-policy.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-target.c dm cache: prevent BUG_ON by blocking retries on failed device resumes 2025-06-04 14:37:58 +02:00
dm-clone-metadata.c bitmap: introduce generic optimized bitmap_size() 2024-09-04 13:23:16 +02:00
dm-clone-metadata.h dm clone metadata: Fix return type of dm_clone_nr_of_hydrated_regions() 2020-03-27 14:42:51 -04:00
dm-clone-target.c dm clone: call kmem_cache_destroy() in dm_clone_init() error path 2023-05-11 23:00:40 +09:00
dm-core.h dm: limit the number of targets and parameter size area 2024-02-23 08:55:14 +01:00
dm-crypt.c dm-crypt: track tag_offset in convert_context 2025-03-13 12:50:28 +01:00
dm-delay.c dm-delay: fix a race between delay_presuspend and delay_bio 2023-12-03 07:31:25 +01:00
dm-dust.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-ebs-target.c dm-ebs: don't set the flag DM_TARGET_PASSES_INTEGRITY 2025-01-23 17:15:51 +01:00
dm-era-target.c dm era: commit metadata in postsuspend after worker stops 2022-06-29 09:03:20 +02:00
dm-exception-store.c - Revert a dm-multipath change that caused a regression for unprivledged 2015-11-04 21:19:53 -08:00
dm-exception-store.h - Improve DM snapshot target's scalability by using finer grained 2019-05-16 15:55:48 -07:00
dm-flakey.c dm flakey: fix a crash with invalid table line 2023-05-11 23:00:40 +09:00
dm-ima.c integrity-v5.15 2021-09-02 12:51:41 -07:00
dm-ima.h dm ima: add version info to dm related events in ima log 2021-08-20 15:59:47 -04:00
dm-init.c dm init: Handle minors larger than 255 2024-09-12 11:07:47 +02:00
dm-integrity.c minmax: don't use max() in situations that want a C constant expression 2025-10-19 16:21:52 +02:00
dm-io-tracker.h dm writecache: make writeback pause configurable 2021-06-28 16:30:13 -04:00
dm-io.c block: Add bio_max_segs 2021-02-26 15:49:51 -07:00
dm-ioctl.c dm resume: don't return EINVAL when signalled 2024-09-04 13:23:16 +02:00
dm-kcopyd.c dm writecache: have ssd writeback wait if the kcopyd workqueue is busy 2021-06-15 15:42:03 -04:00
dm-linear.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-log-userspace-base.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-log-userspace-transfer.c dm log userspace transfer: match wait_for_completion_timeout return type 2015-04-15 12:10:20 -04:00
dm-log-userspace-transfer.h dm log: userspace add luid to distinguish between concurrent log instances 2009-09-04 20:40:34 +01:00
dm-log-writes.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-log.c dm mirror log: clear log bits up to BITS_PER_LONG boundary 2022-06-29 09:03:20 +02:00
dm-mpath.c dm ima: update dm target attributes for ima measurements 2021-08-20 16:07:36 -04:00
dm-mpath.h dm mpath: remove is_active from struct dm_path 2008-10-10 13:36:58 +01:00
dm-path-selector.c md: Add module.h to all files using it implicitly 2011-10-31 19:31:18 -04:00
dm-path-selector.h dm mpath: pass IO start time to path selector 2020-05-15 10:29:36 -04:00
dm-ps-historical-service-time.c dm-mpath: don't print the "loaded" message if registering fails 2025-08-28 16:24:24 +02:00
dm-ps-io-affinity.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-ps-queue-length.c dm-mpath: don't print the "loaded" message if registering fails 2025-08-28 16:24:24 +02:00
dm-ps-round-robin.c dm-mpath: don't print the "loaded" message if registering fails 2025-08-28 16:24:24 +02:00
dm-ps-service-time.c dm-mpath: don't print the "loaded" message if registering fails 2025-08-28 16:24:24 +02:00
dm-raid.c dm-raid: fix variable in journal device check 2025-07-10 15:57:39 +02:00
dm-raid1.c dm-mirror: fix a tiny race condition 2025-06-27 11:05:26 +01:00
dm-region-hash.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
dm-rq.c Revert "dm: requeue IO if mapping table not yet available" 2024-10-17 15:11:06 +02:00
dm-rq.h dm: remove unused _rq_tio_cache and _rq_cache 2019-03-05 14:48:50 -05:00
dm-snap-persistent.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-snap-transient.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-snap.c dm snapshot: fix lockup in dm_exception_table_exit 2024-04-10 16:18:44 +02:00
dm-stats.c dm stats: check for and propagate alloc_percpu failure 2023-03-30 12:48:00 +02:00
dm-stats.h dm stats: check for and propagate alloc_percpu failure 2023-03-30 12:48:00 +02:00
dm-stripe.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-switch.c dm: update target status functions to support IMA measurement 2021-08-10 13:34:23 -04:00
dm-sysfs.c dm: remove legacy request-based IO path 2018-10-11 11:36:09 -04:00
dm-table.c dm: restrict dm device size to 2^63-512 bytes 2025-06-04 14:37:57 +02:00
dm-target.c dm mpath: fix missing call of path selector type->end_io 2019-04-25 15:38:52 -04:00
dm-thin-metadata.c dm thin metadata: check fail_io before using data_sm 2023-06-21 15:59:14 +02:00
dm-thin-metadata.h dm thin metadata: Add support for a pre-commit callback 2019-12-05 17:05:24 -05:00
dm-thin.c dm thin: make get_first_thin use rcu-safe list first function 2025-01-23 17:15:50 +01:00
dm-uevent.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dm-uevent.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dm-unstripe.c dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow 2024-11-14 13:13:39 +01:00
dm-verity-fec.c dm-verity: align struct dm_verity_fec_io properly 2023-12-08 08:48:01 +01:00
dm-verity-fec.h dm verity fec: fix misaligned RS roots IO 2021-04-14 14:28:29 -04:00
dm-verity-target.c dm verity: don't perform FEC for failed readahead IO 2023-12-08 08:48:01 +01:00
dm-verity-verify-sig.c dm verity: fix require_signatures module_param permissions 2021-05-25 16:14:05 -04:00
dm-verity-verify-sig.h dm verity: Fix compilation warning 2020-08-04 15:48:13 -04:00
dm-verity.h dm-verity, dm-crypt: align "struct bvec_iter" correctly 2024-03-26 18:21:13 -04:00
dm-writecache.c dm writecache: set a default MAX_WRITEBACK_JOBS 2022-08-17 14:24:23 +02:00
dm-zero.c dm: add support for REQ_NOWAIT to various targets 2020-12-04 18:04:35 -05:00
dm-zone.c dm zone: fix dm_revalidate_zones() memory allocation 2021-06-25 15:25:23 -04:00
dm-zoned-metadata.c dm zoned: check zone capacity 2021-06-04 12:07:28 -04:00
dm-zoned-reclaim.c dm kcopyd: avoid useless atomic operations 2021-06-04 12:07:24 -04:00
dm-zoned-target.c md: dm-zoned-target: Initialize return variable r to avoid uninitialized use 2025-08-28 16:24:24 +02:00
dm-zoned.h dm zoned: select reclaim zone based on device index 2020-06-05 14:59:53 -04:00
dm.c dm: fix NULL pointer dereference in __dm_suspend() 2025-10-19 16:21:51 +02:00
dm.h dm: send just one event on resize, not two 2023-03-10 09:40:05 +01:00
Kconfig md: select BLOCK_LEGACY_AUTOLOAD 2025-03-13 12:51:11 +01:00
Makefile dm ima: measure data on table load 2021-08-10 13:32:40 -04:00
md-autodetect.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
md-bitmap.c md/md-bitmap: fix dm-raid max_write_behind setting 2025-07-10 15:57:32 +02:00
md-bitmap.h md: Avoid namespace collision with bitmap API 2018-08-01 15:49:39 -07:00
md-cluster.c for-5.11/drivers-2020-12-14 2020-12-16 13:09:32 -08:00
md-cluster.h md-cluster: introduce resync_info_get interface for sanity check 2018-10-18 09:36:35 -07:00
md-faulty.c md: mark some personalities as deprecated 2021-06-14 22:32:07 -07:00
md-linear.c md: add error_handlers for raid0 and linear 2023-09-19 12:22:39 +02:00
md-linear.h md/raid1: Replace zero-length array with flexible-array 2020-05-13 12:02:23 -07:00
md-multipath.c md: mark some personalities as deprecated 2021-06-14 22:32:07 -07:00
md-multipath.h md: convert to bioset_init()/mempool_init() 2018-05-30 15:33:32 -06:00
md.c md: clean up invalid BUG_ON in md_ioctl 2024-09-04 13:23:25 +02:00
md.h md: add error_handlers for raid0 and linear 2023-09-19 12:22:39 +02:00
raid0.c md: raid0: account for split bio in iostat accounting 2023-09-19 12:22:40 +02:00
raid0.h md/raid0: add discard support for the 'original' layout 2023-07-23 13:47:51 +02:00
raid1-10.c md: drop queue limitation for RAID1 and RAID10 2023-05-11 23:00:29 +09:00
raid1.c md/raid1: Fix stack memory use after return in raid1_reshape 2025-07-17 18:30:52 +02:00
raid1.h md/raid1: enable io accounting 2021-06-14 22:32:07 -07:00
raid5-cache.c block: rename BIO_MAX_PAGES to BIO_MAX_VECS 2021-03-11 07:47:48 -07:00
raid5-log.h raid5: set write hint for PPL 2019-03-12 10:15:18 -07:00
raid5-ppl.c block: rename BIO_MAX_PAGES to BIO_MAX_VECS 2021-03-11 07:47:48 -07:00
raid5.c md/raid5: fix atomicity violation in raid5_cache_count 2025-01-23 17:15:52 +01:00
raid5.h md/raid5: let multiple devices of stripe_head share page 2020-09-24 16:44:44 -07:00
raid10.c raid10: cleanup memleak at raid10_make_request 2025-07-17 18:30:52 +02:00
raid10.h md/raid10: enable io accounting 2021-06-14 22:32:07 -07:00