lkml.org 
[lkml]   [2013]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH RFC 0/2] Introduce BITS_MASK macro
Date
From: Srinivas Kandagatla <srinivas.kandagatla@st.com>

This patch series introduces BITS_MASK macro which creates a mask for a given
lsb and msb bit locations. The usage of masks spread over mutiple bits is
becoming very common for example with regmap_update_bits kind of apis. Having a
common macro for this makes much sense and is clean and readable way to encode
the mask rather than having an hex number for a mask.

Second patch is to show an example usage of this new macro in regmap.

Comments ?

Thanks,
srini

Srinivas Kandagatla (2):
bitops: introduce BITS_MASK macro
regmap: move to using BITS_MASK macro

drivers/base/regmap/regmap.c | 3 +--
include/linux/bitops.h | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)

--
1.7.6.5



\
 
 \ /
  Last update: 2013-10-31 13:21    [W:0.098 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site