]> git.baikalelectronics.ru Git - kernel.git/commit
bitfield: add explicit inclusions to the example
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 23 Mar 2022 23:05:47 +0000 (16:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2022 02:00:33 +0000 (19:00 -0700)
commit81b86d4aeddfcc0949d17ae24b58c39708275eb4
tree4053d164b28e3260930cf6270e5cd9f02a73978d
parent3b64c66a9d32d74c461b9b6bf842654c6c9a6cbd
bitfield: add explicit inclusions to the example

It's not obvious that bitfield.h doesn't guarantee the bits.h inclusion
and the example in the former is confusing.  Some developers think that
it's okay to just include bitfield.h to get it working.  Change example
to explicitly include necessary headers in order to avoid confusion.

Link: https://lkml.kernel.org/r/20220207123341.47533-1-andriy.shevchenko@linux.intel.com
Fixes: 5cad778bd7c6 ("add basic register-field manipulation macros")
Depends-on: 38818cdd76f8 ("locking/atomics, asm-generic: Move some macros from <linux/bitops.h> to a new <linux/bits.h> file")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reported-by: Jan Dąbroś <jsd@semihalf.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/bitfield.h