Skip to content

regmap: provide simple bitops and use them in a driver

Bartosz Golaszewski linux-arm-kernel linux-mediatek lkml netdev 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v22 patches 3 repliesSuperseded
  3. v12 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- drop unneeded ternary operator

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2regmap: provide helpers for simple bit operationsdrivers/base/regmap/regmap.c include/linux/regmap.h+58 -00 replies
2/2net: ethernet: mtk-star-emac: use regmap bitopsdrivers/net/ethernet/mediatek/mtk_star_emac.c+35 -450 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] regmap: provide simple bitops and use them in a driver

From: Bartosz Golaszewski <[email protected]>

I noticed that oftentimes I use regmap_update_bits() for simple bit setting or clearing. In this case the fourth argument is superfluous as it's always 0 or equal to the mask argument.

This series proposes to add simple bit operations for setting, clearing and testing specific bits with regmap.

The second patch uses all three in a driver that got recently picked into the net-next tree.

The patches obviously target different trees so - if you're ok with the change itself - I propose you pick the first one into your regmap tree for v5.8 and then I'll resend the second patch to add the first user for these macros for v5.9.

v1 -> v2:
- convert the new macros to static inline functions

v2 -> v3:
- drop unneeded ternary operator

Bartosz Golaszewski (2):
regmap: provide helpers for simple bit operations
net: ethernet: mtk-star-emac: use regmap bitops

 drivers/base/regmap/regmap.c                  | 22 +++++
 drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 ++++++++-----------
 include/linux/regmap.h                        | 36 +++++++++
 3 files changed, 93 insertions(+), 45 deletions(-)
Signature · 7 lines
2.26.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel