linux-kernelorg-stable/drivers/clk/qcom
Arnd Bergmann 8d8c313124 clk: define to_clk_regmap() as inline function
Nesting container_of() causes warnings with W=2, which is
annoying if it happens in headers and fills the build log
like:

In file included from drivers/clk/qcom/clk-alpha-pll.c:6:
drivers/clk/qcom/clk-alpha-pll.c: In function 'clk_alpha_pll_hwfsm_enable':
include/linux/kernel.h:852:8: warning: declaration of '__mptr' shadows a previous local [-Wshadow]
  852 |  void *__mptr = (void *)(ptr);     \
      |        ^~~~~~
drivers/clk/qcom/clk-alpha-pll.c:155:31: note: in expansion of macro 'container_of'
  155 | #define to_clk_alpha_pll(_hw) container_of(to_clk_regmap(_hw), \
      |                               ^~~~~~~~~~~~
drivers/clk/qcom/clk-regmap.h:27:28: note: in expansion of macro 'container_of'
   27 | #define to_clk_regmap(_hw) container_of(_hw, struct clk_regmap, hw)
      |                            ^~~~~~~~~~~~
drivers/clk/qcom/clk-alpha-pll.c:155:44: note: in expansion of macro 'to_clk_regmap'
  155 | #define to_clk_alpha_pll(_hw) container_of(to_clk_regmap(_hw), \
      |                                            ^~~~~~~~~~~~~
drivers/clk/qcom/clk-alpha-pll.c:254:30: note: in expansion of macro 'to_clk_alpha_pll'
  254 |  struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
      |                              ^~~~~~~~~~~~~~~~
include/linux/kernel.h:852:8: note: shadowed declaration is here
  852 |  void *__mptr = (void *)(ptr);     \
      |        ^~~~~~

Redefine two copies of the to_clk_regmap() macro as inline functions
to avoid a lot of these.

Fixes: ea11dda9e0 ("clk: meson: add regmap clocks")
Fixes: 085d7a4554 ("clk: qcom: Add a regmap type clock struct")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20201026161411.3708639-1-arnd@kernel.org
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2020-10-28 16:34:44 -07:00
..
Kconfig
Makefile
a53-pll.c
apcs-msm8916.c
apss-ipq-pll.c
apss-ipq6018.c
camcc-sdm845.c
clk-alpha-pll.c
clk-alpha-pll.h
clk-branch.c
clk-branch.h
clk-cpu-8996.c
clk-hfpll.c
clk-hfpll.h
clk-krait.c
clk-krait.h
clk-pll.c
clk-pll.h
clk-rcg.c
clk-rcg.h
clk-rcg2.c
clk-regmap-divider.c
clk-regmap-divider.h
clk-regmap-mux-div.c
clk-regmap-mux-div.h
clk-regmap-mux.c
clk-regmap-mux.h
clk-regmap.c
clk-regmap.h
clk-rpm.c
clk-rpmh.c
clk-smd-rpm.c
clk-spmi-pmic-div.c
common.c
common.h
dispcc-sc7180.c
dispcc-sdm845.c
dispcc-sm8250.c
gcc-apq8084.c
gcc-ipq806x.c
gcc-ipq4019.c
gcc-ipq6018.c
gcc-ipq8074.c
gcc-mdm9615.c
gcc-msm8660.c
gcc-msm8916.c
gcc-msm8939.c
gcc-msm8960.c
gcc-msm8974.c
gcc-msm8994.c
gcc-msm8996.c
gcc-msm8998.c
gcc-qcs404.c
gcc-sc7180.c
gcc-sdm660.c
gcc-sdm845.c
gcc-sm8150.c
gcc-sm8250.c
gdsc.c
gdsc.h
gpucc-msm8998.c
gpucc-sc7180.c
gpucc-sdm845.c
gpucc-sm8150.c
gpucc-sm8250.c
hfpll.c
kpss-xcc.c
krait-cc.c
lcc-ipq806x.c
lcc-mdm9615.c
lcc-msm8960.c
lpasscc-sdm845.c
lpasscorecc-sc7180.c
mmcc-apq8084.c
mmcc-msm8960.c
mmcc-msm8974.c
mmcc-msm8996.c
mmcc-msm8998.c
mss-sc7180.c
q6sstop-qcs404.c
reset.c
reset.h
turingcc-qcs404.c
videocc-sc7180.c
videocc-sdm845.c
videocc-sm8150.c
videocc-sm8250.c