Re: [PATCH] driver core: platform: Allow using a dedicated dma_mask for platform_device

From: Greg Kroah-Hartman
Date: Sat Jun 29 2019 - 03:53:19 EST


On Fri, Jun 28, 2019 at 08:59:46AM -0700, Christoph Hellwig wrote:
> I'd much rather bite the bullet and make dev->dma_mask a scalar
> instead of a pointer. The pointer causes way to much boiler plate code,
> and the semantics are way to subtile. Below is a POV patch that
> compiles and boots with my usual x86 test config, and at least compiles
> with the arm and pmac32 defconfigs. It probably breaks just about
> everything else, but should give us an idea what is involve in the
> switch:
>
> ---
> >From ea73ba2d29f56ff6413066b10f018a671f2b26ac Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@xxxxxx>
> Date: Fri, 28 Jun 2019 16:24:01 +0200
> Subject: device.h: make dma_mask a scalar instead of a pointer
>
> Kill the dma_mask indirection to clean up the mess we acquired around
> it.

I have no objection to this at all. I would love to see the indirection
go away.

thanks,

greg k-h