* [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions
@ 2024-08-14 12:16 Richard Fitzgerald
2024-08-14 13:43 ` Takashi Iwai
2024-08-14 17:50 ` Wolfram Sang
0 siblings, 2 replies; 6+ messages in thread
From: Richard Fitzgerald @ 2024-08-14 12:16 UTC (permalink / raw)
To: wsa+renesas, tiwai
Cc: linux-sound, linux-i2c, linux-kernel, patches, kernel test robot
Replace IS_ENABLED() with IS_REACHABLE() to substitute empty stubs for:
i2c_acpi_get_i2c_resource()
i2c_acpi_client_count()
i2c_acpi_find_bus_speed()
i2c_acpi_new_device_by_fwnode()
i2c_adapter *i2c_acpi_find_adapter_by_handle()
i2c_acpi_waive_d0_probe()
commit f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI
functions") partially fixed this conditional to depend on CONFIG_I2C,
but used IS_ENABLED(), which is wrong since CONFIG_I2C is tristate.
CONFIG_ACPI is boolean but let's also change it to use IS_REACHABLE()
to future-proof it against becoming tristate.
Somehow despite testing various combinations of CONFIG_I2C and CONFIG_ACPI
we missed the combination CONFIG_I2C=m, CONFIG_ACPI=y.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/
---
include/linux/i2c.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 7eedd0c662da..377def497298 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -1066,7 +1066,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
struct acpi_resource;
struct acpi_resource_i2c_serialbus;
-#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
+#if IS_REACHABLE(CONFIG_ACPI) && IS_REACHABLE(CONFIG_I2C)
bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
struct acpi_resource_i2c_serialbus **i2c);
int i2c_acpi_client_count(struct acpi_device *adev);
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions
2024-08-14 12:16 [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions Richard Fitzgerald
@ 2024-08-14 13:43 ` Takashi Iwai
2024-08-14 14:00 ` Wolfram Sang
2024-08-14 17:50 ` Wolfram Sang
1 sibling, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2024-08-14 13:43 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: wsa+renesas, tiwai, linux-sound, linux-i2c, linux-kernel, patches,
kernel test robot
On Wed, 14 Aug 2024 14:16:49 +0200,
Richard Fitzgerald wrote:
>
> Replace IS_ENABLED() with IS_REACHABLE() to substitute empty stubs for:
> i2c_acpi_get_i2c_resource()
> i2c_acpi_client_count()
> i2c_acpi_find_bus_speed()
> i2c_acpi_new_device_by_fwnode()
> i2c_adapter *i2c_acpi_find_adapter_by_handle()
> i2c_acpi_waive_d0_probe()
>
> commit f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI
> functions") partially fixed this conditional to depend on CONFIG_I2C,
> but used IS_ENABLED(), which is wrong since CONFIG_I2C is tristate.
>
> CONFIG_ACPI is boolean but let's also change it to use IS_REACHABLE()
> to future-proof it against becoming tristate.
>
> Somehow despite testing various combinations of CONFIG_I2C and CONFIG_ACPI
> we missed the combination CONFIG_I2C=m, CONFIG_ACPI=y.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/
I suppose Wolfram will take this?
Reviewed-by: Takashi Iwai <tiwai@suse.de>
thanks,
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions
2024-08-14 13:43 ` Takashi Iwai
@ 2024-08-14 14:00 ` Wolfram Sang
2024-08-14 14:07 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2024-08-14 14:00 UTC (permalink / raw)
To: Takashi Iwai
Cc: Richard Fitzgerald, tiwai, linux-sound, linux-i2c, linux-kernel,
patches, kernel test robot
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
> > Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> > Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/
>
> I suppose Wolfram will take this?
>
> Reviewed-by: Takashi Iwai <tiwai@suse.de>
Yes, for rc4. I wonder why buildbot did not spot it for the branch I
submitted to rc3. Things happen, I guess...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions
2024-08-14 14:00 ` Wolfram Sang
@ 2024-08-14 14:07 ` Takashi Iwai
2024-08-14 15:41 ` Wolfram Sang
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2024-08-14 14:07 UTC (permalink / raw)
To: Wolfram Sang
Cc: Takashi Iwai, Richard Fitzgerald, tiwai, linux-sound, linux-i2c,
linux-kernel, patches, kernel test robot
On Wed, 14 Aug 2024 16:00:24 +0200,
Wolfram Sang wrote:
>
>
> > > Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> > > Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions")
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/
> >
> > I suppose Wolfram will take this?
> >
> > Reviewed-by: Takashi Iwai <tiwai@suse.de>
>
> Yes, for rc4. I wonder why buildbot did not spot it for the branch I
> submitted to rc3. Things happen, I guess...
Maybe because there was no user that can hit with randconfig.
It was a preliminary fix for the change I recently put after the rc3
release, and now it surfaced.
thanks,
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions
2024-08-14 14:07 ` Takashi Iwai
@ 2024-08-14 15:41 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2024-08-14 15:41 UTC (permalink / raw)
To: Takashi Iwai
Cc: Richard Fitzgerald, tiwai, linux-sound, linux-i2c, linux-kernel,
patches, kernel test robot
[-- Attachment #1: Type: text/plain, Size: 141 bytes --]
> It was a preliminary fix for the change I recently put after the rc3
> release, and now it surfaced.
Ah, that's an explanation. Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions
2024-08-14 12:16 [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions Richard Fitzgerald
2024-08-14 13:43 ` Takashi Iwai
@ 2024-08-14 17:50 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2024-08-14 17:50 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: tiwai, linux-sound, linux-i2c, linux-kernel, patches,
kernel test robot
[-- Attachment #1: Type: text/plain, Size: 1184 bytes --]
On Wed, Aug 14, 2024 at 01:16:49PM +0100, Richard Fitzgerald wrote:
> Replace IS_ENABLED() with IS_REACHABLE() to substitute empty stubs for:
> i2c_acpi_get_i2c_resource()
> i2c_acpi_client_count()
> i2c_acpi_find_bus_speed()
> i2c_acpi_new_device_by_fwnode()
> i2c_adapter *i2c_acpi_find_adapter_by_handle()
> i2c_acpi_waive_d0_probe()
>
> commit f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI
> functions") partially fixed this conditional to depend on CONFIG_I2C,
> but used IS_ENABLED(), which is wrong since CONFIG_I2C is tristate.
>
> CONFIG_ACPI is boolean but let's also change it to use IS_REACHABLE()
> to future-proof it against becoming tristate.
>
> Somehow despite testing various combinations of CONFIG_I2C and CONFIG_ACPI
> we missed the combination CONFIG_I2C=m, CONFIG_ACPI=y.
>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Fixes: f17c06c6608a ("i2c: Fix conditional for substituting empty ACPI functions")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202408141333.gYnaitcV-lkp@intel.com/
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-08-14 17:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 12:16 [PATCH] i2c: Use IS_REACHABLE() for substituting empty ACPI functions Richard Fitzgerald
2024-08-14 13:43 ` Takashi Iwai
2024-08-14 14:00 ` Wolfram Sang
2024-08-14 14:07 ` Takashi Iwai
2024-08-14 15:41 ` Wolfram Sang
2024-08-14 17:50 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).