[PATCH *-next 01/18] mm/mmu_gather: Remove needless return in void API tlb_remove_page()

David Howells dhowells at redhat.com
Tue Feb 25 07:16:36 PST 2025


Zijun Hu <zijun_hu at icloud.com> wrote:

> >>  static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page)
> >>  {
> >> -	return tlb_remove_page_size(tlb, page, PAGE_SIZE);
> >> +	tlb_remove_page_size(tlb, page, PAGE_SIZE);
> >>  }
> > So I don't mind removing it, but note that that return enforces
> > tlb_remove_page_size() has void return type.
> >
> 
> tlb_remove_page_size() is void function already. (^^)

That may be true... for now.  But if that is changed in the future, then you
will get an error indicating something you need to go and look at... so in
that regard, it's *better* to do this ;-)

David




More information about the linux-mtd mailing list