Message ID | 20230109002935.244320-4-dmitry.baryshkov@linaro.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | clk/interconnect: qcom: finish migration of IP0 to clocks | expand |
On 9.01.2023 01:29, Dmitry Baryshkov wrote: > Move the const ignore_list definition out of the > of_count_icc_providers() function. This prevents the following stack > frame size warnings if the list is expanded: > > drivers/interconnect/core.c:1082:12: warning: stack frame size (1216) exceeds limit (1024) in 'of_count_icc_providers' [-Wframe-larger-than] > > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > drivers/interconnect/core.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c > index 25debded65a8..df77d2f6215d 100644 > --- a/drivers/interconnect/core.c > +++ b/drivers/interconnect/core.c > @@ -1079,15 +1079,16 @@ void icc_provider_del(struct icc_provider *provider) > } > EXPORT_SYMBOL_GPL(icc_provider_del); > > +static const struct of_device_id __maybe_unused ignore_list[] = { > + { .compatible = "qcom,sc7180-ipa-virt" }, > + { .compatible = "qcom,sdx55-ipa-virt" }, > + {} > +}; > + > static int of_count_icc_providers(struct device_node *np) > { > struct device_node *child; > int count = 0; > - const struct of_device_id __maybe_unused ignore_list[] = { > - { .compatible = "qcom,sc7180-ipa-virt" }, > - { .compatible = "qcom,sdx55-ipa-virt" }, > - {} > - }; > > for_each_available_child_of_node(np, child) { > if (of_property_read_bool(child, "#interconnect-cells") &&
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c index 25debded65a8..df77d2f6215d 100644 --- a/drivers/interconnect/core.c +++ b/drivers/interconnect/core.c @@ -1079,15 +1079,16 @@ void icc_provider_del(struct icc_provider *provider) } EXPORT_SYMBOL_GPL(icc_provider_del); +static const struct of_device_id __maybe_unused ignore_list[] = { + { .compatible = "qcom,sc7180-ipa-virt" }, + { .compatible = "qcom,sdx55-ipa-virt" }, + {} +}; + static int of_count_icc_providers(struct device_node *np) { struct device_node *child; int count = 0; - const struct of_device_id __maybe_unused ignore_list[] = { - { .compatible = "qcom,sc7180-ipa-virt" }, - { .compatible = "qcom,sdx55-ipa-virt" }, - {} - }; for_each_available_child_of_node(np, child) { if (of_property_read_bool(child, "#interconnect-cells") &&
Move the const ignore_list definition out of the of_count_icc_providers() function. This prevents the following stack frame size warnings if the list is expanded: drivers/interconnect/core.c:1082:12: warning: stack frame size (1216) exceeds limit (1024) in 'of_count_icc_providers' [-Wframe-larger-than] Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/interconnect/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)