From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753045AbdBJM3G (ORCPT ); Fri, 10 Feb 2017 07:29:06 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:58811 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752397AbdBJM3F (ORCPT ); Fri, 10 Feb 2017 07:29:05 -0500 Date: Fri, 10 Feb 2017 13:15:35 +0100 From: Pavel Machek To: Viresh Kumar Cc: Rafael Wysocki , khilman@baylibre.com, ulf.hansson@linaro.org, Len Brown , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , 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 Message-ID: <20170210121535.GA27377@amd> References: <338b16e4c882634e30e4f4c011a9e9c52d134cbc.1486611268.git.viresh.kumar@linaro.org> <20170209142425.GC23373@xo-6d-61-c0.localdomain> <20170210060030.GA8498@vireshk-i7> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <20170210060030.GA8498@vireshk-i7> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > > >=20 > > > To prevent against that, add the default case as well and do a WARN f= rom > > > it. > >=20 > > I'd say compilation-time warning is better than hmm.... stacktrace and = memory leak > > at runtime? >=20 > Of course we aren't going to allow a compilation warning for each and eve= ry > platform that compiles this file. How do you wish to fix the issue then ? What is tue issue? As soon as new QoS request type is added, this switch can be fixed. There is no issue now, and there should be no issue in future. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlidrucACgkQMOfwapXb+vL1HgCgqOa2WePbjttY45quz8yXfn7Y Y/IAoL+0DkNyvwHs6HW/w6qJKa1ZH+H3 =WOmf -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--