mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] zstd: fix assert() logic
Date: Wed, 28 Sep 2022 11:11:41 +0200	[thread overview]
Message-ID: <20220928091141.GV986@pengutronix.de> (raw)
In-Reply-To: <20220927172217.662321-1-enrico.scholz@sigma-chemnitz.de>

On Tue, Sep 27, 2022 at 07:22:17PM +0200, Enrico Scholz wrote:
> It should warn when condition does **not** hold
> 
> Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
> ---
>  lib/zstd/common/zstd_deps.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

That fixes only the warnings, not the regression, right?

Sascha

> 
> diff --git a/lib/zstd/common/zstd_deps.h b/lib/zstd/common/zstd_deps.h
> index 7a5bf44839c9..f06df065dec0 100644
> --- a/lib/zstd/common/zstd_deps.h
> +++ b/lib/zstd/common/zstd_deps.h
> @@ -84,7 +84,7 @@ static uint64_t ZSTD_div64(uint64_t dividend, uint32_t divisor) {
>  
>  #include <linux/kernel.h>
>  
> -#define assert(x) WARN_ON((x))
> +#define assert(x) WARN_ON(!(x))
>  
>  #endif /* ZSTD_DEPS_ASSERT */
>  #endif /* ZSTD_DEPS_NEED_ASSERT */
> -- 
> 2.37.3
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2022-09-28  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27 17:22 Enrico Scholz
2022-09-28  9:11 ` Sascha Hauer [this message]
2022-09-28  9:29   ` Enrico Scholz

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=20220928091141.GV986@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=enrico.scholz@sigma-chemnitz.de \
    /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