From: Pavel Machek <pavel@ucw.cz>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
khilman@baylibre.com, ulf.hansson@linaro.org,
Len Brown <len.brown@intel.com>,
linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
sboyd@codeaurora.org, nm@ti.com, robh+dt@kernel.org,
lina.iyer@linaro.org, rnayak@codeaurora.org
Subject: Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch
Date: Fri, 10 Feb 2017 22:24:32 +0100 [thread overview]
Message-ID: <20170210212432.GA7711@amd> (raw)
In-Reply-To: <20170210060030.GA8498@vireshk-i7>
[-- Attachment #1: Type: text/plain, Size: 1005 bytes --]
On Fri 2017-02-10 11:30:30, Viresh Kumar wrote:
> On 09-02-17, 15:24, Pavel Machek wrote:
> > On Thu 2017-02-09 09:11:47, Viresh Kumar wrote:
> > > The switch block handles all the QOS request types present today, but
> > > starts giving compilation warnings as soon as a new type is added and
> > > not handled in this.
> > >
> > > To prevent against that, add the default case as well and do a WARN from
> > > it.
> >
> > I'd say compilation-time warning is better than hmm.... stacktrace and memory leak
> > at runtime?
>
> Of course we aren't going to allow a compilation warning for each and every
> platform that compiles this file. How do you wish to fix the issue then ?
Surely compilation warnings are better than getting bug reports from
users?
Of course, it is better to fix the switch when adding new QoS type...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-02-10 21:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 3:41 [PATCH V2 0/6] PM / Domains: Implement domain performance states Viresh Kumar
2017-02-09 3:41 ` [PATCH V2 1/6] PM / QOS: Add default case to the switch Viresh Kumar
2017-02-09 14:24 ` Pavel Machek
2017-02-10 6:00 ` Viresh Kumar
2017-02-10 12:15 ` Pavel Machek
2017-02-13 3:11 ` Viresh Kumar
2017-02-10 21:24 ` Pavel Machek [this message]
2017-02-09 3:41 ` [PATCH V2 2/6] PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() Viresh Kumar
2017-02-09 3:41 ` [PATCH V2 3/6] PM / QOS: Add 'performance' request Viresh Kumar
2017-02-21 15:37 ` Ulf Hansson
2017-02-09 3:41 ` [PATCH V2 4/6] PM / domain: Register for PM QOS performance notifier Viresh Kumar
2017-02-17 23:54 ` Kevin Hilman
2017-02-20 5:01 ` Viresh Kumar
2017-02-21 15:28 ` Ulf Hansson
2017-02-22 3:25 ` Viresh Kumar
2017-02-09 3:41 ` [PATCH V2 5/6] PM / domain: Save/restore performance state at runtime suspend/resume Viresh Kumar
2017-02-17 23:58 ` Kevin Hilman
2017-02-20 9:18 ` Viresh Kumar
2017-02-09 3:41 ` [PATCH V2 6/6] PM / OPP: Add support to parse domain-performance-state Viresh Kumar
2017-02-17 5:38 ` [PATCH V2 0/6] PM / Domains: Implement domain performance states Viresh Kumar
2017-02-17 7:46 ` Ulf Hansson
2017-02-17 23:22 ` Kevin Hilman
2017-02-20 9:35 ` Viresh Kumar
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=20170210212432.GA7711@amd \
--to=pavel@ucw.cz \
--cc=khilman@baylibre.com \
--cc=len.brown@intel.com \
--cc=lina.iyer@linaro.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=rnayak@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=ulf.hansson@linaro.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.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: 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;
as well as URLs for NNTP newsgroup(s).