summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorEugen Hristev <[email protected]>2023-06-19 13:47:52 +0300
committerSean Anderson <[email protected]>2023-11-01 15:13:55 -0400
commitb6a56f553318b4c0c8fb8b1ea05f2e15b2662ccb (patch)
tree62c792a371176f8cd03b44854e7f3c3db38589ad /drivers
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 <[email protected]> Reviewed-by: Xavier Drudis Ferran <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/clk-uclass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 364ee92e7f1..dcbc3ee1a1e 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -422,12 +422,13 @@ int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
return clk_get_by_index_nodev(node, index, clk);
}
-int clk_release_all(struct clk *clk, int count)
+int clk_release_all(struct clk *clk, unsigned int count)
{
- int i, ret;
+ unsigned int i;
+ int ret;
for (i = 0; i < count; i++) {
- debug("%s(clk[%d]=%p)\n", __func__, i, &clk[i]);
+ debug("%s(clk[%u]=%p)\n", __func__, i, &clk[i]);
/* check if clock has been previously requested */
if (!clk[i].dev)