log2: make is_power_of_2() more generic
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | log2: add helper __IS_POWER_OF_2()include/ | +3 | 0 replies | |
| 2/4 | log2: have is_power_of_2() support bigger types than unsigned longinclude/ | +16 | 0 replies | |
| 3/4 | log2: allow use of is_power_of_2() in constant expressionsinclude/ | +5 | 0 replies | |
| 4/4 | drm/i915/reg: use is_power_of_2() from log2.hdrivers/ | +1 | 0 replies |
Reviews trailers per patch
None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Christian König |
|---|---|
| Series | A-b |
| 1/4 | |
| 2/4 | |
| 3/4 | |
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] log2: make is_power_of_2() more generic
is_power_of_2() only works for types <= sizeof(unsigned long) and it's also not a constant expression. There are a number of places in kernel where is_power_of_2() is called on u64, which fails on 32-bit builds. Try to remedy that. While at it, make it a constant expression when possible.
I admit I've only lightly tested this, and I haven't tried it with allmodconfig.
Jani Nikula (4):
log2: add helper __IS_POWER_OF_2()
log2: have is_power_of_2() support bigger types than unsigned long
log2: allow use of is_power_of_2() in constant expressions drm/i915/reg: use is_power_of_2() from log2.h
drivers/gpu/drm/i915/i915_reg_defs.h | 7 +------ include/linux/log2.h | 25 ++++++++++++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-)
Signature · 1 line
2.39.2