* [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes
@ 2020-04-01 16:57 Lars-Peter Clausen
2020-04-02 15:13 ` Ardelean, Alexandru
2020-04-05 11:59 ` Jonathan Cameron
0 siblings, 2 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2020-04-01 16:57 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Peter Meerwald-Stadler, Alexandru Ardelean,
linux-iio, Lars-Peter Clausen
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 can be removed since
those file does not reference any of buffer consumer functions.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
Changes since v1:
* Don't remove buffer.h include in buffer-dma.h since it is needed
after all.
---
drivers/iio/buffer/industrialio-buffer-dma.c | 1 -
include/linux/iio/buffer-dma.h | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c b/drivers/iio/buffer/industrialio-buffer-dma.c
index a74bd9c0587c..d348af8b9705 100644
--- a/drivers/iio/buffer/industrialio-buffer-dma.c
+++ b/drivers/iio/buffer/industrialio-buffer-dma.c
@@ -12,7 +12,6 @@
#include <linux/mutex.h>
#include <linux/sched.h>
#include <linux/poll.h>
-#include <linux/iio/buffer.h>
#include <linux/iio/buffer_impl.h>
#include <linux/iio/buffer-dma.h>
#include <linux/dma-mapping.h>
diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h
index 016d8a068353..ff15c61bf319 100644
--- a/include/linux/iio/buffer-dma.h
+++ b/include/linux/iio/buffer-dma.h
@@ -11,7 +11,7 @@
#include <linux/kref.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
-#include <linux/iio/buffer.h>
+#include <linux/iio/buffer_impl.h>
struct iio_dma_buffer_queue;
struct iio_dma_buffer_ops;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes
2020-04-01 16:57 [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes Lars-Peter Clausen
@ 2020-04-02 15:13 ` Ardelean, Alexandru
2020-04-05 11:52 ` Jonathan Cameron
2020-04-05 11:59 ` Jonathan Cameron
1 sibling, 1 reply; 4+ messages in thread
From: Ardelean, Alexandru @ 2020-04-02 15:13 UTC (permalink / raw)
To: jic23, lars; +Cc: knaack.h, pmeerw, linux-iio
On Wed, 2020-04-01 at 18:57 +0200, Lars-Peter Clausen wrote:
> [External]
>
> 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 can be removed since
> those file does not reference any of buffer consumer functions.
>
Tested-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> Changes since v1:
> * Don't remove buffer.h include in buffer-dma.h since it is needed
> after all.
> ---
> drivers/iio/buffer/industrialio-buffer-dma.c | 1 -
> include/linux/iio/buffer-dma.h | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c
> b/drivers/iio/buffer/industrialio-buffer-dma.c
> index a74bd9c0587c..d348af8b9705 100644
> --- a/drivers/iio/buffer/industrialio-buffer-dma.c
> +++ b/drivers/iio/buffer/industrialio-buffer-dma.c
> @@ -12,7 +12,6 @@
> #include <linux/mutex.h>
> #include <linux/sched.h>
> #include <linux/poll.h>
> -#include <linux/iio/buffer.h>
> #include <linux/iio/buffer_impl.h>
> #include <linux/iio/buffer-dma.h>
> #include <linux/dma-mapping.h>
> diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h
> index 016d8a068353..ff15c61bf319 100644
> --- a/include/linux/iio/buffer-dma.h
> +++ b/include/linux/iio/buffer-dma.h
> @@ -11,7 +11,7 @@
> #include <linux/kref.h>
> #include <linux/spinlock.h>
> #include <linux/mutex.h>
> -#include <linux/iio/buffer.h>
> +#include <linux/iio/buffer_impl.h>
>
> struct iio_dma_buffer_queue;
> struct iio_dma_buffer_ops;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes
2020-04-02 15:13 ` Ardelean, Alexandru
@ 2020-04-05 11:52 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2020-04-05 11:52 UTC (permalink / raw)
To: Ardelean, Alexandru; +Cc: lars, knaack.h, pmeerw, linux-iio
On Thu, 2 Apr 2020 15:13:12 +0000
"Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:
> On Wed, 2020-04-01 at 18:57 +0200, Lars-Peter Clausen wrote:
> > [External]
> >
> > 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 can be removed since
> > those file does not reference any of buffer consumer functions.
> >
>
> Tested-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.
Thanks,
Jonathan
>
> > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> > ---
> > Changes since v1:
> > * Don't remove buffer.h include in buffer-dma.h since it is needed
> > after all.
> > ---
> > drivers/iio/buffer/industrialio-buffer-dma.c | 1 -
> > include/linux/iio/buffer-dma.h | 2 +-
> > 2 files changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c
> > b/drivers/iio/buffer/industrialio-buffer-dma.c
> > index a74bd9c0587c..d348af8b9705 100644
> > --- a/drivers/iio/buffer/industrialio-buffer-dma.c
> > +++ b/drivers/iio/buffer/industrialio-buffer-dma.c
> > @@ -12,7 +12,6 @@
> > #include <linux/mutex.h>
> > #include <linux/sched.h>
> > #include <linux/poll.h>
> > -#include <linux/iio/buffer.h>
> > #include <linux/iio/buffer_impl.h>
> > #include <linux/iio/buffer-dma.h>
> > #include <linux/dma-mapping.h>
> > diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h
> > index 016d8a068353..ff15c61bf319 100644
> > --- a/include/linux/iio/buffer-dma.h
> > +++ b/include/linux/iio/buffer-dma.h
> > @@ -11,7 +11,7 @@
> > #include <linux/kref.h>
> > #include <linux/spinlock.h>
> > #include <linux/mutex.h>
> > -#include <linux/iio/buffer.h>
> > +#include <linux/iio/buffer_impl.h>
> >
> > struct iio_dma_buffer_queue;
> > struct iio_dma_buffer_ops;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes
2020-04-01 16:57 [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes Lars-Peter Clausen
2020-04-02 15:13 ` Ardelean, Alexandru
@ 2020-04-05 11:59 ` Jonathan Cameron
1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2020-04-05 11:59 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Hartmut Knaack, Peter Meerwald-Stadler, Alexandru Ardelean, linux-iio
On Wed, 1 Apr 2020 18:57:06 +0200
Lars-Peter Clausen <lars@metafoo.de> wrote:
> 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 can be removed since
> those file does not reference any of buffer consumer functions.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied.
Thanks,
Jonathan
> ---
> Changes since v1:
> * Don't remove buffer.h include in buffer-dma.h since it is needed
> after all.
> ---
> drivers/iio/buffer/industrialio-buffer-dma.c | 1 -
> include/linux/iio/buffer-dma.h | 2 +-
> 2 files changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/buffer/industrialio-buffer-dma.c b/drivers/iio/buffer/industrialio-buffer-dma.c
> index a74bd9c0587c..d348af8b9705 100644
> --- a/drivers/iio/buffer/industrialio-buffer-dma.c
> +++ b/drivers/iio/buffer/industrialio-buffer-dma.c
> @@ -12,7 +12,6 @@
> #include <linux/mutex.h>
> #include <linux/sched.h>
> #include <linux/poll.h>
> -#include <linux/iio/buffer.h>
> #include <linux/iio/buffer_impl.h>
> #include <linux/iio/buffer-dma.h>
> #include <linux/dma-mapping.h>
> diff --git a/include/linux/iio/buffer-dma.h b/include/linux/iio/buffer-dma.h
> index 016d8a068353..ff15c61bf319 100644
> --- a/include/linux/iio/buffer-dma.h
> +++ b/include/linux/iio/buffer-dma.h
> @@ -11,7 +11,7 @@
> #include <linux/kref.h>
> #include <linux/spinlock.h>
> #include <linux/mutex.h>
> -#include <linux/iio/buffer.h>
> +#include <linux/iio/buffer_impl.h>
>
> struct iio_dma_buffer_queue;
> struct iio_dma_buffer_ops;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-05 11:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 16:57 [PATCH v2] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes Lars-Peter Clausen
2020-04-02 15:13 ` Ardelean, Alexandru
2020-04-05 11:52 ` Jonathan Cameron
2020-04-05 11:59 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).