mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	hch@lst.de, m.szyprowski@samsung.com
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux.dev
Subject: Re: [PATCH] dma-debug: make dma_debug_add_bus take a const pointer
Date: Tue, 19 Dec 2023 14:27:52 +0000	[thread overview]
Message-ID: <ef4fa484-5925-41b1-ace6-db14820c9c2e@arm.com> (raw)
In-Reply-To: <2023121941-dejected-nugget-681e@gregkh>

On 2023-12-19 1:41 pm, Greg Kroah-Hartman wrote:
> The driver core now can handle a const struct bus_type pointer, and the
> dma_debug_add_bus() call just passes on the pointer give to it to the
> driver core, so make this pointer const as well to allow everyone to use
> read-only struct bus_type pointers going forward.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>

> Cc: Christoph Hellwig <hch@lst.de>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> Cc: iommu@lists.linux.dev
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>   include/linux/dma-map-ops.h | 4 ++--
>   kernel/dma/debug.c          | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h
> index f2fc203fb8a1..e401f824a007 100644
> --- a/include/linux/dma-map-ops.h
> +++ b/include/linux/dma-map-ops.h
> @@ -443,10 +443,10 @@ static inline void arch_teardown_dma_ops(struct device *dev)
>   #endif /* CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS */
>   
>   #ifdef CONFIG_DMA_API_DEBUG
> -void dma_debug_add_bus(struct bus_type *bus);
> +void dma_debug_add_bus(const struct bus_type *bus);
>   void debug_dma_dump_mappings(struct device *dev);
>   #else
> -static inline void dma_debug_add_bus(struct bus_type *bus)
> +static inline void dma_debug_add_bus(const struct bus_type *bus)
>   {
>   }
>   static inline void debug_dma_dump_mappings(struct device *dev)
> diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
> index 3de494375b7b..1a5c86dd87d5 100644
> --- a/kernel/dma/debug.c
> +++ b/kernel/dma/debug.c
> @@ -876,7 +876,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti
>   	return 0;
>   }
>   
> -void dma_debug_add_bus(struct bus_type *bus)
> +void dma_debug_add_bus(const struct bus_type *bus)
>   {
>   	struct notifier_block *nb;
>   

      parent reply	other threads:[~2023-12-19 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 13:41 Greg Kroah-Hartman
2023-12-19 13:46 ` Christoph Hellwig
2023-12-19 14:27 ` Robin Murphy [this message]

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=ef4fa484-5925-41b1-ace6-db14820c9c2e@arm.com \
    --to=robin.murphy@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.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®