mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ben Dooks <ben.dooks@codethink.co.uk>,
	linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Cc: simona@ffwll.ch, airlied@gmail.com, mperttunen@nvidia.com,
	thierry.reding@gmail.com, Ben Dooks <ben.dooks@codethink.co.uk>
Subject: Re: [PATCH] gpu: host1x: fix missing 'host1x_context_device_bus_type'
Date: Fri, 09 Jan 2026 14:52:51 +0200	[thread overview]
Message-ID: <48679d960d98c3134e5a3fcc6c6238c66f0b61af@intel.com> (raw)
In-Reply-To: <20260109124507.403728-1-ben.dooks@codethink.co.uk>

On Fri, 09 Jan 2026, Ben Dooks <ben.dooks@codethink.co.uk> 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
>
> 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?
>
> Fixes: 3d70eb8e60c6d009c988 ("gpu: host1x: Make host1x_context_device_bus_type constant")
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  drivers/gpu/host1x/context.h     | 3 +--
>  drivers/gpu/host1x/context_bus.c | 2 ++
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/host1x/context.h b/drivers/gpu/host1x/context.h
> index 3e03bc1d3bac..5215922905ed 100644
> --- a/drivers/gpu/host1x/context.h
> +++ b/drivers/gpu/host1x/context.h
> @@ -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;
> diff --git a/drivers/gpu/host1x/context_bus.c b/drivers/gpu/host1x/context_bus.c
> index 7cd0e1a5edd1..89f61b1f7d33 100644
> --- a/drivers/gpu/host1x/context_bus.c
> +++ b/drivers/gpu/host1x/context_bus.c
> @@ -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.

> +
>  const struct bus_type host1x_context_device_bus_type = {
>  	.name = "host1x-context",
>  };

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-01-09 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 12:45 Ben Dooks
2026-01-09 12:52 ` Jani Nikula [this message]
2026-01-09 13:41   ` Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48679d960d98c3134e5a3fcc6c6238c66f0b61af@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®