* [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set
@ 2025-05-30 19:59 Pratap Nirujogi
2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Pratap Nirujogi @ 2025-05-30 19:59 UTC (permalink / raw)
To: rdunlap, hdegoede, ilpo.jarvinen, sfr, linux-next
Cc: platform-driver-x86, linux-kernel, benjamin.chan, bin.du,
gjorgji.rosikopulos, king.li, dantony, Pratap Nirujogi
When CONFIG_MODULES is not defined, 'adap->owner->name' used in amd_isp4 platform
driver will not be valid and is resulting in build failures.
../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");
| ^~
To fix this issue, I need to make changes both in platform and i2c driver modules.
* In the amd_isp4 x86/platform driver, replace 'adap->owner->name' with 'adap->name', this removes
the hard dependency on 'struct module'.
* In i2c amdisp driver, initialize unique name to i2c adapter and also make a change in
i2c-designware-common to avoid overwriting with generic name when adap->name[] is already set.
Thanks,
Pratap
Pratap Nirujogi (3):
i2c: designware: Initialize adapter name only when not set
i2c: amd-isp: Initialize unique adpater name
platform/x86: Use i2c adapter name to fix build errors
drivers/i2c/busses/i2c-designware-amdisp.c | 2 ++
drivers/i2c/busses/i2c-designware-master.c | 5 +++--
drivers/platform/x86/amd/amd_isp4.c | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH 1/3] i2c: designware: Initialize adapter name only when not set 2025-05-30 19:59 [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set Pratap Nirujogi @ 2025-05-30 19:59 ` Pratap Nirujogi 2025-05-31 5:14 ` Ilpo Järvinen 2025-05-30 19:59 ` [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name Pratap Nirujogi 2025-05-30 19:59 ` [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors Pratap Nirujogi 2 siblings, 1 reply; 14+ messages in thread From: Pratap Nirujogi @ 2025-05-30 19:59 UTC (permalink / raw) To: rdunlap, hdegoede, ilpo.jarvinen, sfr, linux-next Cc: platform-driver-x86, linux-kernel, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony, Pratap Nirujogi Check if the adapter name is already set in the driver prior to initializing with generic name in i2c_dw_probe_master(). Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") Reported-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> --- drivers/i2c/busses/i2c-designware-master.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index c5394229b77f..ab03943d6aaf 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c @@ -1042,8 +1042,9 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev) if (ret) return ret; - snprintf(adap->name, sizeof(adap->name), - "Synopsys DesignWare I2C adapter"); + if (!adap->name[0]) + snprintf(adap->name, sizeof(adap->name), + "Synopsys DesignWare I2C adapter"); adap->retries = 3; adap->algo = &i2c_dw_algo; adap->quirks = &i2c_dw_quirks; -- 2.43.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/3] i2c: designware: Initialize adapter name only when not set 2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi @ 2025-05-31 5:14 ` Ilpo Järvinen 2025-06-03 3:18 ` Nirujogi, Pratap 0 siblings, 1 reply; 14+ messages in thread From: Ilpo Järvinen @ 2025-05-31 5:14 UTC (permalink / raw) To: Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony On Fri, 30 May 2025, Pratap Nirujogi wrote: > Check if the adapter name is already set in the driver prior > to initializing with generic name in i2c_dw_probe_master(). > > Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org > Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> > --- > drivers/i2c/busses/i2c-designware-master.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c > index c5394229b77f..ab03943d6aaf 100644 > --- a/drivers/i2c/busses/i2c-designware-master.c > +++ b/drivers/i2c/busses/i2c-designware-master.c > @@ -1042,8 +1042,9 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev) > if (ret) > return ret; > > - snprintf(adap->name, sizeof(adap->name), > - "Synopsys DesignWare I2C adapter"); > + if (!adap->name[0]) > + snprintf(adap->name, sizeof(adap->name), > + "Synopsys DesignWare I2C adapter"); I'd convert this to scnprintf() here as well and add to the changelog: While at it, convert to scnprintf() that is preferred over snprintf(). As with the other patch, this too is missing receipients (as indicated by the get_maintainers script). -- i. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/3] i2c: designware: Initialize adapter name only when not set 2025-05-31 5:14 ` Ilpo Järvinen @ 2025-06-03 3:18 ` Nirujogi, Pratap 0 siblings, 0 replies; 14+ messages in thread From: Nirujogi, Pratap @ 2025-06-03 3:18 UTC (permalink / raw) To: Ilpo Järvinen, Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony Hi Ilpo, On 5/31/2025 1:14 AM, Ilpo Järvinen wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > On Fri, 30 May 2025, Pratap Nirujogi wrote: > >> Check if the adapter name is already set in the driver prior >> to initializing with generic name in i2c_dw_probe_master(). >> >> Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") >> Reported-by: Randy Dunlap <rdunlap@infradead.org> >> Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org >> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> >> --- >> drivers/i2c/busses/i2c-designware-master.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c >> index c5394229b77f..ab03943d6aaf 100644 >> --- a/drivers/i2c/busses/i2c-designware-master.c >> +++ b/drivers/i2c/busses/i2c-designware-master.c >> @@ -1042,8 +1042,9 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev) >> if (ret) >> return ret; >> >> - snprintf(adap->name, sizeof(adap->name), >> - "Synopsys DesignWare I2C adapter"); >> + if (!adap->name[0]) >> + snprintf(adap->name, sizeof(adap->name), >> + "Synopsys DesignWare I2C adapter"); > > I'd convert this to scnprintf() here as well and add to the changelog: > > While at it, convert to scnprintf() that is preferred over snprintf(). > > As with the other patch, this too is missing receipients (as indicated > by the get_maintainers script). > Thank you, I will use scnprintf() inplace of snprintf() in v2 and will make sure to include all the intended receipients while sending the patch. Thanks, Pratap > -- > i. > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name 2025-05-30 19:59 [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set Pratap Nirujogi 2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi @ 2025-05-30 19:59 ` Pratap Nirujogi 2025-05-31 5:06 ` Ilpo Järvinen 2025-05-30 19:59 ` [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors Pratap Nirujogi 2 siblings, 1 reply; 14+ messages in thread From: Pratap Nirujogi @ 2025-05-30 19:59 UTC (permalink / raw) To: rdunlap, hdegoede, ilpo.jarvinen, sfr, linux-next Cc: platform-driver-x86, linux-kernel, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony, Pratap Nirujogi Initialize unique name for amdisp i2c adapter, which is used in the platform driver to detect the matching adapter for i2c_client creation. Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") Reported-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> --- drivers/i2c/busses/i2c-designware-amdisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/i2c/busses/i2c-designware-amdisp.c b/drivers/i2c/busses/i2c-designware-amdisp.c index ad6f08338124..e8cb3785c740 100644 --- a/drivers/i2c/busses/i2c-designware-amdisp.c +++ b/drivers/i2c/busses/i2c-designware-amdisp.c @@ -62,6 +62,8 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev) adap = &isp_i2c_dev->adapter; adap->owner = THIS_MODULE; + snprintf(adap->name, sizeof(adap->name), + "AMDISP DesignWare I2C adapter"); ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); adap->dev.of_node = pdev->dev.of_node; /* use dynamically allocated adapter id */ -- 2.43.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name 2025-05-30 19:59 ` [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name Pratap Nirujogi @ 2025-05-31 5:06 ` Ilpo Järvinen 2025-06-03 3:15 ` Nirujogi, Pratap 0 siblings, 1 reply; 14+ messages in thread From: Ilpo Järvinen @ 2025-05-31 5:06 UTC (permalink / raw) To: Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony Hi Pratap, Please send the next version(s) to all relevant people as indicated by scripts/get_maintainer.pl. On Fri, 30 May 2025, Pratap Nirujogi wrote: > Initialize unique name for amdisp i2c adapter, which is used > in the platform driver to detect the matching adapter for > i2c_client creation. > > Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org > Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> > --- > drivers/i2c/busses/i2c-designware-amdisp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-designware-amdisp.c b/drivers/i2c/busses/i2c-designware-amdisp.c > index ad6f08338124..e8cb3785c740 100644 > --- a/drivers/i2c/busses/i2c-designware-amdisp.c > +++ b/drivers/i2c/busses/i2c-designware-amdisp.c > @@ -62,6 +62,8 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev) > > adap = &isp_i2c_dev->adapter; > adap->owner = THIS_MODULE; > + snprintf(adap->name, sizeof(adap->name), > + "AMDISP DesignWare I2C adapter"); scnprintf() is preferrable over snprintf(). Even if you don't use the return value here, eventually somebody will want to get rid of snprintf() entirely so lets try not add new ones. > ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); > adap->dev.of_node = pdev->dev.of_node; > /* use dynamically allocated adapter id */ > -- i. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name 2025-05-31 5:06 ` Ilpo Järvinen @ 2025-06-03 3:15 ` Nirujogi, Pratap 0 siblings, 0 replies; 14+ messages in thread From: Nirujogi, Pratap @ 2025-06-03 3:15 UTC (permalink / raw) To: Ilpo Järvinen, Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony Hi Ilpo, Thanks for the review feedback and guidance. Sure, I will take care of addressing the review comments and will ensure to include the key stakeholders / mailing lists recommened by scripts/get_maintainer.pl while submitting the next patch. Thanks, Pratap On 5/31/2025 1:06 AM, Ilpo Järvinen wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > Hi Pratap, > > Please send the next version(s) to all relevant people as indicated by > scripts/get_maintainer.pl. > > On Fri, 30 May 2025, Pratap Nirujogi wrote: > >> Initialize unique name for amdisp i2c adapter, which is used >> in the platform driver to detect the matching adapter for >> i2c_client creation. >> >> Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") >> Reported-by: Randy Dunlap <rdunlap@infradead.org> >> Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org >> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> >> --- >> drivers/i2c/busses/i2c-designware-amdisp.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/i2c/busses/i2c-designware-amdisp.c b/drivers/i2c/busses/i2c-designware-amdisp.c >> index ad6f08338124..e8cb3785c740 100644 >> --- a/drivers/i2c/busses/i2c-designware-amdisp.c >> +++ b/drivers/i2c/busses/i2c-designware-amdisp.c >> @@ -62,6 +62,8 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev) >> >> adap = &isp_i2c_dev->adapter; >> adap->owner = THIS_MODULE; >> + snprintf(adap->name, sizeof(adap->name), >> + "AMDISP DesignWare I2C adapter"); > > scnprintf() is preferrable over snprintf(). Even if you don't use the > return value here, eventually somebody will want to get rid of snprintf() > entirely so lets try not add new ones. > sure, will use scnprintf() in place of snprintf() in v2. >> ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev)); >> adap->dev.of_node = pdev->dev.of_node; >> /* use dynamically allocated adapter id */ >> > > -- > i. > ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-05-30 19:59 [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set Pratap Nirujogi 2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi 2025-05-30 19:59 ` [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name Pratap Nirujogi @ 2025-05-30 19:59 ` Pratap Nirujogi 2025-05-31 5:11 ` Ilpo Järvinen 2 siblings, 1 reply; 14+ messages in thread From: Pratap Nirujogi @ 2025-05-30 19:59 UTC (permalink / raw) To: rdunlap, hdegoede, ilpo.jarvinen, sfr, linux-next Cc: platform-driver-x86, linux-kernel, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony, Pratap Nirujogi Use 'adapater->name' inplace of 'adapter->owner->name' to fix build issues when CONFIG_MODULES is not defined. Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") Reported-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> --- drivers/platform/x86/amd/amd_isp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/amd/amd_isp4.c b/drivers/platform/x86/amd/amd_isp4.c index 0cc01441bcbb..80b57b58621a 100644 --- a/drivers/platform/x86/amd/amd_isp4.c +++ b/drivers/platform/x86/amd/amd_isp4.c @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) { - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); } static void instantiate_isp_i2c_client(struct amdisp_platform *isp4_platform, -- 2.43.0 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-05-30 19:59 ` [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors Pratap Nirujogi @ 2025-05-31 5:11 ` Ilpo Järvinen 2025-06-03 3:35 ` Nirujogi, Pratap 0 siblings, 1 reply; 14+ messages in thread From: Ilpo Järvinen @ 2025-05-31 5:11 UTC (permalink / raw) To: Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony On Fri, 30 May 2025, Pratap Nirujogi wrote: > Use 'adapater->name' inplace of 'adapter->owner->name' to fix build issues > when CONFIG_MODULES is not defined. > > Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") This is the which should have this Fixes tag, the other commits should not have it as they're not really the fix (but this change just depends on them, but since stable is not in picture yet for this driver we don't need to indicate even those deps). > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org > Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> > --- > drivers/platform/x86/amd/amd_isp4.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/amd/amd_isp4.c b/drivers/platform/x86/amd/amd_isp4.c > index 0cc01441bcbb..80b57b58621a 100644 > --- a/drivers/platform/x86/amd/amd_isp4.c > +++ b/drivers/platform/x86/amd/amd_isp4.c > @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); > > static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) > { > - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); > + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); Since both are in-kernel code, share that name through a define in some header. -- i. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-05-31 5:11 ` Ilpo Järvinen @ 2025-06-03 3:35 ` Nirujogi, Pratap 2025-06-03 4:46 ` Mario Limonciello 2025-06-03 7:15 ` Ilpo Järvinen 0 siblings, 2 replies; 14+ messages in thread From: Nirujogi, Pratap @ 2025-06-03 3:35 UTC (permalink / raw) To: Ilpo Järvinen, Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony Hi Ilpo, On 5/31/2025 1:11 AM, Ilpo Järvinen wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > On Fri, 30 May 2025, Pratap Nirujogi wrote: > >> Use 'adapater->name' inplace of 'adapter->owner->name' to fix build issues >> when CONFIG_MODULES is not defined. >> >> Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for OV05C10") > > This is the which should have this Fixes tag, the other commits should not > have it as they're not really the fix (but this change just depends on > them, but since stable is not in picture yet for this driver we don't > need to indicate even those deps). > Thank you, I will take care of keeping the Fixes tag only in the x86/platform driver patch and will remove in the other two i2c driver patches. Sorry I think I'm not completely clear on this statement "we don't need to indicate even those deps" - Am I good if I submit the same patch series removing the Fixes tag from the two i2c driver patches? Or Is it about submitting the i2c patches independently from x86/platform, instead of keeping all the 3 patches in a single series. Can you please help to clarify? >> Reported-by: Randy Dunlap <rdunlap@infradead.org> >> Link: https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org >> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> >> --- >> drivers/platform/x86/amd/amd_isp4.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/platform/x86/amd/amd_isp4.c b/drivers/platform/x86/amd/amd_isp4.c >> index 0cc01441bcbb..80b57b58621a 100644 >> --- a/drivers/platform/x86/amd/amd_isp4.c >> +++ b/drivers/platform/x86/amd/amd_isp4.c >> @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); >> >> static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) >> { >> - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); >> + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); > > Since both are in-kernel code, share that name through a define in some > header. > sure, I will find the header file that can be used to add the adap->name definition. Thanks, Pratap > -- > i. > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-06-03 3:35 ` Nirujogi, Pratap @ 2025-06-03 4:46 ` Mario Limonciello 2025-06-03 15:50 ` Nirujogi, Pratap 2025-06-03 7:15 ` Ilpo Järvinen 1 sibling, 1 reply; 14+ messages in thread From: Mario Limonciello @ 2025-06-03 4:46 UTC (permalink / raw) To: Nirujogi, Pratap, Ilpo Järvinen, Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony On 6/2/2025 10:35 PM, Nirujogi, Pratap wrote: > Hi Ilpo, > > On 5/31/2025 1:11 AM, Ilpo Järvinen wrote: >> Caution: This message originated from an External Source. Use proper >> caution when opening attachments, clicking links, or responding. >> >> >> On Fri, 30 May 2025, Pratap Nirujogi wrote: >> >>> Use 'adapater->name' inplace of 'adapter->owner->name' to fix build >>> issues >>> when CONFIG_MODULES is not defined. >>> >>> Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for >>> OV05C10") >> >> This is the which should have this Fixes tag, the other commits should >> not >> have it as they're not really the fix (but this change just depends on >> them, but since stable is not in picture yet for this driver we don't >> need to indicate even those deps). >> > Thank you, I will take care of keeping the Fixes tag only in the x86/ > platform driver patch and will remove in the other two i2c driver patches. > > Sorry I think I'm not completely clear on this statement "we don't need > to indicate even those deps" - Am I good if I submit the same patch > series removing the Fixes tag from the two i2c driver patches? Or Is it > about submitting the i2c patches independently from x86/platform, > instead of keeping all the 3 patches in a single series. Can you please > help to clarify? Keep the patches in the series, but the only one that needs a Fixes tag is this one. > >>> Reported-by: Randy Dunlap <rdunlap@infradead.org> >>> Link: https://lore.kernel.org/all/04577a46-9add-420c- >>> b181-29bad582026d@infradead.org >>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> >>> --- >>> drivers/platform/x86/amd/amd_isp4.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/platform/x86/amd/amd_isp4.c b/drivers/platform/ >>> x86/amd/amd_isp4.c >>> index 0cc01441bcbb..80b57b58621a 100644 >>> --- a/drivers/platform/x86/amd/amd_isp4.c >>> +++ b/drivers/platform/x86/amd/amd_isp4.c >>> @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); >>> >>> static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) >>> { >>> - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); >>> + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); >> >> Since both are in-kernel code, share that name through a define in some >> header. >> > sure, I will find the header file that can be used to add the adap->name > definition. > > Thanks, > Pratap > >> -- >> i. >> > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-06-03 4:46 ` Mario Limonciello @ 2025-06-03 15:50 ` Nirujogi, Pratap 0 siblings, 0 replies; 14+ messages in thread From: Nirujogi, Pratap @ 2025-06-03 15:50 UTC (permalink / raw) To: Mario Limonciello, Ilpo Järvinen, Pratap Nirujogi Cc: rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony On 6/3/2025 12:46 AM, Mario Limonciello wrote: > On 6/2/2025 10:35 PM, Nirujogi, Pratap wrote: >> Hi Ilpo, >> >> On 5/31/2025 1:11 AM, Ilpo Järvinen wrote: >>> Caution: This message originated from an External Source. Use proper >>> caution when opening attachments, clicking links, or responding. >>> >>> >>> On Fri, 30 May 2025, Pratap Nirujogi wrote: >>> >>>> Use 'adapater->name' inplace of 'adapter->owner->name' to fix build >>>> issues >>>> when CONFIG_MODULES is not defined. >>>> >>>> Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for >>>> OV05C10") >>> >>> This is the which should have this Fixes tag, the other commits >>> should not >>> have it as they're not really the fix (but this change just depends on >>> them, but since stable is not in picture yet for this driver we don't >>> need to indicate even those deps). >>> >> Thank you, I will take care of keeping the Fixes tag only in the x86/ >> platform driver patch and will remove in the other two i2c driver >> patches. >> >> Sorry I think I'm not completely clear on this statement "we don't >> need to indicate even those deps" - Am I good if I submit the same >> patch series removing the Fixes tag from the two i2c driver patches? >> Or Is it about submitting the i2c patches independently from x86/ >> platform, instead of keeping all the 3 patches in a single series. Can >> you please help to clarify? > > Keep the patches in the series, but the only one that needs a Fixes tag > is this one. > >> >>>> Reported-by: Randy Dunlap <rdunlap@infradead.org> >>>> Link: https://lore.kernel.org/all/04577a46-9add-420c- >>>> b181-29bad582026d@infradead.org >>>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> >>>> --- >>>> drivers/platform/x86/amd/amd_isp4.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/platform/x86/amd/amd_isp4.c b/drivers/platform/ >>>> x86/amd/amd_isp4.c >>>> index 0cc01441bcbb..80b57b58621a 100644 >>>> --- a/drivers/platform/x86/amd/amd_isp4.c >>>> +++ b/drivers/platform/x86/amd/amd_isp4.c >>>> @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); >>>> >>>> static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) >>>> { >>>> - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); >>>> + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); >>> >>> Since both are in-kernel code, share that name through a define in some >>> header. >>> Thanks Mario for clarifying, will take care of it in the next v2 patch series. >> sure, I will find the header file that can be used to add the adap- >> >name definition. >> >> Thanks, >> Pratap >> >>> -- >>> i. >>> >> >> > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-06-03 3:35 ` Nirujogi, Pratap 2025-06-03 4:46 ` Mario Limonciello @ 2025-06-03 7:15 ` Ilpo Järvinen 2025-06-03 15:50 ` Nirujogi, Pratap 1 sibling, 1 reply; 14+ messages in thread From: Ilpo Järvinen @ 2025-06-03 7:15 UTC (permalink / raw) To: Nirujogi, Pratap Cc: Pratap Nirujogi, rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony [-- Attachment #1: Type: text/plain, Size: 3020 bytes --] On Mon, 2 Jun 2025, Nirujogi, Pratap wrote: > Hi Ilpo, > > On 5/31/2025 1:11 AM, Ilpo Järvinen wrote: > > Caution: This message originated from an External Source. Use proper caution > > when opening attachments, clicking links, or responding. > > > > > > On Fri, 30 May 2025, Pratap Nirujogi wrote: > > > > > Use 'adapater->name' inplace of 'adapter->owner->name' to fix build issues > > > when CONFIG_MODULES is not defined. > > > > > > Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for > > > OV05C10") > > > > This is the which should have this Fixes tag, the other commits should not > > have it as they're not really the fix (but this change just depends on > > them, but since stable is not in picture yet for this driver we don't > > need to indicate even those deps). > > > Thank you, I will take care of keeping the Fixes tag only in the x86/platform > driver patch and will remove in the other two i2c driver patches. > > Sorry I think I'm not completely clear on this statement "we don't need to > indicate even those deps" - Am I good if I submit the same patch series > removing the Fixes tag from the two i2c driver patches? Or Is it about > submitting the i2c patches independently from x86/platform, instead of keeping > all the 3 patches in a single series. Can you please help to clarify? Just remove the other fixes tags. Those changes don't really "fix" the problem but lay groundwork for the last patch. (If this would be going to stable, which it isn't because the driver is not yet in any stable kernels, you'd have to add Cc: <stable@vger.kernel.org> to all dependencies within the series and the fix and the Fixes tag would still be in the last change only.) The series should be applied as whole, either by me or the i2c maintainers once it's ready. -- i. > > > Reported-by: Randy Dunlap <rdunlap@infradead.org> > > > Link: > > > https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org > > > Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> > > > --- > > > drivers/platform/x86/amd/amd_isp4.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/platform/x86/amd/amd_isp4.c > > > b/drivers/platform/x86/amd/amd_isp4.c > > > index 0cc01441bcbb..80b57b58621a 100644 > > > --- a/drivers/platform/x86/amd/amd_isp4.c > > > +++ b/drivers/platform/x86/amd/amd_isp4.c > > > @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); > > > > > > static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) > > > { > > > - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); > > > + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); > > > > Since both are in-kernel code, share that name through a define in some > > header. > > > sure, I will find the header file that can be used to add the adap->name > definition. > > Thanks, > Pratap > > > -- > > i. > > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors 2025-06-03 7:15 ` Ilpo Järvinen @ 2025-06-03 15:50 ` Nirujogi, Pratap 0 siblings, 0 replies; 14+ messages in thread From: Nirujogi, Pratap @ 2025-06-03 15:50 UTC (permalink / raw) To: Ilpo Järvinen Cc: Pratap Nirujogi, rdunlap, Hans de Goede, sfr, linux-next, platform-driver-x86, LKML, benjamin.chan, bin.du, gjorgji.rosikopulos, king.li, dantony On 6/3/2025 3:15 AM, Ilpo Järvinen wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > On Mon, 2 Jun 2025, Nirujogi, Pratap wrote: > >> Hi Ilpo, >> >> On 5/31/2025 1:11 AM, Ilpo Järvinen wrote: >>> Caution: This message originated from an External Source. Use proper caution >>> when opening attachments, clicking links, or responding. >>> >>> >>> On Fri, 30 May 2025, Pratap Nirujogi wrote: >>> >>>> Use 'adapater->name' inplace of 'adapter->owner->name' to fix build issues >>>> when CONFIG_MODULES is not defined. >>>> >>>> Fixes: 90b85567e457 ("platform/x86: Add AMD ISP platform config for >>>> OV05C10") >>> >>> This is the which should have this Fixes tag, the other commits should not >>> have it as they're not really the fix (but this change just depends on >>> them, but since stable is not in picture yet for this driver we don't >>> need to indicate even those deps). >>> >> Thank you, I will take care of keeping the Fixes tag only in the x86/platform >> driver patch and will remove in the other two i2c driver patches. >> >> Sorry I think I'm not completely clear on this statement "we don't need to >> indicate even those deps" - Am I good if I submit the same patch series >> removing the Fixes tag from the two i2c driver patches? Or Is it about >> submitting the i2c patches independently from x86/platform, instead of keeping >> all the 3 patches in a single series. Can you please help to clarify? > > Just remove the other fixes tags. Those changes don't really "fix" the > problem but lay groundwork for the last patch. > > (If this would be going to stable, which it isn't because the driver is > not yet in any stable kernels, you'd have to add Cc: <stable@vger.kernel.org> > to all dependencies within the series and the fix and the Fixes tag > would still be in the last change only.) > > > The series should be applied as whole, either by me or the i2c > maintainers once it's ready. > Thanks Ilpo for clarifying, and good to know about how the dependencies should be handled once the driver is in any of the stable branches and the significance of mailing list 'stable@vger.kernel.org'. Will submit the new v2 patch series addressing the comments shortly. Thanks, Pratap > -- > i. > >>>> Reported-by: Randy Dunlap <rdunlap@infradead.org> >>>> Link: >>>> https://lore.kernel.org/all/04577a46-9add-420c-b181-29bad582026d@infradead.org >>>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com> >>>> --- >>>> drivers/platform/x86/amd/amd_isp4.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/platform/x86/amd/amd_isp4.c >>>> b/drivers/platform/x86/amd/amd_isp4.c >>>> index 0cc01441bcbb..80b57b58621a 100644 >>>> --- a/drivers/platform/x86/amd/amd_isp4.c >>>> +++ b/drivers/platform/x86/amd/amd_isp4.c >>>> @@ -151,7 +151,7 @@ MODULE_DEVICE_TABLE(acpi, amdisp_sensor_ids); >>>> >>>> static inline bool is_isp_i2c_adapter(struct i2c_adapter *adap) >>>> { >>>> - return !strcmp(adap->owner->name, "i2c_designware_amdisp"); >>>> + return !strcmp(adap->name, "AMDISP DesignWare I2C adapter"); >>> >>> Since both are in-kernel code, share that name through a define in some >>> header. >>> >> sure, I will find the header file that can be used to add the adap->name >> definition. >> >> Thanks, >> Pratap >> >>> -- >>> i. >>> >> ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-06-03 15:50 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-30 19:59 [PATCH 0/3] Fix build issue when CONFIG_MODULES is not set Pratap Nirujogi 2025-05-30 19:59 ` [PATCH 1/3] i2c: designware: Initialize adapter name only when " Pratap Nirujogi 2025-05-31 5:14 ` Ilpo Järvinen 2025-06-03 3:18 ` Nirujogi, Pratap 2025-05-30 19:59 ` [PATCH 2/3] i2c: amd-isp: Initialize unique adpater name Pratap Nirujogi 2025-05-31 5:06 ` Ilpo Järvinen 2025-06-03 3:15 ` Nirujogi, Pratap 2025-05-30 19:59 ` [PATCH 3/3] platform/x86: Use i2c adapter name to fix build errors Pratap Nirujogi 2025-05-31 5:11 ` Ilpo Järvinen 2025-06-03 3:35 ` Nirujogi, Pratap 2025-06-03 4:46 ` Mario Limonciello 2025-06-03 15:50 ` Nirujogi, Pratap 2025-06-03 7:15 ` Ilpo Järvinen 2025-06-03 15:50 ` Nirujogi, Pratap
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox