Re: [patch V3 07/20] cpumask: Introduce cpumask_weighted_or()
From: Peter Zijlstra
Date: Mon Nov 10 2025 - 11:33:00 EST
On Mon, Nov 03, 2025 at 02:29:59PM +0100, Thomas Gleixner wrote:
> On Mon, Nov 03 2025 at 14:45, Shrikanth Hegde wrote:
> > On 10/29/25 6:39 PM, Thomas Gleixner wrote:
> >> +static __always_inline
> >> +unsigned int cpumask_weighted_or(struct cpumask *dstp, const struct cpumask *src1p,
> >> + const struct cpumask *src2p)
> >> +{
> >> + return bitmap_weighted_or(cpumask_bits(dstp), cpumask_bits(src1p),
> >> + cpumask_bits(src2p), small_cpumask_bits);
> >> +}
> >
> > nit:
> >
> > We have currently cpumask_weight_and & variants.
> > Wouldn't it be better to name it cpumask_weight_or ?
>
> No. cpumask_weight_and() does weight(mask1 & mask2) but this does
The comment was about naming, notable: s/_weighted_or/_weight_or/g to
better match the existing _weight_and().