[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>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Thu, 17 Dec 2020 17:58:47 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iiHxLp0JFQ0tSsAhUhQWsLavame0QxLqrK1DWj0v9vA=; b=V8cVuoYp9pqLpF/toRjyGfwGIqdkZFL3LqyLTelYVDenZh+pkpftiRVazXbK5mEgvw4AAx7O15Z8eX+VSDCgXvjsXtEhRZHnRekbzieVjNEMbXAsys27+UFs3a+KiYSZAN52Djpa8W8B78RNhjRMbbOEhkqVR/P3Ps5KzWkphdfUqQRj5Y56twRobmJGDZz/dJyYqDU64U380VGg8nNfloW2jcOnta3QF6Al9M8KC47QPcVwnAaIInFHThOojT31W7ABKr5blwNPdCWTLbXbB9wHDZV6xrlI5SvwA74+GQAUFKyXLOm9qTtRXncIkZ/PyjCvqMBkMubq36PZlzJ2HA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VWDnuhuroEyCb0BkXRrc7mPTrmNYFVYUR6nTejRamcimmFRPD+d6dXnVPDUq4SdWyH84iymYHl5VVZpnKJIJqypPeCmOXBbt96EI1GUeaasKeRM6q/bM1f9ST0OINJOh1V08D4NUQKPdHM0fdo7V7W18ABxS5bnupdKikjIhkO9w4gBik/ZHP0TOKrWWINrGABjp1XS+QsidwdZ4mj2P7SYckeT2VbIZRPw9sB3YmO0acUpzX1/TzU8ch1BxJP6MFw9rfipAjLSuidEddtFu+XpGYC7+J5FfN+TToSAtWebe9WCLURgob2kVq1QCK0aygMYwZLuvCPcXGawVJ4o9QQ==
- Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
- Cc: Jürgen Groß <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Rahul Singh <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: Thu, 17 Dec 2020 17:59:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
- Thread-index: AQHW0tUr2p4F3png40a2lvBeLGQljqn4BhSAgAAb6ACAA3ThAA==
- Thread-topic: [PATCH] xen: Rework WARN_ON() to return whether a warning was triggered
Hi Julien,
> On 15 Dec 2020, at 13:11, Julien Grall <julien@xxxxxxx> wrote:
>
> Hi Juergen,
>
> On 15/12/2020 11:31, Jürgen Groß wrote:
>> 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.
>
> I will add it.
>
>>> 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.
>
> Urgh :/. How about the following commit message:
>
> "So far, our implementation of WARN_ON() cannot be used in the following
> situation:
>
> if ( WARN_ON() )
> ...
>
> This is because WARN_ON() doesn't return whether a warning has been
> triggered. Such construciton can be handy if you want to print more
> information and also dump the stack trace.
>
> Therefore, rework the WARN_ON() implementation to return whether a warning
> was triggered. The idea was borrowed from Linux".
With that.
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
And thanks a lot for this :-)
Cheers
Bertrand
>
> Cheers,
>
> --
> Julien Grall
|