From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C833C2D0EB for ; Sun, 29 Mar 2020 10:08:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C2E12073B for ; Sun, 29 Mar 2020 10:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbgC2KIS (ORCPT ); Sun, 29 Mar 2020 06:08:18 -0400 Received: from saturn.retrosnub.co.uk ([46.235.226.198]:51096 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726087AbgC2KIS (ORCPT ); Sun, 29 Mar 2020 06:08:18 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) by saturn.retrosnub.co.uk (Postfix; Retrosnub mail submission) with ESMTPSA id 78F109E78E5; Sun, 29 Mar 2020 11:08:14 +0100 (BST) Date: Sun, 29 Mar 2020 11:08:12 +0100 From: Jonathan Cameron To: "Ardelean, Alexandru" Cc: "lars@metafoo.de" , "knaack.h@gmx.de" , "pmeerw@pmeerw.net" , "linux-iio@vger.kernel.org" Subject: Re: [PATCH] iio: dma-buffer: Cleanup buffer.h/buffer_impl.h includes Message-ID: <20200329110812.6ec65bde@archlinux> In-Reply-To: <20200328164335.064d8c02@archlinux> References: <20200324141624.30597-1-lars@metafoo.de> <9f86acf4eb5a3bea823797705108e16949e89e34.camel@analog.com> <20200328164335.064d8c02@archlinux> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sat, 28 Mar 2020 16:43:35 +0000 Jonathan Cameron wrote: > On Tue, 24 Mar 2020 14:36:17 +0000 > "Ardelean, Alexandru" wrote: > > > On Tue, 2020-03-24 at 15:16 +0100, 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 and > > > industrialio-buffer-dmaengine.c can be removed since those files don't > > > reference any of buffer consumer functions. > > > > Reviewed-by: Alexandru Ardelean > > > Applied to the togreg branch of iio.git and pushed out as testing. And reverted again. The usecase that was introduced in another path meant this finally got built in my tests and this patch broke it :( Seems we use iio_buffer_set_attrs in the dmaengine buffer and that's in buffer.h. I haven't looked to see how to fix this (e.g. can we just move that definition to buffer_impl). Jonathan > > Thanks > > Jonathan > > > > > > > Signed-off-by: Lars-Peter Clausen > > > --- > > > drivers/iio/buffer/industrialio-buffer-dma.c | 1 - > > > drivers/iio/buffer/industrialio-buffer-dmaengine.c | 1 - > > > include/linux/iio/buffer-dma.h | 2 +- > > > 3 files changed, 1 insertion(+), 3 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 > > > #include > > > #include > > > -#include > > > #include > > > #include > > > #include > > > diff --git a/drivers/iio/buffer/industrialio-buffer-dmaengine.c > > > b/drivers/iio/buffer/industrialio-buffer-dmaengine.c > > > index b129693af0fd..8b60dff527c8 100644 > > > --- a/drivers/iio/buffer/industrialio-buffer-dmaengine.c > > > +++ b/drivers/iio/buffer/industrialio-buffer-dmaengine.c > > > @@ -14,7 +14,6 @@ > > > > > > #include > > > #include > > > -#include > > > #include > > > #include > > > #include > > > 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 > > > #include > > > #include > > > -#include > > > +#include > > > > > > struct iio_dma_buffer_queue; > > > struct iio_dma_buffer_ops; >