On 07/03/16 18:12, Andrew Cooper wrote:
> If an architecture does not provide a custom page_list_entry, default
> page_list_* helpers are provided, wrapping list_head as an underlying type for
> page_list_head.
> 
> The two declarations of the page_list_* helpers differ between defines and
> static inline functions, where the defines discard some of their parameters.
> 
> This causes a compilation failure if CONFIG_BIGMEM and debug=n in p2m-pod.c:
> 
>   p2m-pod.c: In function ‘p2m_pod_cache_add’:
>   p2m-pod.c:72:20: error: unused variable ‘d’ [-Werror=unused-variable]
>        struct domain *d = p2m->domain;
>                       ^
>   cc1: all warnings being treated as errors
> 
> because the use of d outside of the !NDEBUG section doesn't get evaluated as a
> parameter by page_list_del().
> 
> Fix this by turning all #defines into static inline functions, so all
> parameters are evaluated even if they are not used.
> 
> This reveals a build issue on ARM.  page_alloc.c references
> d->arch.relmem_list in the previously-discarded parameter.  Fix this by
> introducing relmem_list for ARM (currently unused).
> 
> While editing this area, correct the return type of page_list_empty from int
> to bool_t.
> 
> Reported-by: Doug Goldstein <car...@cardoe.com>
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> Reviewed-by: Doug Goldstein <car...@cardoe.com>

FWIW this patch is fine with me as it is:

Acked-by: George Dunlap <george.dun...@citrix.com>

But properly fixing the common code not to reference an arch-specific
data structure would be even better, if you've got the time and
motivation to do it.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to