>> elfring@Sonne:~/Projekte/Coccinelle/Probe> spatch 
>> ../janitor/use_call_with_ternary_operator1.cocci ksm-excerpt1.c
>> …
>> +    list_add_tail(&mm_slot->mm_list,
>> +                  (ksm_run & KSM_RUN_UNMERGE) ? &ksm_mm_head.mm_list : 
>> &ksm_scan.mm_slot->mm_list);
>
> And this is unsatisfactory because why?

Such a transformation result could be acceptable if the generated line length
would be tolerated.
But the second function parameter should be reformatted if we would like to care
for the Linux coding style in such an use case finally.


> I don't think ? should be used if it is going to end up over multiple lines.

I got an other software development opinion.


> In any case, I already commented that you proposed code was unreadable.

I am also curious on how the clarification for a patch on a topic like
“NFS: Less function calls in show_pnfs()” will evolve further.
https://lore.kernel.org/patchwork/patch/1096614/#1293018
https://lore.kernel.org/lkml/[email protected]/
https://lkml.org/lkml/2019/7/3/173

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to