From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbdBJGBE (ORCPT ); Fri, 10 Feb 2017 01:01:04 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:33669 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750972AbdBJGBD (ORCPT ); Fri, 10 Feb 2017 01:01:03 -0500 Date: Fri, 10 Feb 2017 11:30:30 +0530 From: Viresh Kumar To: Pavel Machek 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: <20170210060030.GA8498@vireshk-i7> References: <338b16e4c882634e30e4f4c011a9e9c52d134cbc.1486611268.git.viresh.kumar@linaro.org> <20170209142425.GC23373@xo-6d-61-c0.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170209142425.GC23373@xo-6d-61-c0.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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