From: Julien Grall <julien.grall@arm.com>
To: "Goel, Sameer" <sgoel@codeaurora.org>, xen-devel@lists.xenproject.org
Cc: Tomasz Nowicki <tn@semihalf.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Shanker Donthineni <shankerd@codeaurora.org>,
Punit Agrawal <punit.agrawal@arm.com>
Subject: Re: [RFC 6/6] acpi:arm64: Add support for parsing IORT table
Date: Thu, 21 Sep 2017 11:54:43 +0100 [thread overview]
Message-ID: <acd9f5fc-3a3d-66d6-74c8-00dd1e4ce9a3@arm.com> (raw)
In-Reply-To: <7ef95de0-f069-3bcc-8ca0-ea568348ab68@codeaurora.org>
Hi Sameer,
On 21/09/17 01:37, Goel, Sameer wrote:
>>>>
>>>> [...]
>>>>
>>>>> diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
>>>>> index 995a85a..3785fae 100644
>>>>> --- a/xen/include/xen/lib.h
>>>>> +++ b/xen/include/xen/lib.h
>>>>> @@ -9,7 +9,12 @@
>>>>> #include <asm/bug.h>
>>>>>
>>>>> #define BUG_ON(p) do { if (unlikely(p)) BUG(); } while (0)
>>>>> -#define WARN_ON(p) do { if (unlikely(p)) WARN(); } while (0)
>>>>> +#define WARN_ON(p) ({ \
>>>>> + int __ret_warn_on = !!(p); \
>>>>> + if (unlikely(__ret_warn_on)) \
>>>>> + WARN(); \
>>>>> + unlikely(__ret_warn_on); \
>>>>> +})
>>>>
>>>> hmmmm. Why this change?
>>> Was getting a compilation error when I was using WARN_ON as a conditional
>>> in an if statement regarding the return value. So removed the loop. This
>>> looks similar to Linux now.
>>
>> This should belong to a separate patch with a commit message explaining why the change.
>
> Agreed. Since this is more of a Linux compat function, I do not want to change the system-wide behavior. I will move this in the IORT code.
I don't see any reason to keep this implementation only for IORT. It
would be possible to have similar construction in Xen.
So I would first try to see if maintainers would be willing to accept a
system-wide change before thinking to re-implement WARN_ON in IORT.
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-09-21 10:54 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 19:30 [RFC 0/6] IORT support and introduce fwspec Sameer Goel
2017-06-08 19:30 ` [RFC 1/6] passthrough/arm: Modify SMMU driver to use generic device definition Sameer Goel
2017-06-12 12:34 ` Julien Grall
2017-06-08 19:30 ` [RFC 2/6] arm64: Add definitions for fwnode_handle Sameer Goel
2017-06-08 19:47 ` Julien Grall
2017-06-08 19:59 ` Julien Grall
2017-06-08 21:42 ` Goel, Sameer
2017-06-08 21:57 ` Stefano Stabellini
2017-06-12 12:40 ` Julien Grall
2017-08-28 21:42 ` Goel, Sameer
2017-06-12 12:51 ` Julien Grall
2017-08-28 21:41 ` Goel, Sameer
2017-06-08 19:30 ` [RFC 3/6] Introduce _xrealloc Sameer Goel
2017-06-08 19:49 ` Julien Grall
2017-06-09 9:44 ` Wei Liu
2017-08-28 21:39 ` Goel, Sameer
2017-10-12 13:33 ` Julien Grall
2017-10-12 14:45 ` Wei Liu
2017-06-08 21:51 ` Stefano Stabellini
2017-06-08 19:30 ` [RFC 4/6] xen/passthrough/arm: Introduce iommu_fwspec Sameer Goel
2017-06-08 20:02 ` Julien Grall
2017-06-08 19:30 ` [RFC 5/6] ACPI: arm: Support for IORT Sameer Goel
2017-07-14 15:36 ` Jan Beulich
2017-06-08 19:30 ` [RFC 6/6] acpi:arm64: Add support for parsing IORT table Sameer Goel
2017-06-08 22:22 ` Stefano Stabellini
2017-06-09 11:15 ` Robin Murphy
2017-06-12 13:36 ` Julien Grall
2017-06-12 13:44 ` Jan Beulich
2017-06-21 16:55 ` Robin Murphy
2017-08-28 21:48 ` Goel, Sameer
2017-06-12 13:24 ` Julien Grall
2017-08-28 22:21 ` Goel, Sameer
2017-09-12 11:25 ` Julien Grall
2017-09-21 0:37 ` Goel, Sameer
2017-09-21 10:54 ` Julien Grall [this message]
2017-07-14 15:41 ` Jan Beulich
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=acd9f5fc-3a3d-66d6-74c8-00dd1e4ce9a3@arm.com \
--to=julien.grall@arm.com \
--cc=punit.agrawal@arm.com \
--cc=robin.murphy@arm.com \
--cc=sgoel@codeaurora.org \
--cc=shankerd@codeaurora.org \
--cc=sstabellini@kernel.org \
--cc=tn@semihalf.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).