From: Bjorn Andersson Date: Tue, 26 Apr 2022 23:35:07 +0000 (-0700) Subject: soc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays X-Git-Tag: v5.19-rc1~143^2~1^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af77132e9d2bc8ca477003fef15e2c677ae958b1;p=thirdparty%2Fkernel%2Flinux.git soc: qcom: rpmhpd: Don't warn about sparse rpmhpd arrays In some cases the DT binding will fully describe the set of available RPMh power-domains, but there is no reason for exposing them all in the implementation. Omitting individual data->domains is handle gracefully by of_genpd_add_provider_onecell(), so there's no reason for printing a warning when this occurs. Signed-off-by: Bjorn Andersson Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20220426233508.1762345-3-bjorn.andersson@linaro.org --- diff --git a/drivers/soc/qcom/rpmhpd.c b/drivers/soc/qcom/rpmhpd.c index 11102ac47769a..f8d28e902942a 100644 --- a/drivers/soc/qcom/rpmhpd.c +++ b/drivers/soc/qcom/rpmhpd.c @@ -613,10 +613,8 @@ static int rpmhpd_probe(struct platform_device *pdev) data->num_domains = num_pds; for (i = 0; i < num_pds; i++) { - if (!rpmhpds[i]) { - dev_warn(dev, "rpmhpds[%d] is empty\n", i); + if (!rpmhpds[i]) continue; - } rpmhpds[i]->dev = dev; rpmhpds[i]->addr = cmd_db_read_addr(rpmhpds[i]->res_name);