]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xen/page: fix return type of online_page()
authorPenny Zheng <Penny.Zheng@amd.com>
Fri, 14 Mar 2025 09:16:28 +0000 (10:16 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 14 Mar 2025 09:16:28 +0000 (10:16 +0100)
This commit fixes return type of online_page(), which shall be int
to include correct error value.

Signed-off-by: Penny Zheng <Penny.Zheng@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/page_alloc.c
xen/include/xen/mm.h

index 5f9c9305ef3742ea7a6c8d83b636ad3c498b7acc..bd4538c28d825f70411d6e9c327e1e135ee429a6 100644 (file)
@@ -1763,7 +1763,7 @@ int offline_page(mfn_t mfn, int broken, uint32_t *status)
  *   The caller should make sure end_pfn <= max_page,
  *   if not, expand_pages() should be called prior to online_page().
  */
-unsigned int online_page(mfn_t mfn, uint32_t *status)
+int online_page(mfn_t mfn, uint32_t *status)
 {
     unsigned long x, nx, y;
     struct page_info *pg;
index 16f733281af31dd4f811859c472c3ed47e01a095..ae1c48a6154529ed8704ac69b1ac583530d02f65 100644 (file)
@@ -144,7 +144,7 @@ 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))
-unsigned int online_page(mfn_t mfn, uint32_t *status);
+int online_page(mfn_t mfn, uint32_t *status);
 int offline_page(mfn_t mfn, int broken, uint32_t *status);
 int query_page_offline(mfn_t mfn, uint32_t *status);