mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf/profile: Remove unused local variable err
@ 2026-08-24  2:42 yang_yongxin123
  2026-08-24 10:01 ` Bradley Morgan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: yang_yongxin123 @ 2026-08-24  2:42 UTC (permalink / raw)
  Cc: linux-kernel, Yongxin Yang

From: Yongxin Yang <yangyongxin@kylinos.cn>

Variable err is declared but never used in this function.
Remove it to avoid compiler warning.

No functional change.

Signed-off-by: Yongxin Yang <yangyongxin@kylinos.cn>
---
 kernel/profile.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/profile.c b/kernel/profile.c
index 1fcf1adcf4eb..6f63e3a8d3fb 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -216,7 +216,6 @@ static const struct proc_ops profile_proc_ops = {
 int __ref create_proc_profile(void)
 {
 	struct proc_dir_entry *entry;
-	int err = 0;
 
 	if (!prof_on)
 		return 0;
@@ -224,7 +223,7 @@ int __ref create_proc_profile(void)
 			    NULL, &profile_proc_ops);
 	if (entry)
 		proc_set_size(entry, (1 + prof_len) * sizeof(atomic_t));
-	return err;
+	return 0;
 }
 subsys_initcall(create_proc_profile);
 #endif /* CONFIG_PROC_FS */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-04  9:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-24  2:42 [PATCH] perf/profile: Remove unused local variable err yang_yongxin123
2026-08-24 10:01 ` Bradley Morgan
2026-11-04  7:14 ` [PATCH v2] " Yongxin Yang
2026-11-04  7:58   ` Andrew Morton
2026-11-04  9:32 ` [PATCH v3] perf/profile: Report failure to create /proc/profile Yongxin Yang

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®