[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH xenvbd] xencrsh: use ASSERT() in ASSERT3U/3S/3P() rather than BUG_ON()


  • To: Paul Durrant <paul@xxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Wed, 17 Jun 2020 14:08:08 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Paul Durrant <pdurrant@xxxxxxxxxx>
  • Delivery-date: Wed, 17 Jun 2020 14:08:18 +0000
  • Ironport-sdr: oWBzXsur4UYB2E9cbKCPTbIbZ/n2EIeb6k9TlpxGUOM5RoRcFdNXYbikWYJPJppA9pDfaa2EHE GdQpzYkiacRXoFgOirc6pxpu0MeW8RTcvIL6WqJvgwSANXnYDvlqmUw5OPZeovthC6nJKI4Met hUo3H1vjujk295U4Hm4j0y4dvcVTcMxFJ7/JYQkP3PeelQTEiIwFG5I7RFGd23mA8XpN0cIgxn L49ISe5ijJLlooICJbakxAlEkhoswL1VgCpqe3xBlM+kVnZTcwLBPpMghW4+xBJo5cRlGSRCRA 0Ck=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHWRH/f/Ws1QcucOkiNriy+8MtSHajc19jw
  • Thread-topic: [PATCH xenvbd] xencrsh: use ASSERT() in ASSERT3U/3S/3P() rather than BUG_ON()

Looks good, add my Reviewed-by

Owen

> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of Paul Durrant
> Sent: 17 June 2020 09:18
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Paul Durrant <pdurrant@xxxxxxxxxx>
> Subject: [PATCH xenvbd] xencrsh: use ASSERT() in ASSERT3U/3S/3P() rather
> than BUG_ON()
> 
> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
> unless you have verified the sender and know the content is safe.
> 
> From: Paul Durrant <pdurrant@xxxxxxxxxx>
> 
> ASSERT() then resolves to BUG_ON() followed by __analysis_assume(), which
> avoids some spurious warnings during code analysis.
> 
> Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
> ---
>  src/xencrsh/assert.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/xencrsh/assert.h b/src/xencrsh/assert.h index
> 546be5b..c746c89 100644
> --- a/src/xencrsh/assert.h
> +++ b/src/xencrsh/assert.h
> @@ -87,7 +87,7 @@ __BugCheck(
>              if (!(_Lval _OP _Rval)) {               \
>                  LogError("%s = %llu\n", #_X, _Lval);\
>                  LogError("%s = %llu\n", #_Y, _Rval);\
> -                BUG_ON(_X _OP _Y);                  \
> +                ASSERT((_X) _OP (_Y));              \
>              }                                       \
>          } while (FALSE)
> 
> @@ -98,7 +98,7 @@ __BugCheck(
>              if (!(_Lval _OP _Rval)) {               \
>                  LogError("%s = %lld\n", #_X, _Lval);\
>                  LogError("%s = %lld\n", #_Y, _Rval);\
> -                BUG_ON(_X _OP _Y);                  \
> +                ASSERT((_X) _OP (_Y));              \
>              }                                       \
>          } while (FALSE)
> 
> @@ -109,7 +109,7 @@ __BugCheck(
>              if (!(_Lval _OP _Rval)) {               \
>                  LogError("%s = %p\n", #_X, _Lval);  \
>                  LogError("%s = %p\n", #_Y, _Rval);  \
> -                BUG_ON(_X _OP _Y);                  \
> +                ASSERT((_X) _OP (_Y));              \
>              }                                       \
>          } while (FALSE)
> 
> --
> 2.17.1
> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.