[PATCH] regmap: Fix the type used for a bitmap pointer

Christophe JAILLET posted 1 patch 2 years, 6 months ago
drivers/base/regmap/regcache-rbtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] regmap: Fix the type used for a bitmap pointer
Posted by Christophe JAILLET 2 years, 6 months ago
Bitmaps should be defined as 'unsigned long', not 'long'.
Fix the type of 'cache_present' is the 'struct regcache_rbtree_node'.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
No differences in the generated code with gcc 12.1.0.
---
 drivers/base/regmap/regcache-rbtree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index fabf87058d80..4056c9d32ffa 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -22,7 +22,7 @@ struct regcache_rbtree_node {
 	/* block of adjacent registers */
 	void *block;
 	/* Which registers are present */
-	long *cache_present;
+	unsigned long *cache_present;
 	/* base register handled by this block */
 	unsigned int base_reg;
 	/* number of registers available in the block */
-- 
2.34.1
Re: [PATCH] regmap: Fix the type used for a bitmap pointer
Posted by Mark Brown 2 years, 6 months ago
On Fri, 21 Jul 2023 19:25:43 +0200, Christophe JAILLET wrote:
> Bitmaps should be defined as 'unsigned long', not 'long'.
> Fix the type of 'cache_present' is the 'struct regcache_rbtree_node'.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/1] regmap: Fix the type used for a bitmap pointer
      commit: ffb57ee9c0e2a9aae89016ee7b793a666c6aa4a5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark