gpu: host1x: fix missing 'host1x_context_device_bus_type'
PATCH 1/1 gpu: host1x: fix missing 'host1x_context_device_bus_type'
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
Change context.h to include the correct definiton of host1x_context_device_bus_type by including <linux/host1x_context_bus.h> in context.h
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?
--- drivers/gpu/host1x/context.h | 3 +-- drivers/gpu/host1x/context_bus.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/host1x/context.h +1 -2
@@ -10,11 +10,10 @@#include <linux/mutex.h> #include <linux/refcount.h> +#include <linux/host1x_context_bus.h> struct host1x ; -extern struct bus_type host1x_context_device_bus_type; -struct host1x_memory_context_list {struct mutex lock;struct host1x_memory_context *devs;
drivers/gpu/host1x/context_bus.c +2 -0
@@ -6,6 +6,8 @@#include <linux/device.h> #include <linux/of.h> +#include "context.h" +const struct bus_type host1x_context_device_bus_type = { .name ="host1x-context" , };
Signature · 1 line
2.37.2.352.g3c44437643
Quoted 41 lines · Ben Dooks
The
drivers/gpu/host1x/context_bus.cdoes not include any declaration ofhost1x_context_device_bus_type, and after including "context.h" it also showed that there are two definitons in the kernel, so fix those twoChange
context.hto include the correct definiton ofhost1x_context_device_bus_typeby including <linux/host1x_context_bus.h> incontext.hFixes 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?Fixes 3d70eb8e60c6d009c988 ("gpu: host1x: Make host1x_context_device_bus_type constant")Signed-off-by Ben Dooks <[email protected]>--- drivers/gpu/host1x/context.h | 3 +-- drivers/gpu/host1x/context_bus.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-)drivers/gpu/host1x/context.h +1
-2@@ -10,11 +10,10 @@#include <linux/mutex.h> #include <linux/refcount.h> +#include <linux/host1x_context_bus.h> struct host1x ; -extern struct bus_type host1x_context_device_bus_type; -struct host1x_memory_context_list {struct mutex lock;struct host1x_memory_context *devs;drivers/gpu/host1x/context_bus.c +0
-0
drivers/gpu/host1x/context_bus.c line 9
Quoted 4 lines
drivers/gpu/host1x/context_bus.c +1
-0@@ -6,6 +6,8 @@#include <linux/device.h> #include <linux/of.h> +#include "context.h"
Shouldn't this and context.c just include <linux/host1x_context_bus.h>? context_bus.c doesn't need anything from context.h, and context.h doesn't really need <linux/host1x_context_bus.h> either.
BR,
Jani.
Quoted 4 lines
drivers/gpu/host1x/context_bus.c +1
-0+const struct bus_type host1x_context_device_bus_type = { .name ="host1x-context" , };
Signature · 1 line
Jani Nikula, Intel
Quoted 45 lines · Jani Nikula
Quoted 44 lines · Ben Dooks
The
drivers/gpu/host1x/context_bus.cdoes not include any declaration ofhost1x_context_device_bus_type, and after including "context.h" it also showed that there are two definitons in the kernel, so fix those twoChange
context.hto include the correct definiton ofhost1x_context_device_bus_typeby including <linux/host1x_context_bus.h> incontext.hFixes 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?Fixes 3d70eb8e60c6d009c988 ("gpu: host1x: Make host1x_context_device_bus_type constant")Signed-off-by Ben Dooks <[email protected]>--- drivers/gpu/host1x/context.h | 3 +-- drivers/gpu/host1x/context_bus.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-)drivers/gpu/host1x/context.h +1
-2@@ -10,11 +10,10 @@#include <linux/mutex.h> #include <linux/refcount.h> +#include <linux/host1x_context_bus.h> struct host1x ; -extern struct bus_type host1x_context_device_bus_type; -struct host1x_memory_context_list {struct mutex lock;struct host1x_memory_context *devs;drivers/gpu/host1x/context_bus.c +0
-0@@ -6,6 +6,8 @@#include <linux/device.h> #include <linux/of.h>
Quoted 5 lines
drivers/gpu/host1x/context_bus.c line 9
Quoted 1 line
drivers/gpu/host1x/context_bus.c +1
-0+#include "context.h" Shouldn't this and
context.cjust include <linux/host1x_context_bus.h>?context_bus.cdoesn't need anything fromcontext.h, andcontext.hdoesn't really need <linux/host1x_context_bus.h> either.
Possibly, removing the defn from context.h and doing that would work.
Quoted 8 lines
BR,
Jani.Quoted 4 lines
drivers/gpu/host1x/context_bus.c +1
-0+const struct bus_type host1x_context_device_bus_type = { .name ="host1x-context" , };
Signature · 4 lines
Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html