public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/testing/cxl: Use dev_is_platform()
@ 2024-08-27  9:51 Kunwu Chan
  2024-08-27 11:15 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Kunwu Chan @ 2024-08-27  9:51 UTC (permalink / raw)
  To: dave, jonathan.cameron, dave.jiang, alison.schofield,
	vishal.l.verma, ira.weiny, dan.j.williams
  Cc: linux-cxl, linux-kernel, Kunwu Chan

From: Kunwu Chan <chentao@kylinos.cn>

Use dev_is_platform() instead of checking bus type directly.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
 tools/testing/cxl/mock_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/cxl/mock_acpi.c b/tools/testing/cxl/mock_acpi.c
index 55813de26d46..8da94378ccec 100644
--- a/tools/testing/cxl/mock_acpi.c
+++ b/tools/testing/cxl/mock_acpi.c
@@ -18,7 +18,7 @@ struct acpi_device *to_cxl_host_bridge(struct device *host, struct device *dev)
 		goto out;
 	}
 
-	if (dev->bus == &platform_bus_type)
+	if (dev_is_platform(dev))
 		goto out;
 
 	adev = to_acpi_device(dev);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/testing/cxl: Use dev_is_platform()
  2024-08-27  9:51 [PATCH] tools/testing/cxl: Use dev_is_platform() Kunwu Chan
@ 2024-08-27 11:15 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2024-08-27 11:15 UTC (permalink / raw)
  To: Kunwu Chan
  Cc: dave, dave.jiang, alison.schofield, vishal.l.verma, ira.weiny,
	dan.j.williams, linux-cxl, linux-kernel, Kunwu Chan

On Tue, 27 Aug 2024 17:51:23 +0800
Kunwu Chan <kunwu.chan@linux.dev> wrote:

> From: Kunwu Chan <chentao@kylinos.cn>
> 
> Use dev_is_platform() instead of checking bus type directly.
> 
> Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-27 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27  9:51 [PATCH] tools/testing/cxl: Use dev_is_platform() Kunwu Chan
2024-08-27 11:15 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox