Re: [PATCH v4 04/16] ref-filter: add `ref_filter_clear()`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 03, 2023 at 01:13:42PM -0400, Taylor Blau wrote:

> On Mon, Jul 03, 2023 at 01:19:46AM -0400, Jeff King wrote:
> > > +void ref_filter_init(struct ref_filter *filter)
> > > +{
> > > +	struct ref_filter blank = REF_FILTER_INIT;
> > > +	memcpy(filter, &blank, sizeof(blank));
> > > +}
> >
> > I was a little surprised by adding init() here, but we need it at the
> > end of clear(). So this is an OK place for it (the other option would be
> > in the earlier INIT patch, but it would be unused until now).
> 
> I used to write more patches in this style where I would add as much of
> a new API as possible as early as possible in the series. But I think
> reviewers seem to have an easier time reviewing API additions in the
> same patch that adds their caller.
> 
> So I tend to agree that this patch is probably a good spot to introduce
> `ref_filter_init()`. But if you feel strongly, I'm happy to drag it
> around.

Nope, I don't feel strongly at all. Let's leave it as you have it.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux