Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578189

Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch

From Viresh Kumar <viresh.kumar@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch
Date 2017-02-10 07:10 +0100
Message-ID <t9cz8-87e-11@gated-at.bofh.it> (permalink)
References <t8NU6-LX-15@gated-at.bofh.it> <t8NU6-LX-13@gated-at.bofh.it> <t8XTr-7gc-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 ?

-- 
viresh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/6] PM / QOS: Add default case to the switch Viresh Kumar <viresh.kumar@linaro.org> - 2017-02-09 04:50 +0100
  Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch Pavel Machek <pavel@ucw.cz> - 2017-02-09 15:30 +0100
    Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch Viresh Kumar <viresh.kumar@linaro.org> - 2017-02-10 07:10 +0100
      Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch Pavel Machek <pavel@ucw.cz> - 2017-02-10 13:30 +0100
        Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch Viresh Kumar <viresh.kumar@linaro.org> - 2017-02-13 04:20 +0100
      Re: [PATCH V2 1/6] PM / QOS: Add default case to the switch Pavel Machek <pavel@ucw.cz> - 2017-02-10 22:30 +0100

csiph-web