* [PATCH v2] gpu: host1x: fix missing 'host1x_context_device_bus_type'
@ 2026-01-23 14:05 Ben Dooks
2026-01-24 1:20 ` Mikko Perttunen
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2026-01-23 14:05 UTC (permalink / raw)
To: linux-tegra, dri-devel, simona, airlied, mperttunen,
thierry.reding
Cc: linux-kernel, Ben Dooks
The drivers/gpu/host1x/context_bus.c does not include
any declaration of host1x_context_device_bus_type, and
after including "context.h" it also showed that there
are two definitons in the kernel, so fix those two
Fix by removing the definition in context.h and include
<linux/host1x_context_bus.h> in context_bus.c
Fixes the following sparse warning:
drivers/gpu/host1x/context_bus.c:9:23: warning: symbol 'host1x_context_device_bus_type' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
--
v2:
- removed fixes line
- changed to include into the c files directly
---
drivers/gpu/host1x/context.c | 1 +
drivers/gpu/host1x/context.h | 2 --
drivers/gpu/host1x/context_bus.c | 1 +
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/host1x/context.c b/drivers/gpu/host1x/context.c
index a6f6779662a3..476e8c5e1297 100644
--- a/drivers/gpu/host1x/context.c
+++ b/drivers/gpu/host1x/context.c
@@ -12,6 +12,7 @@
#include "context.h"
#include "dev.h"
+#include <linux/host1x_context_bus.h>
static void host1x_memory_context_release(struct device *dev)
{
diff --git a/drivers/gpu/host1x/context.h b/drivers/gpu/host1x/context.h
index 3e03bc1d3bac..78bcf08cc90a 100644
--- a/drivers/gpu/host1x/context.h
+++ b/drivers/gpu/host1x/context.h
@@ -13,8 +13,6 @@
struct host1x;
-extern struct bus_type host1x_context_device_bus_type;
-
struct host1x_memory_context_list {
struct mutex lock;
struct host1x_memory_context *devs;
diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
index 7cd0e1a5edd1..c0ba0433c686 100644
--- a/drivers/gpu/host1x/context_bus.c
+++ b/drivers/gpu/host1x/context_bus.c
@@ -5,6 +5,7 @@
#include <linux/device.h>
#include <linux/of.h>
+#include <linux/host1x_context_bus.h>
const struct bus_type host1x_context_device_bus_type = {
.name = "host1x-context",
--
2.37.2.352.g3c44437643
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] gpu: host1x: fix missing 'host1x_context_device_bus_type'
2026-01-23 14:05 [PATCH v2] gpu: host1x: fix missing 'host1x_context_device_bus_type' Ben Dooks
@ 2026-01-24 1:20 ` Mikko Perttunen
0 siblings, 0 replies; 2+ messages in thread
From: Mikko Perttunen @ 2026-01-24 1:20 UTC (permalink / raw)
To: linux-tegra, dri-devel, simona, airlied, thierry.reding,
Ben Dooks
Cc: linux-kernel, Ben Dooks
On Friday, January 23, 2026 11:05 PM Ben Dooks wrote:
> The drivers/gpu/host1x/context_bus.c does not include
> any declaration of host1x_context_device_bus_type, and
> after including "context.h" it also showed that there
> are two definitons in the kernel, so fix those two
>
> Fix by removing the definition in context.h and include
> <linux/host1x_context_bus.h> in context_bus.c
>
> Fixes the following sparse warning:
> drivers/gpu/host1x/context_bus.c:9:23: warning: symbol 'host1x_context_device_bus_type' was not declared. Should it be static?
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> --
> v2:
> - removed fixes line
> - changed to include into the c files directly
> ---
> drivers/gpu/host1x/context.c | 1 +
> drivers/gpu/host1x/context.h | 2 --
> drivers/gpu/host1x/context_bus.c | 1 +
> 3 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/host1x/context.c b/drivers/gpu/host1x/context.c
> index a6f6779662a3..476e8c5e1297 100644
> --- a/drivers/gpu/host1x/context.c
> +++ b/drivers/gpu/host1x/context.c
> @@ -12,6 +12,7 @@
>
> #include "context.h"
> #include "dev.h"
> +#include <linux/host1x_context_bus.h>
Both this and the #include below are sorted incorrectly (should be within the linux/ block of includes and alphabetically sorted). Otherwise looks good.
Mikko
>
> static void host1x_memory_context_release(struct device *dev)
> {
> diff --git a/drivers/gpu/host1x/context.h b/drivers/gpu/host1x/context.h
> index 3e03bc1d3bac..78bcf08cc90a 100644
> --- a/drivers/gpu/host1x/context.h
> +++ b/drivers/gpu/host1x/context.h
> @@ -13,8 +13,6 @@
>
> struct host1x;
>
> -extern struct bus_type host1x_context_device_bus_type;
> -
> struct host1x_memory_context_list {
> struct mutex lock;
> struct host1x_memory_context *devs;
> diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
> index 7cd0e1a5edd1..c0ba0433c686 100644
> --- a/drivers/gpu/host1x/context_bus.c
> +++ b/drivers/gpu/host1x/context_bus.c
> @@ -5,6 +5,7 @@
>
> #include <linux/device.h>
> #include <linux/of.h>
> +#include <linux/host1x_context_bus.h>
>
> const struct bus_type host1x_context_device_bus_type = {
> .name = "host1x-context",
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-24 1:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 14:05 [PATCH v2] gpu: host1x: fix missing 'host1x_context_device_bus_type' Ben Dooks
2026-01-24 1:20 ` Mikko Perttunen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox