From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55C0F3FC0 for ; Sun, 5 Sep 2021 20:51:23 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C695960555; Sun, 5 Sep 2021 20:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630875082; bh=EN7nU+iSum7n5Y5ag0WJ0/Ms0wLl3a2CLSEOne9eMKU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=k1j8zXVgxxMuFqM0x9KwOux+t0FYtDzewKGjBIdX19Zo5V5dfwBCHHUcs5tcXVxVt eyyyGm9bUI8Sy823GvLt+XdtkXIbo5Mu2q/oj9LXzRYQ2fzz89kX+9+TYcrJiStlxe fa1JlCmP+vKtUIO91TDcQH545ceRJ0F5pXOXbgtAbyIRICskoqeFaFZhDhXVYO7tjF A/TOifjmLSlp9e4Jn+8tgccl5ECuKkyildi0EbBQmNaLIZxKvkYrBtNIYaob+CVCrp zdpjTELz2MKAWx8R0ZhDMBTU9t8pLG1NwFTWHsuM3xhYVNbouqMu3ncRGgw6mG0R0l GWFG8VGGVkL1w== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1d269ff8-9219-cc0a-fda7-236bfd4b4510@sholland.org> References: <20210901050526.45673-1-samuel@sholland.org> <20210901050526.45673-5-samuel@sholland.org> <20210903091040.2bngsvhem2ftzhaz@gilmour> <1d269ff8-9219-cc0a-fda7-236bfd4b4510@sholland.org> Subject: Re: [PATCH 4/8] clk: sunxi-ng: Rename files to match Kconfig and drivers From: Stephen Boyd Cc: Chen-Yu Tsai , Jernej Skrabec , Michael Turquette , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org To: Maxime Ripard , Samuel Holland Date: Sun, 05 Sep 2021 13:51:21 -0700 Message-ID: <163087508158.405991.8011400324694193509@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Quoting Samuel Holland (2021-09-03 13:57:14) > Hi Maxime, >=20 > On 9/3/21 4:10 AM, Maxime Ripard wrote: > > Hi, > >=20 > > On Wed, Sep 01, 2021 at 12:05:22AM -0500, Samuel Holland wrote: > >> When the drivers are built as modules, the file name will become the > >> module name. Rename the files so everything matches: the Kconfig symbo= l, > >> the platform driver name (as seen in sysfs), and the module name. > >> > >> Signed-off-by: Samuel Holland > >=20 > > I'm not a big fan of big renames like this, it makes merging and > > backporting patches harder in the long term. >=20 > 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. >=20 > > I assume you did this to make the module autoloading work? If so, using > > MODULE_ALIAS would be less intrusive >=20 > 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??? >=20 > Once we allow building modules, the names are ABI, and this > inconsistency will bother me until the end of time :) >=20 > 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 :=3D oldname.o obj-$(CONFIG_YOUR_SYMBOL_HERE) +=3D new-module-name.o From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20DBFC433EF for ; Sun, 5 Sep 2021 20:53:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D4F1F60555 for ; Sun, 5 Sep 2021 20:53:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D4F1F60555 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-ID:Date:To:Cc:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xBOhw8lyW+UDf4CEV6Q+cIeJwZFFYV2F9/I/U3ARYAk=; b=MjsYVXwO1jMuzu sadcd8PfbQAdNpMGW8yRD0PolsWRlbrW+Un5hHKeEQh1yMm/jjVrH5WIkzvzdeJZywusw1EcUk//J kAr5fxHqkRntz+3QZq/kkOX++qtSVQZExyK08kuOhBZvnN7alKllbKysN3nzbZIlNI4ccn4LgzltV EgjXjVgT83MPxSo72NQ4uvgDoEKuodfPMwQFEG1QFotTEZ0y1lmxOkSaHb4DPMYhaKlSVyAyyasjP p6VgofmI/aMPCUlK9HWAUo0vccx8A4BhX62JkMFBzHzBGtyRzWxUSbSHP/STmmLl31sZZHEYgBIpz jUET55iG4CSEh/Q+5NQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMz6s-00GQkP-VH; Sun, 05 Sep 2021 20:51:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mMz6p-00GQjy-EK for linux-arm-kernel@lists.infradead.org; Sun, 05 Sep 2021 20:51:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id C695960555; Sun, 5 Sep 2021 20:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630875082; bh=EN7nU+iSum7n5Y5ag0WJ0/Ms0wLl3a2CLSEOne9eMKU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=k1j8zXVgxxMuFqM0x9KwOux+t0FYtDzewKGjBIdX19Zo5V5dfwBCHHUcs5tcXVxVt eyyyGm9bUI8Sy823GvLt+XdtkXIbo5Mu2q/oj9LXzRYQ2fzz89kX+9+TYcrJiStlxe fa1JlCmP+vKtUIO91TDcQH545ceRJ0F5pXOXbgtAbyIRICskoqeFaFZhDhXVYO7tjF A/TOifjmLSlp9e4Jn+8tgccl5ECuKkyildi0EbBQmNaLIZxKvkYrBtNIYaob+CVCrp zdpjTELz2MKAWx8R0ZhDMBTU9t8pLG1NwFTWHsuM3xhYVNbouqMu3ncRGgw6mG0R0l GWFG8VGGVkL1w== MIME-Version: 1.0 In-Reply-To: <1d269ff8-9219-cc0a-fda7-236bfd4b4510@sholland.org> References: <20210901050526.45673-1-samuel@sholland.org> <20210901050526.45673-5-samuel@sholland.org> <20210903091040.2bngsvhem2ftzhaz@gilmour> <1d269ff8-9219-cc0a-fda7-236bfd4b4510@sholland.org> Subject: Re: [PATCH 4/8] clk: sunxi-ng: Rename files to match Kconfig and drivers From: Stephen Boyd Cc: Chen-Yu Tsai , Jernej Skrabec , Michael Turquette , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org To: Maxime Ripard , Samuel Holland Date: Sun, 05 Sep 2021 13:51:21 -0700 Message-ID: <163087508158.405991.8011400324694193509@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210905_135123_541193_A9925D5A X-CRM114-Status: GOOD ( 24.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Samuel Holland (2021-09-03 13:57:14) > Hi Maxime, > > On 9/3/21 4:10 AM, Maxime Ripard wrote: > > Hi, > > > > On Wed, Sep 01, 2021 at 12:05:22AM -0500, Samuel Holland wrote: > >> 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 > > > > 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. > > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel