aboutsummaryrefslogtreecommitdiff
path: root/include/clk.h
diff options
context:
space:
mode:
authorEugen Hristev2023-06-19 13:47:52 +0300
committerSean Anderson2023-11-01 15:13:55 -0400
commitb6a56f553318b4c0c8fb8b1ea05f2e15b2662ccb (patch)
tree62c792a371176f8cd03b44854e7f3c3db38589ad /include/clk.h
parentaed6480fadede2b87103568aaa117a423a1c3fdc (diff)
clk: fix count parameter type for clk_release_all
The second parameter for clk_release_all is used as an unsigned (which makes sense) but the function prototype declares it as an int. This causes warnings/error like such below: include/clk.h:422:48: error: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result [-Werror=sign-conversion] 422 | return clk_release_all(bulk->clks, bulk->count); To fix this, changed the type of the count to `unsigned int` Fixes: 82a8a669b4f7 ("clk: add clk_release_all()") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20230619104752.278500-1-eugen.hristev@collabora.com
Diffstat (limited to 'include/clk.h')
-rw-r--r--include/clk.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/clk.h b/include/clk.h
index d91285235f7..a342297007b 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -243,7 +243,7 @@ static inline struct clk *devm_clk_get_optional(struct udevice *dev,
*
* Return: zero on success, or -ve error code.
*/
-int clk_release_all(struct clk *clk, int count);
+int clk_release_all(struct clk *clk, unsigned int count);
/**
* devm_clk_put - "free" a managed clock source
@@ -307,7 +307,7 @@ clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
return -ENOSYS;
}
-static inline int clk_release_all(struct clk *clk, int count)
+static inline int clk_release_all(struct clk *clk, unsigned int count)
{
return -ENOSYS;
}