From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from jpms-ob02-os7.noc.sony.co.jp (jpms-ob02-os7.noc.sony.co.jp [211.125.139.72]) (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 3DB5B3E92AF; Mon, 18 May 2026 10:32:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.125.139.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779100384; cv=none; b=f8pYxX+sj2HCpL/DrUwQbZlLlSaS0aqcsTWRTNCeeksN8mh2gC4AP0yDL92Mlkj0ORMBxo45cy6D35HmGPlJbZL3w8qq1S38cRDO+IVhSb0AaA1xGsByKL+a3uVcylqFJevlegpvPOy0uYixYc5sz6pVWOFA6JiB1UhQBLNCXH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779100384; c=relaxed/simple; bh=y/ZSU6WO76m6NnoFZ2UHtM+29I7tmfGcQeI6Sr56gGU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K4XJ7STZjOd1Nq7g0D4FGqXGkJIZfcSEiM2+iBhXVgXxoTNS0YtvBfilVFqHHH1Z+ZILN7MSXhGHkuKtUINQksqdO3mBOaItgf+0Lnqje+lUcGCiUnsrdCwFwl5oAPduB3nVqMOOJONXgoP0bOIP11+M1gtCAtUJ5pKhFR8D6tU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com; spf=fail smtp.mailfrom=sony.com; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b=UoteJgeB; arc=none smtp.client-ip=211.125.139.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sony.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=sony.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sony.com header.i=@sony.com header.b="UoteJgeB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; s=s1jp; t=1779100360; x=1810636360; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Qg52IZakrDwa+7/YtZM2VQOBVW4gzCDrQLRgDaIE4Fk=; b=UoteJgeBJo1onKpWNx13hF9V0wSu25tCka7zdAPqSXrBODw5MFs0O8Bj J3cfseLF1BE4gIUknGGR0ZpSbpY+LLOAhjV/4ln5n/sFDYIsKMLX3OOc/ 3/t7/VEt/9MdvW0wCYfPmXv4+QggzY8H06hScZcdnUCP7READRNMER+Kj a/WK7jY+DOZ2gnylOjoTtm1PB+9hICkzLeWPxp59me304zZNDwMO/dAiI 7pyjJ6kootiikGW9FmgcOsZ3lb0ZdFBIpaMuVmYgTZpk0liPJIpYgX5Dr 6CBImYg++LvlW/LbWYWzyVUUnRpmHR39TBB79BAdssNeL6EHoTPTqzrHY w==; X-CSE-ConnectionGUID: rEk16PglQ42apwMEHjNHGA== X-CSE-MsgGUID: gcvWBvR0RE2G3yOmVc5ccw== Received: from unknown (HELO jpmta-ob01-os7.noc.sony.co.jp) ([IPv6:2001:cf8:acf:1104::6]) by jpms-ob02-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 19:32:30 +0900 X-CSE-ConnectionGUID: LE5Xik2fR8SdQOdHHPC7kA== X-CSE-MsgGUID: tneGe+ukRCC0giD8+owyPg== X-IronPort-AV: E=Sophos;i="6.23,241,1770562800"; d="scan'208";a="66945202" Received: from unknown (HELO JPC00244420) ([IPv6:2001:cf8:1:573:0:dddd:6b3e:119e]) by jpmta-ob01-os7.noc.sony.co.jp with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 19:32:29 +0900 Date: Mon, 18 May 2026 19:32:28 +0900 From: Shashank Balaji To: Greg Kroah-Hartman Cc: Suzuki K Poulose , James Clark , Alexander Shishkin , "Rafael J. Wysocki" , Danilo Krummrich , Miguel Ojeda , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Jonathan Corbet , Shuah Khan , Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Mike Leach , Leo Yan , Thierry Reding , Jonathan Hunter , Rahul Bukte , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, Daniel Palmer , Tim Bird , linux-modules@vger.kernel.org, linux-tegra@vger.kernel.org, Sumit Gupta Subject: Re: [PATCH v5 4/4] driver core: platform: set mod_name in driver registration Message-ID: References: <20260518-acpi_mod_name-v5-0-705ccc430885@sony.com> <20260518-acpi_mod_name-v5-4-705ccc430885@sony.com> <2026051827-curler-disjoin-c83f@gregkh> Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2026051827-curler-disjoin-c83f@gregkh> On Mon, May 18, 2026 at 12:27:13PM +0200, Greg Kroah-Hartman wrote: > On Mon, May 18, 2026 at 07:20:00PM +0900, Shashank Balaji wrote: > > Pass KBUILD_MODNAME through the driver registration macro so that > > the driver core can create the module symlink in sysfs for built-in > > drivers, and fixup all callers. > > > > The Rust platform adapter is updated to pass the module name through to the new > > parameter. > > > > Tested on qemu with: > > - x86 defconfig + CONFIG_RUST > > - arm64 defconfig + CONFIG_RUST + CONFIG_CORESIGHT stuff > > > > Examples after this patch: > > > > /sys/bus/platform/drivers/... > > coresight-itnoc/module -> coresight_tnoc > > coresight-static-tpdm/module -> coresight_tpdm > > coresight-catu-platform/module -> coresight_catu > > serial8250/module -> 8250 > > acpi-ged/module -> acpi > > vmclock/module -> ptp_vmclock > > > > Co-developed-by: Rahul Bukte > > Signed-off-by: Rahul Bukte > > Signed-off-by: Shashank Balaji > > --- > > This patch depends on patches 1, 2, 3 > > --- > > Documentation/driver-api/driver-model/platform.rst | 3 ++- > > drivers/base/platform.c | 21 ++++++++++++++------- > > drivers/hwtracing/coresight/coresight-core.c | 5 +++-- > > include/linux/coresight.h | 5 +++-- > > include/linux/platform_device.h | 17 +++++++++-------- > > rust/kernel/platform.rs | 4 +++- > > 6 files changed, 34 insertions(+), 21 deletions(-) > > > > diff --git a/Documentation/driver-api/driver-model/platform.rst b/Documentation/driver-api/driver-model/platform.rst > > index cf5ff48d3115..9673470bded2 100644 > > --- a/Documentation/driver-api/driver-model/platform.rst > > +++ b/Documentation/driver-api/driver-model/platform.rst > > @@ -70,7 +70,8 @@ Kernel modules can be composed of several platform drivers. The platform core > > provides helpers to register and unregister an array of drivers:: > > > > int __platform_register_drivers(struct platform_driver * const *drivers, > > - unsigned int count, struct module *owner); > > + unsigned int count, struct module *owner, > > + const char *mod_name); > > Why can't you just use the owner->name value instead? They are always > the same here, right? owner is NULL for built-in modules.