Re: [PATCH v1] clk: Convert managed get functions to devm_add_action API

From: Marc Gonzalez
Date: Thu Dec 12 2019 - 10:51:53 EST


On 12/12/2019 15:46, Russell King - ARM Linux admin wrote:

> However, please don't call this __clk_put().
> git grep __clk_put will tell you why. Thanks.

$ git grep __clk_put
drivers/clk/clk-devres.c:static void __clk_put(struct device *dev, void *data)
drivers/clk/clk-devres.c: if (!devm_add(dev, __clk_put, &clk, sizeof(clk)))
drivers/clk/clk.c:void __clk_put(struct clk *clk)
drivers/clk/clk.h:void __clk_put(struct clk *clk);
drivers/clk/clk.h:static inline void __clk_put(struct clk *clk) { }
drivers/clk/clkdev.c: __clk_put(clk);

I see. I will s/__clk_put/my_clk_put/ in my proposal.

Out of curiosity...

$ git grep __clk_put v2.6.29-rc1
v2.6.29-rc1:arch/arm/common/clkdev.c: __clk_put(clk);
v2.6.29-rc1:arch/arm/mach-ep93xx/include/mach/clkdev.h:#define __clk_put(clk) do { } while (0)
v2.6.29-rc1:arch/arm/mach-integrator/include/mach/clkdev.h:static inline void __clk_put(struct clk *clk)
v2.6.29-rc1:arch/arm/mach-pxa/include/mach/clkdev.h:#define __clk_put(clk) do { } while (0)
v2.6.29-rc1:arch/arm/mach-realview/include/mach/clkdev.h:#define __clk_put(clk) do { } while (0)
v2.6.29-rc1:arch/arm/mach-versatile/include/mach/clkdev.h:#define __clk_put(clk) do { } while (0)

Genesis seems to be 0318e693d3a56

The clkdev API expected platforms to export a __clk_put method?

Regards.