Thread (52 messages) 52 messages, 8 authors, 2024-04-02

Re: [PATCH net-next v5 05/21] bitops: make BYTES_TO_BITS() treewide-available

From: Yury Norov <yury.norov@gmail.com>
Date: 2024-02-28 16:20:51
Also in: intel-wired-lan, linux-btrfs, linux-s390, lkml, ntfs3

On Thu, Feb 01, 2024 at 01:22:00PM +0100, Alexander Lobakin wrote:
Avoid open-coding that simple expression each time by moving
BYTES_TO_BITS() from the probes code to <linux/bitops.h> to export
it to the rest of the kernel.
Simplify the macro while at it. `BITS_PER_LONG / sizeof(long)` always
equals to %BITS_PER_BYTE, regardless of the target architecture.
Do the same for the tools ecosystem as well (incl. its version of
bitops.h). The previous implementation had its implicit type of long,
while the new one is int, so adjust the format literal accordingly in
the perf code.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Acked-by: Yury Norov <yury.norov@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help