]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpu: host1x: Fix missing 'host1x_context_device_bus_type'
authorBen Dooks <ben.dooks@codethink.co.uk>
Fri, 9 Jan 2026 12:45:07 +0000 (12:45 +0000)
committerThierry Reding <treding@nvidia.com>
Thu, 28 May 2026 15:19:30 +0000 (17:19 +0200)
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 definitions in the kernel because the extern
declaration was missing the const qualifier.

Include linux/host1x_context_bus.h and drop the wrong declaration from
context.h. While at it, also predeclare struct host1x_memory_context.

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>
[treding@nvidia.com: minor fixups, reword commit message to reflect changes]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260123140512.609167-1-ben.dooks@codethink.co.uk
drivers/gpu/host1x/context.c
drivers/gpu/host1x/context.h
drivers/gpu/host1x/context_bus.c

index d50d41c205617880853800eb720507852cf4e156..512f3d189ebfe519ef25139b3f9bdad4ef9d247d 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/host1x_context_bus.h>
 #include <linux/kref.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
index 3e03bc1d3bac324671a68961d3bdd82e679304f3..5ab5be1a6c6386d2fa56a92109948ad84a60843d 100644 (file)
@@ -12,8 +12,7 @@
 #include <linux/refcount.h>
 
 struct host1x;
-
-extern struct bus_type host1x_context_device_bus_type;
+struct host1x_memory_context;
 
 struct host1x_memory_context_list {
        struct mutex lock;
index 7cd0e1a5edd1b50858739f1bfaab7965110a1deb..398d56e94c732f255b8e839ea95296cd9b9cf7b3 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/host1x_context_bus.h>
 #include <linux/of.h>
 
 const struct bus_type host1x_context_device_bus_type = {