From patchwork Tue Oct 27 13:52:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 312242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A903C5DF9D for ; Tue, 27 Oct 2020 16:43:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDE1A21D7B for ; Tue, 27 Oct 2020 16:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603817027; bh=Asuh+hb53rwTnbZPcPt99FIkVPQj67qW8hS3Y9QspU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=idZCkfN/FRgnnba59GjWyy6MSi60qqmtbhBw3U4N14hDRW5WYZZi6NqUTUArzKka7 VAVLZk23duVS6P9gtpcg3dWtS7nMFma4+KVMOoLnzOzwrFlkmhx2bQ5xHqLaXYIZxw fryZDNSEnGMqs183wwWxSzgHbQLuMc/di2RpNO7s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1810223AbgJ0Qga (ORCPT ); Tue, 27 Oct 2020 12:36:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:36246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1800070AbgJ0Pn2 (ORCPT ); Tue, 27 Oct 2020 11:43:28 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8614F223C6; Tue, 27 Oct 2020 15:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813408; bh=Asuh+hb53rwTnbZPcPt99FIkVPQj67qW8hS3Y9QspU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jUY+as+mBK5VwYm0cIx7OpIBSm4MVnMHyxILfbiBsJnuUZZbZjs+Z/veWI2DtKvaX nEnFJgXytrFlnqEUZFh1LTUAp0/g8fTwJMt6J/PABu7fusvutMip9wLcqe9KVKAwj5 LmM329UhiO3RB3VfydY66kRhpSi2NpG4gPl1Gtzo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Jordan , Andrew Morton , Krzysztof Kozlowski , Jonathan Corbet , Mauro Carvalho Chehab , Linus Torvalds , Sasha Levin Subject: [PATCH 5.9 510/757] lib/crc32.c: fix trivial typo in preprocessor condition Date: Tue, 27 Oct 2020 14:52:40 +0100 Message-Id: <20201027135514.395769678@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Tobias Jordan [ Upstream commit 904542dc56524f921a6bab0639ff6249c01e775f ] Whether crc32_be needs a lookup table is chosen based on CRC_LE_BITS. Obviously, the _be function should be governed by the _BE_ define. This probably never pops up as it's hard to come up with a configuration where CRC_BE_BITS isn't the same as CRC_LE_BITS and as nobody is using bitwise CRC anyway. Fixes: 46c5801eaf86 ("crc32: bolt on crc32c") Signed-off-by: Tobias Jordan Signed-off-by: Andrew Morton Cc: Krzysztof Kozlowski Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Link: https://lkml.kernel.org/r/20200923182122.GA3338@agrajag.zerfleddert.de Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- lib/crc32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crc32.c b/lib/crc32.c index 35a03d03f9738..2a68dfd3b96c8 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -331,7 +331,7 @@ static inline u32 __pure crc32_be_generic(u32 crc, unsigned char const *p, return crc; } -#if CRC_LE_BITS == 1 +#if CRC_BE_BITS == 1 u32 __pure crc32_be(u32 crc, unsigned char const *p, size_t len) { return crc32_be_generic(crc, p, len, NULL, CRC32_POLY_BE);