clk: sprd: composite: Fix unsigned comparison with less than zero
Subsystems (2)
PATCH 1/1 clk: sprd: composite: Fix unsigned comparison with less than zero
The rate is defined as unsigned long type, if(rate<0) is invalid, modify to int type.
drivers/clk/sprd/composite.c:20 sprd_comp_determine_rate() warn: unsigned 'rate' is never less than zero.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/clk/sprd/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sprd/composite.c +1 -1
@@ -13,7 +13,7 @@ static int sprd_comp_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) {struct sprd_comp *cc =hw_to_sprd_comp (hw); -unsigned long rate; +int rate; rate =sprd_div_helper_round_rate (&cc->common, &cc->div, req->rate, &req->best_parent_rate);
Signature · 1 line
2.20.1.7.g153144c