Thread (16 messages) 16 messages, 4 authors, 2021-09-07

Re: [PATCH 4/8] clk: sunxi-ng: Rename files to match Kconfig and drivers

From: Stephen Boyd <sboyd@kernel.org>
Date: 2021-09-05 20:51:25
Also in: linux-arm-kernel, linux-sunxi, lkml

Quoting Samuel Holland (2021-09-03 13:57:14)
Hi Maxime,

On 9/3/21 4:10 AM, Maxime Ripard wrote:
quoted
Hi,

On Wed, Sep 01, 2021 at 12:05:22AM -0500, Samuel Holland wrote:
quoted
When the drivers are built as modules, the file name will become the
module name. Rename the files so everything matches: the Kconfig symbol,
the platform driver name (as seen in sysfs), and the module name.

Signed-off-by: Samuel Holland <samuel@sholland.org>
I'm not a big fan of big renames like this, it makes merging and
backporting patches harder in the long term.
I can split this into two commits, first the .c files and then the .h
files, so everything is a 100% rename, if that makes a difference.
quoted
I assume you did this to make the module autoloading work? If so, using
MODULE_ALIAS would be less intrusive
Autoloading should work anyway, since there is a module alias for the
compatible string. This change is more about the principle of least
surprise. The compatible is allwinner,sun50i-a64-ccu, the Kconfig symbol
is SUN50I_A64_CCU, the driver name (in /sys/bus/platform/drivers) is
sun50i_a64_ccu, but yet the module name is ccu-sun50i-a64???

Once we allow building modules, the names are ABI, and this
inconsistency will bother me until the end of time :)

If there is a way to completely rename the module without renaming the
files (not adding an alias), then that would be enough for me.
Yes. You have to use Makefile logic to make an object manually that
renames the old one. The linker will build oldname.o as
new-module-name.o and then make a .ko out of it if the final goal is a
module.

  new-module-name-y := oldname.o
  obj-$(CONFIG_YOUR_SYMBOL_HERE) += new-module-name.o
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help