All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regmap: fix the kerneldoc for regmap_test_bits()
@ 2020-06-07  9:34 Bartosz Golaszewski
  2020-06-08 12:46 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Bartosz Golaszewski @ 2020-06-07  9:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

The kerneldoc comment for regmap_test_bits() says that it returns -1 on
regmap_read() failure. This is not true - it will propagate the error
code returned by regmap_read(). Fix it.

Fixes: aa2ff9dbaedd ("regmap: provide helpers for simple bit operations")
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 drivers/base/regmap/regmap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index c472f624382d..1aedca53cca2 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -2944,8 +2944,9 @@ EXPORT_SYMBOL_GPL(regmap_update_bits_base);
  * @reg: Register to read from
  * @bits: Bits to test
  *
- * Returns -1 if the underlying regmap_read() fails, 0 if at least one of the
- * tested bits is not set and 1 if all tested bits are set.
+ * Returns 0 if at least one of the tested bits is not set, 1 if all tested
+ * bits are set and a negative error number if the underlying regmap_read()
+ * fails.
  */
 int regmap_test_bits(struct regmap *map, unsigned int reg, unsigned int bits)
 {
-- 
2.26.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regmap: fix the kerneldoc for regmap_test_bits()
  2020-06-07  9:34 [PATCH] regmap: fix the kerneldoc for regmap_test_bits() Bartosz Golaszewski
@ 2020-06-08 12:46 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-06-08 12:46 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: Bartosz Golaszewski, linux-kernel

On Sun, 7 Jun 2020 11:34:21 +0200, Bartosz Golaszewski wrote:
> The kerneldoc comment for regmap_test_bits() says that it returns -1 on
> regmap_read() failure. This is not true - it will propagate the error
> code returned by regmap_read(). Fix it.

Applied to

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

Thanks!

[1/1] regmap: fix the kerneldoc for regmap_test_bits()
      commit: e680a4098f6404191e0e438a9758715b0bff6d7f

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-08 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07  9:34 [PATCH] regmap: fix the kerneldoc for regmap_test_bits() Bartosz Golaszewski
2020-06-08 12:46 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.