lkml.org 
[lkml]   [2021]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 1/4] x86/resctrl: Use IPI instead of task_work_add() to update PQR_ASSOC MSR
On Thu, Dec 17, 2020 at 02:31:18PM -0800, Reinette Chatre wrote:
> +#ifdef CONFIG_SMP
> +static void update_task_closid_rmid(struct task_struct *t)
> +{
> + if (task_curr(t))
> + smp_call_function_single(task_cpu(t), _update_task_closid_rmid,
> + t, 1);
> }
> +#else
> +static void update_task_closid_rmid(struct task_struct *t)
> +{
> + _update_task_closid_rmid(t);
> +}
> +#endif

Why the ifdeffery? Why not simply:

static void update_task_closid_rmid(struct task_struct *t)
{
if (IS_ENABLED(CONFIG_SMP) && task_curr(t))
smp_call_function_single(task_cpu(t), _update_task_closid_rmid, t, 1);
else
_update_task_closid_rmid(t);
}

?

If no particular reason, I'll change it before committing.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-01-06 12:22    [W:0.447 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site