From: Doug Goldstein <cardoe@cardoe.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] xen/mm: Fix page_list_* helpers to evaluate all their arguments
Date: Sat, 5 Mar 2016 17:42:54 -0600 [thread overview]
Message-ID: <56DB6EFE.1090801@cardoe.com> (raw)
In-Reply-To: <1457196754-6299-1-git-send-email-andrew.cooper3@citrix.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1817 bytes --]
On 3/5/16 10:52 AM, 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.
>
> Doing this reveals that const-correctness of page_list_{next,prev}() is
> suspect, taking a const pointer and returning a non-const one. It is left
> functioning as it did before, with an explicit typecast to remove constness.
>
> While editing this area, correct the return type of page_list_empty from int
> to bool_t.
>
> Reported-by: Doug Goldstein <cardoe@cardoe.com>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
I had planned on doing something similar but your commit message is much
better than what I would have come up with.
Not sure if people would like Identified-by: Travis CI but it actually
required a patch to be found.
http://lists.xen.org/archives/html/xen-devel/2016-03/msg00735.html which
is waiting to be merged.
--
Doug Goldstein
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-05 23:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-05 16:52 [PATCH] xen/mm: Fix page_list_* helpers to evaluate all their arguments Andrew Cooper
2016-03-05 23:42 ` Doug Goldstein [this message]
2016-03-07 13:15 ` Jan Beulich
2016-03-07 15:01 ` [PATCH v2] " Andrew Cooper
2016-03-07 16:53 ` Jan Beulich
2016-03-07 18:12 ` [PATCH v3] " Andrew Cooper
2016-03-08 9:57 ` Jan Beulich
2016-03-08 11:05 ` Andrew Cooper
2016-03-08 11:25 ` Jan Beulich
2016-03-09 12:12 ` George Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DB6EFE.1090801@cardoe.com \
--to=cardoe@cardoe.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.