Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3667487pxb; Mon, 24 Jan 2022 14:53:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzdLZVfqjnlQlJuzg6+2wKuAMReTjm98nxNUIAc7bHa7dYpsJWdWB5eEJvDBq3hxKKeTtjW X-Received: by 2002:a17:90b:714:: with SMTP id s20mr520527pjz.31.1643064838782; Mon, 24 Jan 2022 14:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643064838; cv=none; d=google.com; s=arc-20160816; b=nh9DPrBVCVUa97dbzbM8+HuWj0KvRaA49hcq/LMvU7nea5QnqlfqbIdexBMccx1H7v wMzUIFNlu67FW9VKrMS3wPcTOYGQpU+JO4KBaAlynm+cA1es/ZTyz+BMxsvVT5KtCjKp Yy0iWMZsxiU/SNqN093nYAG6I2Fu9wkrNopqdxbN3bBtJnzOFUvT7hVj2OTk4vIBONvA D5td//jEN4wC57XZdDac2qebxQvXy/Y0AVd5VgvjUfE3CKVOT86Fjs3/FYN/LWXnrwKE DQpji2CWudcYrZSAg0JZRYJ3irhsl73bo8ZfPO3B4L+Ais0rVYfGHcHxnhsPP/rpt/XM YZOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wOWwHToiA1kJPYhYNQ8rXS0IOlfJN09TnvCCWsIj3Rw=; b=eMLnG8FuPQj3qnhm4bkM6XI9bqwspqNwyIjvSo0AeszUyDsF3pYDk6sXQYim7Bk0mL ie6mwPzM7y3pklDhAq8aWC+uG5w4bR39AoZ+/UEVS21kPYkp2AU+hUxKWh43UvaXC1QC wsaruR5DLiGxCx7dxPxqWa/AXOrT346x2rTfX3z7/lUlQo54/N3bIomav8l/NoEvXxzT dy4nTK6hTxabYXfSUkE5DcODnOmNwsG1TGuhSlKgC+8KjBnsKPPYfvXLkIskn44eafny hWAbTxESIMyBEvcYlcTCKDOGEp0XTMiHKnBHNECXul69lDEKyFyBQNlnQ4HZIod/k+jC Qhlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LrnqEJJT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q79si4530202pfc.127.2022.01.24.14.53.47; Mon, 24 Jan 2022 14:53:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LrnqEJJT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1839011AbiAXWtj (ORCPT + 99 others); Mon, 24 Jan 2022 17:49:39 -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: linux-kernel@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