linux/drivers/base/regmap
Qianfeng Rong f4672dc6e9
regmap: use int type to store negative error codes
Change the 'ret' variable from unsigned int to int to store negative error
codes or zero returned by regmap_field_read() and regmap_read(), and change
'-1' to 'negative errno' in the comments.

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Message-ID: <20250828150702.193288-1-rongqianfeng@vivo.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2025-08-28 17:18:40 +02:00
..
Kconfig
Makefile
internal.h
regcache-flat.c
regcache-maple.c
regcache-rbtree.c
regcache.c
regmap-ac97.c
regmap-debugfs.c regmap: get rid of redundant debugfs_file_{get,put}() 2025-07-04 13:18:13 +01:00
regmap-fsi.c
regmap-i2c.c
regmap-i3c.c
regmap-irq.c regmap: irq: Avoid lockdep warnings with nested regmap-irq chips 2025-08-01 13:37:07 +01:00
regmap-kunit.c regmap: kunit: Constify regmap_range_cfg array 2025-06-08 23:35:03 +01:00
regmap-mdio.c
regmap-mmio.c regmap: mmio: Add missing MODULE_DESCRIPTION() 2025-08-10 21:09:27 +01:00
regmap-ram.c
regmap-raw-ram.c
regmap-sccb.c
regmap-sdw-mbq.c
regmap-sdw.c
regmap-slimbus.c
regmap-spi-avmm.c
regmap-spi.c
regmap-spmi.c
regmap-w1.c
regmap.c regmap: use int type to store negative error codes 2025-08-28 17:18:40 +02:00
trace.h