alistair23-linux/drivers/clk/meson
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
..
axg-aoclk.c clk: meson: axg-aoclk: migrate to the new parent description method 2019-07-29 12:42:48 +02:00
axg-aoclk.h clk: meson: axg-ao: add 32k generation subtree 2019-01-07 15:21:43 +01:00
axg-audio.c clk: meson: axg-audio: fix g12a tdmout sclk inverter 2020-08-17 15:58:12 +02:00
axg-audio.h clk: meson: axg_audio: add sm1 support 2019-10-08 09:29:23 +02:00
axg.c clk: meson: clk-regmap: migrate to new parent description method 2019-07-29 12:42:49 +02:00
axg.h clk: meson: clk-pll: remove od parameters 2018-09-26 12:01:57 +02:00
clk-cpu-dyndiv.c clk: meson: add g12a cpu dynamic divider driver 2019-08-09 12:10:03 +02:00
clk-cpu-dyndiv.h clk: meson: add g12a cpu dynamic divider driver 2019-08-09 12:10:03 +02:00
clk-dualdiv.c clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-dualdiv.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-mpll.c clk: let init callback return an error code 2019-12-23 18:53:13 -08:00
clk-mpll.h clk: meson: mpll: add init callback and regs 2019-05-20 12:19:29 +02:00
clk-phase.c clk: meson: add sclk-ws driver 2020-08-17 15:58:02 +02:00
clk-phase.h clk: meson: add sclk-ws driver 2020-08-17 15:58:02 +02:00
clk-pll.c Merge branches 'clk-debugfs-danger', 'clk-basic-hw', 'clk-renesas', 'clk-amlogic' and 'clk-allwinner' into clk-next 2020-01-31 13:12:14 -08:00
clk-pll.h clk: meson-pll: add reduced specific clk_ops for G12A PCIe PLL 2019-04-01 10:45:11 +02:00
clk-regmap.c clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
clk-regmap.h clk: define to_clk_regmap() as inline function 2020-10-28 16:34:44 -07:00
g12a-aoclk.c clk: meson: g12a-aoclk: migrate to the new parent description method 2019-07-29 12:42:48 +02:00
g12a-aoclk.h dt-bindings: clock: g12a-aoclk: expose CLKID_AO_CTS_OSCIN 2019-04-01 10:45:11 +02:00
g12a.c clk: meson: g12a: mark fclk_div2 as critical 2020-08-29 16:16:18 +02:00
g12a.h clk: meson: g12a: Add support for NNA CLK source clocks 2020-06-19 17:16:39 +02:00
gxbb-aoclk.c clk: meson: gxbb-aoclk: migrate to the new parent description method 2019-07-29 12:42:48 +02:00
gxbb-aoclk.h clk: meson: gxbb-ao: replace cec-32k with the dual divider 2019-01-07 15:21:22 +01:00
gxbb.c clk: meson: gxbb: Prepare the GPU clock tree to change at runtime 2020-04-16 12:23:05 +02:00
gxbb.h clk: meson: gxbb: add the gxl internal dac gate 2020-02-13 17:26:04 +01:00
Kconfig clk: meson: make shipped controller configurable 2020-09-10 11:47:33 +02:00
Makefile clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller 2019-12-11 14:06:29 +01:00
meson-aoclk.c clk: meson: use semicolons rather than commas to separate statements 2020-10-13 17:43:07 -07:00
meson-aoclk.h clk: meson: remove ao input bypass clocks 2019-07-29 12:42:48 +02:00
meson-eeclk.c clk: meson: remove ee input bypass clocks 2019-07-29 12:42:49 +02:00
meson-eeclk.h clk: meson: remove ee input bypass clocks 2019-07-29 12:42:49 +02:00
meson8-ddr.c clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller 2019-12-11 14:06:29 +01:00
meson8b.c clk: meson: meson8b: add the vclk2_en gate clock 2020-07-09 11:37:44 +02:00
meson8b.h Merge branch 'clk-amlogic' into clk-next 2020-07-21 01:01:11 -07:00
parm.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
sclk-div.c clk: let init callback return an error code 2019-12-23 18:53:13 -08:00
sclk-div.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00
vid-pll-div.c clk: meson: vid-pll-div: remove warning and return 0 on invalid config 2019-03-29 09:41:30 +01:00
vid-pll-div.h clk: meson: rework and clean drivers dependencies 2019-02-02 17:43:32 +01:00