diff options
| author | Tom Rini <[email protected]> | 2025-06-11 13:31:45 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-06-11 13:31:45 -0600 |
| commit | ae297ca722ffdb0ae7d76e3fde637f91d4d79e81 (patch) | |
| tree | e43449d352c00048ecc43f4bac4d43c9a3c7e5f3 /drivers | |
| parent | 4b5cb576116663813768ddeb46523d1aa717133e (diff) | |
| parent | ad03050e26b1a61b3fe10a645a36da11652355e7 (diff) | |
Merge patch series "dm: core: use {s,u}32 instead of int for dev_read_{s,u}32_default"
Quentin Schulz <[email protected]> says:
Out of all the dev_read_*_default functions, only two do not properly
use the type as argument and return type: dev_read_u32_default and
dev_read_s32_default. They both use int instead of u32/s32.
Considering that it's generally not guaranteed that an int is 4 bytes
but also for consistency sake, let's have them use the expected type.
Note that I have not tested this, just stumbled upon that inconsistency
by chance.
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/core/read.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/core/read.c b/drivers/core/read.c index 55c19f335ae..c0d7a969db2 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -38,8 +38,8 @@ int dev_read_u32(const struct udevice *dev, const char *propname, u32 *outp) return ofnode_read_u32(dev_ofnode(dev), propname, outp); } -int dev_read_u32_default(const struct udevice *dev, const char *propname, - int def) +u32 dev_read_u32_default(const struct udevice *dev, const char *propname, + u32 def) { return ofnode_read_u32_default(dev_ofnode(dev), propname, def); } @@ -62,8 +62,8 @@ int dev_read_s32(const struct udevice *dev, const char *propname, s32 *outp) return ofnode_read_u32(dev_ofnode(dev), propname, (u32 *)outp); } -int dev_read_s32_default(const struct udevice *dev, const char *propname, - int def) +s32 dev_read_s32_default(const struct udevice *dev, const char *propname, + s32 def) { return ofnode_read_u32_default(dev_ofnode(dev), propname, def); } |
