[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230328095807.7014-5-songmuchun@bytedance.com>
Date: Tue, 28 Mar 2023 17:58:05 +0800
From: Muchun Song <songmuchun@...edance.com>
To: glider@...gle.com, elver@...gle.com, dvyukov@...gle.com,
akpm@...ux-foundation.org, jannh@...gle.com, sjpark@...zon.de,
muchun.song@...ux.dev
Cc: kasan-dev@...glegroups.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Muchun Song <songmuchun@...edance.com>
Subject: [PATCH 4/6] mm: kfence: remove useless check for CONFIG_KFENCE_NUM_OBJECTS
The CONFIG_KFENCE_NUM_OBJECTS is limited by kconfig and vary from 1 to
65535, so CONFIG_KFENCE_NUM_OBJECTS cannot be equabl to or smaller than
0. Removing it to simplify code.
Signed-off-by: Muchun Song <songmuchun@...edance.com>
---
mm/kfence/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/kfence/core.c b/mm/kfence/core.c
index 5726bf2ae13c..41befcb3b069 100644
--- a/mm/kfence/core.c
+++ b/mm/kfence/core.c
@@ -115,7 +115,6 @@ EXPORT_SYMBOL(__kfence_pool); /* Export for test modules. */
* Per-object metadata, with one-to-one mapping of object metadata to
* backing pages (in __kfence_pool).
*/
-static_assert(CONFIG_KFENCE_NUM_OBJECTS > 0);
struct kfence_metadata kfence_metadata[CONFIG_KFENCE_NUM_OBJECTS];
/* Freelist with available objects. */
--
2.11.0
Powered by blists - more mailing lists