Re: [PATCH v7 1/5] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration

Jan Beulich <[email protected]>
Newsgroups org.xenproject.lists.xen-devel
Message-ID <[email protected]>
On 24.07.2026 01:59, Hirokazu Takahashi wrote:
>>> +    for ( cpu = 0; cpu < nr_cpu_ids; cpu++ )
>>> +    {
>>> +        if ( !zalloc_cpumask_var(&cpu_topology[cpu].thread_sibling)
>>> +             || !zalloc_cpumask_var(&cpu_topology[cpu].core_sibling)
>>> +             || !zalloc_cpumask_var(&cpu_topology[cpu].cluster_sibling) )
>>
>> In v6 the || here were correctly placed. Why did they move?
> 
> I saw other code using leading || and tried to match that, but I'll revert it back.

Just to clarify: Looking at surrounding code and matching style is perfectly
valid. We generally (there are exceptions, e.g. when we try to slowly
transition style of a file) aim at having consistent style within a file.
However, our own style is still preferred, and mandated when new files are
added which aren't taken from elsewhere. Hence ./CODING_STYLE is still your
primary reference. And from other style aspects of the tiny snippet above
it is already clear that it is written in Xen style. Hence ./CODING_STYLE
is it for the case here, plus (sadly) any unwritten rules (like,
unfortunately, that of placing operators in line-wrapped expressions).

Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.