From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Appana Durga Kedareswara Rao <appana.durga.rao@xilinx.com>
Cc: "vinod.koul@intel.com" <vinod.koul@intel.com>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Anirudha Sarangi <anirudh@xilinx.com>
Subject: Re: [PATCH] dma: vdma: Fix compilation warnings
Date: Tue, 31 Mar 2015 00:10:50 +1100 [thread overview]
Message-ID: <20150331001050.37edbd32@canb.auug.org.au> (raw)
In-Reply-To: <BL2FFO11FD0547729E39ACFCB0A988C88A1F50@BL2FFO11FD054.protection.gbl>
[-- Attachment #1: Type: text/plain, Size: 1798 bytes --]
Hi Appana,
On Mon, 30 Mar 2015 11:40:02 +0000 Appana Durga Kedareswara Rao <appana.durga.rao@xilinx.com> wrote:
>
> > -----Original Message-----
> > From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> > Sent: Monday, March 30, 2015 3:06 PM
> > To: Appana Durga Kedareswara Rao
> > Cc: vinod.koul@intel.com; linux-next@vger.kernel.org; linux-
> > kernel@vger.kernel.org; Anirudha Sarangi; Appana Durga Kedareswara Rao
> > Subject: Re: [PATCH] dma: vdma: Fix compilation warnings
> >
> > Hi Kedareswara,
> >
> > On Mon, 30 Mar 2015 14:30:26 +0530 Kedareswara rao Appana
> > <appana.durga.rao@xilinx.com> wrote:
> > >
> > > diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h index
> > > 022e34f..01c91bb 100644
> > > --- a/include/linux/dmapool.h
> > > +++ b/include/linux/dmapool.h
> > > @@ -13,6 +13,7 @@
> > >
> > > #include <asm/io.h>
> > > #include <asm/scatterlist.h>
> > > +#include <linux/device.h>
> > >
> > > struct dma_pool *dma_pool_create(const char *name, struct device *dev,
> > > size_t size, size_t align, size_t allocation);
> >
> > This might be to much, all it really needs is a
> >
> > struct device;
> >
> > line ...
>
> Why it is a better solution rather than including header file?
> I didn't get you could you please explain a bit.
When adding an include to an include file, there is always the chance
that you may create a circular include and break some other unrelated
code. In this case the far more unintrusive fix is to just add the
forward declaration of the struct to satisfy the compiler as the actual
definition of the struct is not needed (since only pointers to the
struct are referenced in dmapool.h).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-03-30 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 9:00 [PATCH] dma: vdma: Fix compilation warnings Kedareswara rao Appana
2015-03-30 9:36 ` Stephen Rothwell
2015-03-30 11:40 ` Appana Durga Kedareswara Rao
2015-03-30 13:10 ` Stephen Rothwell [this message]
2015-03-30 13:18 ` Appana Durga Kedareswara Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150331001050.37edbd32@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=anirudh@xilinx.com \
--cc=appana.durga.rao@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox