Re: x86/resctrl: Use seq_putc() in two functions
From: Markus Elfring
Date: Wed Jul 17 2024 - 02:43:41 EST
>> Single characters should be put into a sequence.
>> Thus use the corresponding function “seq_putc”.
>>
>> This issue was transformed by using the Coccinelle software.
>
> Could you please point me to how you accomplished this?
…
Maybe.
> Is this a new coccinelle script outside of the kernel
I constructed small scripts for the semantic patch language according to
the presented code refactoring a while ago.
> or still on its way upstream?
I am curious if such a transformation approach can eventually be integrated
for the coccicheck tool.
> Could you please highlight the benefit of this change? Looking at seq_puts() implementation, thanks
> to [1], it seems to me these seq_puts() calls will result in seq_putc() anyway?
If the appropriate function call would be directly used, extra optimisation efforts can be avoided
by the compiler.
Regards,
Markus