lkml.org 
[lkml]   [2017]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 1/6] PM / QOS: Add default case to the switch
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-02-10 22:25    [W:0.102 / U:24.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site