aboutsummaryrefslogtreecommitdiff
path: root/include/linux/range.h
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2023-08-04 09:46:36 +0300
committerAndrew Morton <[email protected]>2023-08-18 10:19:00 -0700
commit3c9d017cc283df0dabf6b16a6cb4574426cbd53b (patch)
tree6b18eeb78b67fe707b94651a36a6dd2e061b5829 /include/linux/range.h
parentbe33db21427c33a4217bd6b805944d2cf84faf25 (diff)
range.h: Move resource API and constant to respective files
range.h works with struct range data type. The resource_size_t is an alien here. (1) Move cap_resource() implementation into its only user, and (2) rename and move RESOURCE_SIZE_MAX to limits.h. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Cc: Alexander Sverdlin <[email protected]> Cc: Borislav Petkov (AMD) <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Rasmus Villemoes <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux/range.h')
-rw-r--r--include/linux/range.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/range.h b/include/linux/range.h
index 7efb6a9b069b..6ad0b73cb7ad 100644
--- a/include/linux/range.h
+++ b/include/linux/range.h
@@ -31,12 +31,4 @@ int clean_sort_range(struct range *range, int az);
void sort_range(struct range *range, int nr_range);
-#define MAX_RESOURCE ((resource_size_t)~0)
-static inline resource_size_t cap_resource(u64 val)
-{
- if (val > MAX_RESOURCE)
- return MAX_RESOURCE;
-
- return val;
-}
#endif