RE: [PATCH] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lars,
> -----Original Message-----
> From: linux-iio-owner@xxxxxxxxxxxxxxx <linux-iio-owner@xxxxxxxxxxxxxxx> On
> Behalf Of Lars-Peter Clausen
> Sent: Dienstag, 24. März 2020 15:16
> To: Jonathan Cameron <jic23@xxxxxxxxxx>
> Cc: Hartmut Knaack <knaack.h@xxxxxx>; Peter Meerwald-Stadler
> <pmeerw@xxxxxxxxxx>; Ardelean, Alexandru
> <alexandru.Ardelean@xxxxxxxxxx>; linux-iio@xxxxxxxxxxxxxxx; Lars-Peter
> Clausen <lars@xxxxxxxxxx>
> Subject: [PATCH] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes
> 
> The IIO DMA buffer is a DMA buffer implementation. As such it should
> include buffer_impl.h rather than buffer.h.
> 
> The include to buffer.h in buffer-dma.h should be buffer_impl.h so it has
> access to the struct iio_buffer definition. The code currently only works
> because all places that use buffer-dma.h include buffer_impl.h before it.
> 
> The include to buffer.h in industrialio-buffer-dma.c and
> industrialio-buffer-dmaengine.c can be removed since those files don't
> reference any of buffer consumer functions.
> 

I also came across with this in ADI internal tree. Did you considered to also split buffer_dma.h into a public
and an impl header? Hence, users of buffer_dma do not get access to the internals of buffer.h? That was the
approach I suggested in our tree since the split of buffer and buffer_impl is exactly for users not to
know about the internals...

Or do you think that it's not worth it to go over this split in buffer_dma?

- Nuno Sá 







[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux