[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 14/19] xen: make avail_domheap_pages() static
On Wed, 12 Mar 2025, Stefano Stabellini wrote: > On Wed, 12 Mar 2025, Penny Zheng wrote: > > Function avail_domheap_pages() is only invoked by get_outstanding_claims(), > > so it shall be static, no need to extern. > > > > Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx> > > Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> I spoke too soon: this patch breaks the build: common/page_alloc.c: In function ‘get_outstanding_claims’: common/page_alloc.c:587:20: error: implicit declaration of function ‘avail_domheap_pages’; did you mean ‘avail_node_heap_pages’? [-Werror=implicit-function-declaration] 587 | *free_pages = avail_domheap_pages(); | ^~~~~~~~~~~~~~~~~~~ | avail_node_heap_pages common/page_alloc.c:587:20: error: nested extern declaration of ‘avail_domheap_pages’ [-Werror=nested-externs] common/page_alloc.c: At top level: common/page_alloc.c:2798:22: error: conflicting types for ‘avail_domheap_pages’ 2798 | static unsigned long avail_domheap_pages(void) | ^~~~~~~~~~~~~~~~~~~ common/page_alloc.c:587:20: note: previous implicit declaration of ‘avail_domheap_pages’ was here 587 | *free_pages = avail_domheap_pages(); | ^~~~~~~~~~~~~~~~~~~ common/page_alloc.c:2798:22: error: ‘avail_domheap_pages’ defined but not used [-Werror=unused-function] 2798 | static unsigned long avail_domheap_pages(void) | ^~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Rules.mk:249: common/page_alloc.o] Error 1 make[1]: *** [build.mk:72: common] Error 2 make: *** [Makefile:615: xen] Error 2 I think you fixed it in the next patch. Still, it is better not to break bisectability. > > --- > > xen/common/page_alloc.c | 2 +- > > xen/include/xen/mm.h | 1 - > > 2 files changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c > > index 7476d37238..5e710cc9a1 100644 > > --- a/xen/common/page_alloc.c > > +++ b/xen/common/page_alloc.c > > @@ -2796,7 +2796,7 @@ unsigned long avail_domheap_pages_region( > > return avail_heap_pages(zone_lo, zone_hi, node); > > } > > > > -unsigned long avail_domheap_pages(void) > > +static unsigned long avail_domheap_pages(void) > > { > > return avail_heap_pages(MEMZONE_XEN + 1, > > NR_ZONES - 1, > > diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h > > index 86bbb15890..cbb9f2dfdb 100644 > > --- a/xen/include/xen/mm.h > > +++ b/xen/include/xen/mm.h > > @@ -140,7 +140,6 @@ struct page_info *alloc_domheap_pages( > > void free_domheap_pages(struct page_info *pg, unsigned int order); > > unsigned long avail_domheap_pages_region( > > unsigned int node, unsigned int min_width, unsigned int max_width); > > -unsigned long avail_domheap_pages(void); > > unsigned long avail_node_heap_pages(unsigned int nodeid); > > #define alloc_domheap_page(d,f) (alloc_domheap_pages(d,0,f)) > > #define free_domheap_page(p) (free_domheap_pages(p,0)) > > -- > > 2.34.1 > > >
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |