mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Potapenko <glider@google.com>
To: glider@google.com
Cc: quic_jiangenj@quicinc.com, linux-kernel@vger.kernel.org,
	 kasan-dev@googlegroups.com, Aleksandr Nogikh <nogikh@google.com>,
	 Andrey Konovalov <andreyknvl@gmail.com>,
	Borislav Petkov <bp@alien8.de>,
	 Dave Hansen <dave.hansen@linux.intel.com>,
	Dmitry Vyukov <dvyukov@google.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 v3 10/10] kcov: use enum kcov_mode in kcov_mode_enabled()
Date: Mon, 28 Jul 2025 17:25:48 +0200	[thread overview]
Message-ID: <20250728152548.3969143-11-glider@google.com> (raw)
In-Reply-To: <20250728152548.3969143-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>
---
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


  parent reply	other threads:[~2025-07-28 15:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 15:25 [PATCH v3 00/10] Coverage deduplication for KCOV Alexander Potapenko
2025-07-28 15:25 ` [PATCH v3 01/10] x86: kcov: disable instrumentation of arch/x86/kernel/tsc.c Alexander Potapenko
2025-07-28 15:25 ` [PATCH v3 02/10] kcov: elaborate on using the shared buffer Alexander Potapenko
2025-07-28 15:25 ` [PATCH v3 03/10] kcov: factor out struct kcov_state Alexander Potapenko
2025-07-29 11:09   ` Dmitry Vyukov
2025-07-28 15:25 ` [PATCH v3 04/10] mm/kasan: define __asan_before_dynamic_init, __asan_after_dynamic_init Alexander Potapenko
2025-07-29 11:43   ` kernel test robot
2025-07-31 11:44     ` Alexander Potapenko
2025-07-28 15:25 ` [PATCH v3 05/10] kcov: x86: introduce CONFIG_KCOV_UNIQUE Alexander Potapenko
2025-07-29 11:11   ` Dmitry Vyukov
2025-07-28 15:25 ` [PATCH v3 06/10] kcov: add trace and trace_size to struct kcov_state Alexander Potapenko
2025-07-29 11:11   ` Dmitry Vyukov
2025-07-28 15:25 ` [PATCH v3 07/10] kcov: add ioctl(KCOV_UNIQUE_ENABLE) Alexander Potapenko
2025-07-29 11:14   ` Dmitry Vyukov
2025-07-28 15:25 ` [PATCH v3 08/10] kcov: add ioctl(KCOV_RESET_TRACE) Alexander Potapenko
2025-07-29 11:17   ` Dmitry Vyukov
2025-08-06  9:47     ` Alexander Potapenko
2025-08-06  9:59       ` Dmitry Vyukov
2025-07-28 15:25 ` [PATCH v3 09/10] kcov: selftests: add kcov_test Alexander Potapenko
2025-07-29 11:20   ` Dmitry Vyukov
2025-07-31  8:02     ` Alexander Potapenko
2025-07-28 15:25 ` Alexander Potapenko [this message]
2025-07-29 11:20   ` [PATCH v3 10/10] kcov: use enum kcov_mode in kcov_mode_enabled() Dmitry Vyukov

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=20250728152548.3969143-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®