From: Alexander Potapenko <glider@google.com>
To: glider@google.com
Cc: quic_jiangenj@quicinc.com, linux-kernel@vger.kernel.org,
kasan-dev@googlegroups.com, Dmitry Vyukov <dvyukov@google.com>,
Aleksandr Nogikh <nogikh@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Marco Elver <elver@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH v4 10/10] kcov: use enum kcov_mode in kcov_mode_enabled()
Date: Thu, 31 Jul 2025 13:51:39 +0200 [thread overview]
Message-ID: <20250731115139.3035888-11-glider@google.com> (raw)
In-Reply-To: <20250731115139.3035888-1-glider@google.com>
Replace the remaining declarations of `unsigned int mode` with
`enum kcov_mode mode`. No functional change.
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
---
v4:
- Add Reviewed-by: Dmitry Vyukov
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.552.g942d659e1b-goog
prev parent reply other threads:[~2025-07-31 11:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 11:51 [PATCH v4 00/10] Coverage deduplication for KCOV Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 01/10] x86: kcov: disable instrumentation of arch/x86/kernel/tsc.c Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 02/10] kcov: elaborate on using the shared buffer Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 03/10] kcov: factor out struct kcov_state Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 04/10] mm/kasan: define __asan_before_dynamic_init, __asan_after_dynamic_init Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 05/10] kcov: x86: introduce CONFIG_KCOV_UNIQUE Alexander Potapenko
2025-08-26 8:14 ` Joey Jiao
2025-07-31 11:51 ` [PATCH v4 06/10] kcov: add trace and trace_size to struct kcov_state Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 07/10] kcov: add ioctl(KCOV_UNIQUE_ENABLE) Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 08/10] kcov: add ioctl(KCOV_RESET_TRACE) Alexander Potapenko
2025-07-31 11:51 ` [PATCH v4 09/10] kcov: selftests: add kcov_test Alexander Potapenko
2025-08-01 4:10 ` Dmitry Vyukov
2025-07-31 11:51 ` Alexander Potapenko [this message]
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=20250731115139.3035888-11-glider@google.com \
--to=glider@google.com \
--cc=andreyknvl@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=jpoimboe@kernel.org \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nogikh@google.com \
--cc=peterz@infradead.org \
--cc=quic_jiangenj@quicinc.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®