From: "sboyd@codeaurora.org" <sboyd@codeaurora.org> To: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "robh+dt@kernel.org" <robh+dt@kernel.org>, "mturquette@baylibre.com" <mturquette@baylibre.com>, "Vineet.Gupta1@synopsys.com" <Vineet.Gupta1@synopsys.com>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-snps-arc@lists.infradead.org" <linux-snps-arc@lists.infradead.org>, "CARLOS.PALMINHA@synopsys.com" <CARLOS.PALMINHA@synopsys.com>, "Jose.Abreu@synopsys.com" <Jose.Abreu@synopsys.com>, "linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org> Subject: Re: [RESEND PATCH v4] clk/axs10x: Add I2S PLL clock driver Date: Fri, 15 Apr 2016 16:38:58 -0700 [thread overview] Message-ID: <20160415233858.GA4690@codeaurora.org> (raw) In-Reply-To: <1460722116.3025.40.camel@synopsys.com> On 04/15, Alexey Brodkin wrote: > Hi Stephen, > > On Mon, 2016-04-11 at 15:03 -0700, sboyd@codeaurora.org wrote: > > On 04/11, Alexey Brodkin wrote: > > > > > > On Mon, 2016-04-11 at 11:41 +0100, Jose Abreu wrote: > > > > > > > > + * warranty of any kind, whether express or implied. > > > > + */ > > > > + > > > > +#include <linux/platform_device.h> > > > > +#include <linux/module.h> > > > > +#include <linux/clk-provider.h> > > > > +#include <linux/err.h> > > > > +#include <linux/device.h> > > > "linux/platform_device.h" includes "linux/device.h" so you may make this list of headers > > > a little bit shorter. > > > > > > > > > > > +#include <linux/of_address.h> > > > > +#include <linux/slab.h> > > > > +#include <linux/of.h> > > > "linux/of_address.h" already includes "linux/of.h". > > It's ok to include things twice. In fact, its better to avoid any > > implicit includes so that if we ever want to remove includes from > > other headers we can do so without disturbing this driver. > > IMHO approach with minimal amount of headers is nice just because > it's easier to check if everything is in place. I mean attempt to compile > will immediately reveal a missing header. > > So that's what I do - I remove as many inclusions as I may until stuff compiles. Please don't. People try to break header includes cycles by moving things in one header to another header, and then those changes may need to fix random drivers because they are now missing an implicit include they were relying on, etc. > > But with approach of explicit inclusion it's much easier to include > much more headers than really needed. The only way to figure out if header is really > required is to manually check all used functions in the current source > which is way too unreliable and probably nobody will do it ever anyways. > And that's how we'll get more stale and pointless inclusions. Sounds like a job for a script! -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (sboyd@codeaurora.org) To: linux-snps-arc@lists.infradead.org Subject: [RESEND PATCH v4] clk/axs10x: Add I2S PLL clock driver Date: Fri, 15 Apr 2016 16:38:58 -0700 [thread overview] Message-ID: <20160415233858.GA4690@codeaurora.org> (raw) In-Reply-To: <1460722116.3025.40.camel@synopsys.com> On 04/15, Alexey Brodkin wrote: > Hi?Stephen, > > On Mon, 2016-04-11@15:03 -0700, sboyd@codeaurora.org wrote: > > On 04/11, Alexey Brodkin wrote: > > > > > > On Mon, 2016-04-11@11:41 +0100, Jose Abreu wrote: > > > > > > > > + * warranty of any kind, whether express or implied. > > > > + */ > > > > + > > > > +#include <linux/platform_device.h> > > > > +#include <linux/module.h> > > > > +#include <linux/clk-provider.h> > > > > +#include <linux/err.h> > > > > +#include <linux/device.h> > > > "linux/platform_device.h" includes "linux/device.h" so you may make this list of headers > > > a little bit shorter. > > > > > > > > > > > +#include <linux/of_address.h> > > > > +#include <linux/slab.h> > > > > +#include <linux/of.h> > > > "linux/of_address.h" already includes "linux/of.h". > > It's ok to include things twice. In fact, its better to avoid any > > implicit includes so that if we ever want to remove includes from > > other headers we can do so without disturbing this driver. > > IMHO approach with minimal amount of headers is nice just because > it's easier to check if everything is in place. I mean attempt to compile > will immediately reveal a missing header. > > So that's what I do - I remove as many inclusions as I may until stuff compiles. Please don't. People try to break header includes cycles by moving things in one header to another header, and then those changes may need to fix random drivers because they are now missing an implicit include they were relying on, etc. > > But with approach of explicit inclusion it's much easier to include > much more headers than really needed. The only way to figure out if header is really > required is to manually check all used functions in the current source > which is way too unreliable and probably nobody will do it ever anyways. > And that's how we'll get more stale and pointless inclusions. Sounds like a job for a script! -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-04-15 23:39 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-04-04 18:00 [PATCH v4] clk/axs10x: Add I2S PLL clock driver Jose Abreu 2016-04-11 10:41 ` [RESEND PATCH " Jose Abreu 2016-04-11 16:47 ` Alexey Brodkin 2016-04-11 16:47 ` Alexey Brodkin 2016-04-11 16:47 ` Alexey Brodkin 2016-04-11 16:47 ` Alexey Brodkin 2016-04-11 22:03 ` sboyd 2016-04-11 22:03 ` sboyd 2016-04-11 22:03 ` sboyd 2016-04-11 22:03 ` sboyd-sgV2jX0FEOL9JmXXK+q4OQ 2016-04-15 12:08 ` Alexey Brodkin 2016-04-15 12:08 ` Alexey Brodkin 2016-04-15 12:08 ` Alexey Brodkin 2016-04-15 12:08 ` Alexey Brodkin 2016-04-15 23:38 ` sboyd [this message] 2016-04-15 23:38 ` sboyd 2016-04-15 23:38 ` sboyd 2016-04-15 23:46 ` Stephen Boyd 2016-04-15 23:46 ` Stephen Boyd 2016-04-18 10:30 ` Jose Abreu 2016-04-18 10:30 ` Jose Abreu 2016-04-18 11:49 ` Vineet Gupta 2016-04-18 11:49 ` Vineet Gupta 2016-04-19 9:13 ` Jose Abreu 2016-04-19 9:13 ` Jose Abreu 2016-04-20 1:54 ` Stephen Boyd 2016-04-20 1:54 ` Stephen Boyd 2016-04-20 9:47 ` Jose Abreu 2016-04-20 9:47 ` Jose Abreu 2016-04-20 16:12 ` Alexey Brodkin 2016-04-20 16:12 ` Alexey Brodkin 2016-04-20 16:12 ` Alexey Brodkin 2016-04-21 9:51 ` Jose Abreu 2016-04-21 9:51 ` Jose Abreu 2016-04-21 9:51 ` Jose Abreu 2016-04-21 12:18 ` Alexey Brodkin 2016-04-21 12:18 ` Alexey Brodkin 2016-04-21 12:18 ` Alexey Brodkin 2016-04-21 13:10 ` Jose Abreu 2016-04-21 13:10 ` Jose Abreu 2016-04-21 13:10 ` Jose Abreu 2016-04-21 14:15 ` Alexey Brodkin 2016-04-21 14:15 ` Alexey Brodkin 2016-04-21 14:15 ` Alexey Brodkin 2016-04-22 5:50 ` Vineet Gupta 2016-04-22 5:50 ` Vineet Gupta 2016-04-22 5:50 ` Vineet Gupta
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=20160415233858.GA4690@codeaurora.org \ --to=sboyd@codeaurora.org \ --cc=Alexey.Brodkin@synopsys.com \ --cc=CARLOS.PALMINHA@synopsys.com \ --cc=Jose.Abreu@synopsys.com \ --cc=Vineet.Gupta1@synopsys.com \ --cc=devicetree@vger.kernel.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-snps-arc@lists.infradead.org \ --cc=mturquette@baylibre.com \ --cc=robh+dt@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.