Re: [PATCH] perf/profile: Remove unused local variable err

From: Bradley Morgan

Date: Mon Aug 24 2026 - 06:01:42 EST


On 24 August 2026 03:42:51 BST, yang_yongxin123@xxxxxxx wrote:
>From: Yongxin Yang <yangyongxin@xxxxxxxxxx>
>
>Variable err is declared but never used in this function.
>Remove it to avoid compiler warning.
>
>No functional change.
>

Obviously correct

Reviewed-by: Bradley Morgan <include@xxxxxxxxx>



>Signed-off-by: Yongxin Yang <yangyongxin@xxxxxxxxxx>
>---
> 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 */
>

Thanks!