[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()



> -----Original Message-----
> From: Owen Smith <owen.smith@xxxxxxxxxx>
> Sent: 17 June 2020 15:08
> To: Paul Durrant <paul@xxxxxxx>; win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Paul Durrant <pdurrant@xxxxxxxxxx>
> Subject: RE: [PATCH xenvbd] xencrsh: use ASSERT() in ASSERT3U/3S/3P() rather 
> than BUG_ON()
> 
> Looks good, add my Reviewed-by
> 

Thanks Owen, will do.

  Paul

> 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®.