[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e079d753-554e-7a42-11c6-a08cc095eb91@linux.intel.com>
Date: Fri, 30 May 2025 10:41:15 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: "Nirujogi, Pratap" <pnirujog@....com>, Hans de Goede <hansg@...nel.org>
cc: Randy Dunlap <rdunlap@...radead.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Pratap Nirujogi <pratap.nirujogi@....com>,
Benjamin Chan <benjamin.chan@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:AMD HETERO CORE HARDWARE FEEDBACK DRIVER" <platform-driver-x86@...r.kernel.org>
Subject: Re: linux-next: Tree for May 27
(drivers/platform/x86/amd/amd_isp4.c)
On Tue, 27 May 2025, Nirujogi, Pratap wrote:
> On 5/27/2025 3:43 PM, Hans de Goede wrote:
> > Caution: This message originated from an External Source. Use proper caution
> > when opening attachments, clicking links, or responding.
> >
> >
> > Hi,
> >
> > On 27-May-25 8:56 PM, Randy Dunlap wrote:
> > >
> > >
> > > On 5/27/25 3:32 AM, Stephen Rothwell wrote:
> > > > Hi all,
> > > >
> > > > Changes since 20250526:
> > > >
> > >
> > > on x86_64, when
> > > # CONFIG_MODULES is not set
> > >
> > > ../drivers/platform/x86/amd/amd_isp4.c: In function 'is_isp_i2c_adapter':
> > > ../drivers/platform/x86/amd/amd_isp4.c:154:35: error: invalid use of
> > > undefined type 'struct module'
> > > 154 | return !strcmp(adap->owner->name,
> > > "i2c_designware_amdisp");
> > > | ^~
> >
> > Hmm, this should not check the owner->name at all.
> >
> > Instead the i2c_designware_amdisp should set adap->name to something
> > unique and then this should check adap->name.
> >
> I noticed the unique name set to "adap->name" in i2c_designware_amdisp is
> getting overwritten to the generic "Synopsys DesignWare I2C adapter" name in
> i2c_dw_probe_master().
>
> https://github.com/torvalds/linux/blob/master/drivers/i2c/busses/i2c-designware-master.c#L1046
>
> Inorder to use unique name to detect the specific adapter without making
> changes in i2c-designware-master.c, I used adap->owner->name.
>
> Since it is causing build issues when CONFIG_MODULES is not set, can I make a
> change in i2c-designware-master.c to initialize the generic "Synopsys
> DesignWare I2C adapter" name only when adap->name is NULL. This way I should
> be able to pass the unique name from i2c_designware_amdisp module.
How can you check that, it's char name[48]; not a pointer???
> Please suggest if this approach is okay?
--
i.
Powered by blists - more mailing lists