[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen: Rework WARN_ON() to return whether a warning was triggered
- To: Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Jürgen Groß <jgross@xxxxxxxx>
- Date: Tue, 15 Dec 2020 12:31:47 +0100
- Cc: bertrand.marquis@xxxxxxx, Rahul.Singh@xxxxxxx, Julien Grall <jgrall@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 15 Dec 2020 11:31:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 15.12.20 12:26, Julien Grall wrote:
From: Julien Grall <jgrall@xxxxxxxxxx>
So far, our implementation of WARN_ON() cannot be used in the following
situation:
if ( WARN_ON() )
...
This is because the WARN_ON() doesn't return whether a warning. Such
... warning has been triggered.
construction can be handy to have if you have to print more information
and now the stack track.
Sorry, I'm not able to parse that sentence.
Rework the WARN_ON() implementation to return whether a warning was
triggered. The idea was borrowed from Linux.
Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Juergen
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: application/pgp-keys
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
|