From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBDD2C433FE for ; Mon, 24 Jan 2022 21:57:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1575099AbiAXVvC (ORCPT ); Mon, 24 Jan 2022 16:51:02 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:52876 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378515AbiAXVn2 (ORCPT ); Mon, 24 Jan 2022 16:43:28 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4E394B81136; Mon, 24 Jan 2022 21:43:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7ECDC340E4; Mon, 24 Jan 2022 21:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060604; bh=RAhbsxxG8YhgiPxl2yWSUjm73nfsyol775fPunTAP7o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LrnqEJJTXaywBKoR/lrwN4feGPfxBOGY3xIf2oQdPqXVFg7K/nfCcA6i0h34cBgaT Wu01sdb9wfQRDkqAa7rC4uVFi+AfuDhpjlwL9iuyxNywAJRoPGmkVQlaXjPoc+s2tm RCuLNDn2jsoV51FWV8oIo8KDd43Txlr5RRiXtqkc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yury Norov , kernel test robot , Wolfram Sang Subject: [PATCH 5.16 0976/1039] bitops: protect find_first_{,zero}_bit properly Date: Mon, 24 Jan 2022 19:46:05 +0100 Message-Id: <20220124184158.097950996@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Yury Norov commit b7ec62d7ee0f0b8af6ba190501dff7f9ee6545ca upstream. find_first_bit() and find_first_zero_bit() are not protected with ifdefs as other functions in find.h. It causes build errors on some platforms if CONFIG_GENERIC_FIND_FIRST_BIT is enabled. Signed-off-by: Yury Norov Fixes: 2cc7b6a44ac2 ("lib: add fast path for find_first_*_bit() and find_last_bit()") Reported-by: kernel test robot Tested-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- include/asm-generic/bitops/find.h | 5 +++++ 1 file changed, 5 insertions(+) --- a/include/asm-generic/bitops/find.h +++ b/include/asm-generic/bitops/find.h @@ -97,6 +97,7 @@ unsigned long find_next_zero_bit(const u #ifdef CONFIG_GENERIC_FIND_FIRST_BIT +#ifndef find_first_bit /** * find_first_bit - find the first set bit in a memory region * @addr: The address to start the search at @@ -116,7 +117,9 @@ unsigned long find_first_bit(const unsig return _find_first_bit(addr, size); } +#endif +#ifndef find_first_zero_bit /** * find_first_zero_bit - find the first cleared bit in a memory region * @addr: The address to start the search at @@ -136,6 +139,8 @@ unsigned long find_first_zero_bit(const return _find_first_zero_bit(addr, size); } +#endif + #else /* CONFIG_GENERIC_FIND_FIRST_BIT */ #ifndef find_first_bit