Re: [PATCH v4 04/28] range: Add range_overlaps()

From: Ira Weiny
Date: Sun Oct 13 2024 - 20:13:19 EST


Andy Shevchenko wrote:
> On Wed, Oct 09, 2024 at 05:45:10PM +0300, Andy Shevchenko wrote:
> > On Tue, Oct 08, 2024 at 06:10:32PM +0200, David Sterba wrote:
> > > On Mon, Oct 07, 2024 at 06:16:10PM -0500, Ira Weiny wrote:
>
> ...
>
> > > > +static inline bool range_overlaps(struct range *r1, struct range *r2)
> > >
> > > I've noticed only now, you can constify the arguments, but this applise
> > > to other range_* functions so that can be done later in one go.
> >
> > Frankly you may add the same to each new API being added to the file and
> > the "one go" will never happen. So, I support your first part with
> > constifying, but I think it would be rather done now to start that "one
> > go" to happen.
>
> Alternatively there is should be the patch _in this series_ to make it
> happen before extending an API. I leave the choice to Ira.

I'm not sure I follow what you are saying here but I think you are saying to
make those calls const prior to adding new ones.

I agree see:

https://lore.kernel.org/all/20241010-const-range-v1-1-afb6e4bfd8ce@xxxxxxxxx/

Hopefully this is what you meant and closes this issue.
Ira