Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1421225 > unrolled thread

[PATCH 3.16 025/114] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case

Started byBen Hutchings <ben@decadent.org.uk>
First post2016-06-13 21:20 +0200
Last post2016-06-13 21:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.16 025/114] regmap: spmi: Fix regmap_spmi_ext_read in  multi-byte case Ben Hutchings <ben@decadent.org.uk> - 2016-06-13 21:20 +0200

#1421225 — [PATCH 3.16 025/114] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case

FromBen Hutchings <ben@decadent.org.uk>
Date2016-06-13 21:20 +0200
Subject[PATCH 3.16 025/114] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
Message-ID<rJFyW-26n-35@gated-at.bofh.it>
3.16.36-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Jack Pham <jackp@codeaurora.org>

commit dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 upstream.

Specifically for the case of reads that use the Extended Register
Read Long command, a multi-byte read operation is broken up into
8-byte chunks.  However the call to spmi_ext_register_readl() is
incorrectly passing 'val_size', which if greater than 8 will
always fail.  The argument should instead be 'len'.

Fixes: c9afbb05a9ff ("regmap: spmi: support base and extended register spaces")
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/base/regmap/regmap-spmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/base/regmap/regmap-spmi.c
+++ b/drivers/base/regmap/regmap-spmi.c
@@ -153,7 +153,7 @@ static int regmap_spmi_ext_read(void *co
 	while (val_size) {
 		len = min_t(size_t, val_size, 8);
 
-		err = spmi_ext_register_readl(context, addr, val, val_size);
+		err = spmi_ext_register_readl(context, addr, val, len);
 		if (err)
 			goto err_out;
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web