mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-25 05:04:23 +08:00
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: 82a8a669b4
("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
This commit is contained in:
parent
aed6480fad
commit
b6a56f5533
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user