regmap: use IS_ALIGNED instead of % to improve the performance
authorXiubo Li <lixiubo@cmss.chinamobile.com>
Wed, 16 Dec 2015 09:45:32 +0000 (17:45 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 16 Dec 2015 13:03:20 +0000 (13:03 +0000)
commitfcac0233d89ddce72945f3e0afaf4680572d8525
tree054bd99f62932abc78b5ca24493cdd67a1156384
parenta6baa3deaf7aaec5f1c5233128b5285c4c7074e0
regmap: use IS_ALIGNED instead of % to improve the performance

The stride value should always equal to 2^n, so we can use bit
rotation instead of % to improve the performance.

Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c
This page took 0.025593 seconds and 5 git commands to generate.