[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ytg7U/+SX0LSAmku@ravnborg.org>
Date: Wed, 20 Jul 2022 19:28:51 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Danilo Krummrich <dakr@...hat.com>
Cc: daniel@...ll.ch, laurent.pinchart@...asonboard.com,
airlied@...ux.ie, tzimmermann@...e.de, mripard@...nel.org,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH drm-misc-next v5 3/4] drm/gem: rename struct
drm_gem_dma_object.{paddr => dma_addr}
On Wed, Jul 20, 2022 at 05:35:31PM +0200, Danilo Krummrich wrote:
> The field paddr of struct drm_gem_dma_object holds a DMA address, which
> might actually be a physical address. However, depending on the platform,
> it can also be a bus address or a virtual address managed by an IOMMU.
>
> Hence, rename the field to dma_addr, which is more applicable.
>
> In order to do this renaming the following coccinelle script was used:
>
> ```
> @@
> struct drm_gem_dma_object *gem;
> @@
>
> - gem->paddr
> + gem->dma_addr
>
> @@
> struct drm_gem_dma_object gem;
> @@
>
> - gem.paddr
> + gem.dma_addr
>
> @exists@
> typedef dma_addr_t;
> symbol paddr;
> @@
>
> dma_addr_t paddr;
> <...
> - paddr
> + dma_addr
> ...>
>
> @@
> symbol paddr;
> @@
> dma_addr_t
> - paddr
> + dma_addr
> ;
>
> ```
>
> This patch is compile-time tested with:
>
> ```
> make ARCH={x86_64,arm,arm64} allyesconfig
> make ARCH={x86_64,arm,arm64} drivers/gpu/drm`
> ```
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Danilo Krummrich <dakr@...hat.com>
Acked-by: Sam Ravnborg <sam@...nborg.org>
Powered by blists - more mailing lists