[PATCH v3 10/10] kcov: use enum kcov_mode in kcov_mode_enabled()
From: Alexander Potapenko
Date: Mon Jul 28 2025 - 11:28:38 EST
Replace the remaining declarations of `unsigned int mode` with
`enum kcov_mode mode`. No functional change.
Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx>
---
Change-Id: I739b293c1f689cc99ef4adbe38bdac5813802efe
---
kernel/kcov.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/kcov.c b/kernel/kcov.c
index 82ed4c6150c54..6b7c21280fcd5 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -949,7 +949,7 @@ static const struct file_operations kcov_fops = {
* collecting coverage and copies all collected coverage into the kcov area.
*/
-static inline bool kcov_mode_enabled(unsigned int mode)
+static inline bool kcov_mode_enabled(enum kcov_mode mode)
{
return (mode & ~KCOV_IN_CTXSW) != KCOV_MODE_DISABLED;
}
@@ -957,7 +957,7 @@ static inline bool kcov_mode_enabled(unsigned int mode)
static void kcov_remote_softirq_start(struct task_struct *t)
{
struct kcov_percpu_data *data = this_cpu_ptr(&kcov_percpu_data);
- unsigned int mode;
+ enum kcov_mode mode;
mode = READ_ONCE(t->kcov_mode);
barrier();
@@ -1134,7 +1134,7 @@ void kcov_remote_stop(void)
{
struct task_struct *t = current;
struct kcov *kcov;
- unsigned int mode;
+ enum kcov_mode mode;
void *area;
unsigned int size;
int sequence;
--
2.50.1.470.g6ba607880d-goog