Re: [PATCH v3 1/3] rust: add a wrapper for the `num_possible_cpus` C function
From: Andreas Hindborg
Date: Tue Oct 13 2026 - 03:26:10 EST
"Yury Norov" <ynorov@xxxxxxxxxx> writes:
> On Fri, Oct 02, 2026 at 11:07:00AM +0200, Miguel Ojeda wrote:
>> On Fri, Oct 2, 2026 at 10:33 AM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>> >
>> > I don't think we need to split the helper C files by the headers they
>> > are defined in. We can include multiple headers in a C file that
>> > logically lumps things together. If you are worried about finding things
>> > becoming difficult because they are not in the file one expect, I do not
>> > share the concern. I usually just grep in the directory through my
>> > editor.
>>
>> Of course, it doesn't need to be a strict split. But, where possible,
>> I think it is better to match the C side for the helpers, because they
>> are thin wrappers that need to be updated and maintained at the same
>> time as the C side.
>
> Yes, that's correct. This should mirror the kernel file structure
> unless there's a strong reason to change that.
>
> Andreas, can you put this into rust/helpers/cpumask.c, and please have
> the __rust helper thing on a separate line for better greppability.
>
> This patch creates a new file without a maintenance entry, which is a
> no-go anyways, so we need v4.
Ok, thanks.
@Miguel, feel free to make these changes as you apply. Otherwise I'll
send v4 next cycle.
Best regards,
Andreas Hindborg