[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211001181226.228340-2-yury.norov@gmail.com>
Date: Fri, 1 Oct 2021 11:12:11 -0700
From: Yury Norov <yury.norov@...il.com>
To: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Yury Norov <yury.norov@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-arch@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-perf-users@...r.kernel.org,
kvm@...r.kernel.org,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Alexander Lobakin <alobakin@...me>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Alexey Klimov <aklimov@...hat.com>,
Andrea Merello <andrea.merello@...il.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Arnd Bergmann <arnd@...db.de>, Ben Gardon <bgardon@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Brian Cain <bcain@...eaurora.org>,
Catalin Marinas <catalin.marinas@....com>,
Christoph Lameter <cl@...ux.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
David Hildenbrand <david@...hat.com>,
Dennis Zhou <dennis@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Heiko Carstens <hca@...ux.ibm.com>,
Ian Rogers <irogers@...gle.com>,
Ingo Molnar <mingo@...hat.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Jakub Kicinski <kuba@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
Joe Perches <joe@...ches.com>, Jonas Bonn <jonas@...thpole.se>,
Leo Yan <leo.yan@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Namhyung Kim <namhyung@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Peter Xu <peterx@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Petr Mladek <pmladek@...e.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Rich Felker <dalias@...c.org>,
Samuel Mendoza-Jonas <sam@...dozajonas.com>,
Sean Christopherson <seanjc@...gle.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Shuah Khan <shuah@...nel.org>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
Steven Rostedt <rostedt@...dmis.org>,
Tejun Heo <tj@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Ulf Hansson <ulf.hansson@...aro.org>,
Will Deacon <will@...nel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
kernel test robot <lkp@...el.com>
Subject: [PATCH 01/16] bitops: protect find_first_{,zero}_bit properly
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 <yury.norov@...il.com>
Fixes: 2cc7b6a44ac2 ("lib: add fast path for find_first_*_bit() and find_last_bit()")
Reported-by: kernel test robot <lkp@...el.com>
Tested-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
include/asm-generic/bitops/find.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h
index 0d132ee2a291..835f959a25f2 100644
--- 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 unsigned long *addr, unsigned long size,
#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 unsigned long *addr, unsigned long size)
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 unsigned long *addr, unsigned long size)
return _find_first_zero_bit(addr, size);
}
+#endif
+
#else /* CONFIG_GENERIC_FIND_FIRST_BIT */
#ifndef find_first_bit
--
2.30.2
Powered by blists - more mailing lists