From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F1BF6FA1 for ; Mon, 3 Apr 2023 14:44:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BFB2C433D2; Mon, 3 Apr 2023 14:44:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680533098; bh=vuW0vUuDsrbF6EdZBmyISlMkpcKD10t+InuXT0eDUMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HWsjHtjzPp2si+3l1kmEFy+DgEJobwJl+LUG74SlJ7pUG4d4xbkemt14n6rIecDyD QgLLDbB5xTnzEDFYG672hlFYGxxeQuUkOTPlio8R2BS8hFeTz01xwB34b8W+Epi+rC ivZ/MtvST6e8JEQMelFgfi1G5LMNzsG+3ASIUr5g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Nick Terrell , Sasha Levin Subject: [PATCH 6.2 023/187] zstd: Fix definition of assert() Date: Mon, 3 Apr 2023 16:07:48 +0200 Message-Id: <20230403140416.787278477@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230403140416.015323160@linuxfoundation.org> References: <20230403140416.015323160@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Jonathan Neuschäfer [ Upstream commit 6906598f1ce93761716d780b6e3f171e13f0f4ce ] assert(x) should emit a warning if x is false. WARN_ON(x) emits a warning if x is true. Thus, assert(x) should be defined as WARN_ON(!x) rather than WARN_ON(x). Signed-off-by: Jonathan Neuschäfer Signed-off-by: Nick Terrell Signed-off-by: Sasha Levin --- lib/zstd/common/zstd_deps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zstd/common/zstd_deps.h b/lib/zstd/common/zstd_deps.h index 7a5bf44839c9c..f06df065dec01 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 -#define assert(x) WARN_ON((x)) +#define assert(x) WARN_ON(!(x)) #endif /* ZSTD_DEPS_ASSERT */ #endif /* ZSTD_DEPS_NEED_ASSERT */ -- 2.39.2