From patchwork Thu Feb 9 03:41:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 93664 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp65726qgi; Wed, 8 Feb 2017 19:48:39 -0800 (PST) X-Received: by 10.99.243.21 with SMTP id l21mr1317171pgh.37.1486612119295; Wed, 08 Feb 2017 19:48:39 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si8889746pfc.290.2017.02.08.19.48.38; Wed, 08 Feb 2017 19:48:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751785AbdBIDs2 (ORCPT + 25 others); Wed, 8 Feb 2017 22:48:28 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:32827 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751668AbdBIDs0 (ORCPT ); Wed, 8 Feb 2017 22:48:26 -0500 Received: by mail-pf0-f170.google.com with SMTP id y143so46721402pfb.0 for ; Wed, 08 Feb 2017 19:48:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=eHFtdZTcJLiAsOT3EUOGi9F5tfzhvOHRrw1XhrAK3E8=; b=gc71FmxEdAuynXGTwbKgBIO4gFPh+FCqgAd+4cCY1dVromQlpU/WNbGXnTnsNzkmMB R18ExXgmR4KiwGORO/DDZ/0kbuhwIy/ZfeM6XV1f4LVIEUFZvnhpPU5uF25RCNqLfcxj gWojrOBv9Di0iwdzqoSL8OVv0OVvQH2+7ASYM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=eHFtdZTcJLiAsOT3EUOGi9F5tfzhvOHRrw1XhrAK3E8=; b=qP8owA/IHH3pKi3QBy+mucwC+D9N2dOgLT86YdFWsa9AOMf4MD+n7+oNmIerL61FAp LDjTNrHentHC/4s/ZZi/AFIVdx2ycZfDF0DpHpgIpoqko2flJ5L/aadAE+BLFhWPmp1c QqP3rcssWGkeMmZgRqi7zyfQNYEBRnMa5tsltsNCxvFPc5SvxwTnLhE/k32VkGMRCLC3 Z+8MMXTxzr7IqZ2tP8bpwQpSFQn6tsRzGxblxzDTq3DZBb3BLbwtCKbhoUeerdHfrEmU 7Ayys6eIsDQ2nJ3fD+kTAT+r6kubx+8tnAhvyen/eEI5L3hxYSZOj7IQ8ju55Yewce6T NbTQ== X-Gm-Message-State: AMke39nLiFfyGSbT4wa+318bI2rZRiIXQtZr8VlNpA15q1vRa3lqHGvkdP+niPtb0ADaT3Ya X-Received: by 10.98.14.217 with SMTP id 86mr1202839pfo.79.1486611725850; Wed, 08 Feb 2017 19:42:05 -0800 (PST) Received: from localhost ([122.172.165.189]) by smtp.gmail.com with ESMTPSA id z70sm23882928pff.26.2017.02.08.19.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Feb 2017 19:42:05 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , khilman@baylibre.com, ulf.hansson@linaro.org, Len Brown , Pavel Machek Cc: 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, Viresh Kumar Subject: [PATCH V2 1/6] PM / QOS: Add default case to the switch Date: Thu, 9 Feb 2017 09:11:47 +0530 Message-Id: <338b16e4c882634e30e4f4c011a9e9c52d134cbc.1486611268.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Viresh Kumar --- drivers/base/power/qos.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.1.410.g6faf27b diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index 58fcc758334e..01f615b18055 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c @@ -621,6 +621,9 @@ static void __dev_pm_qos_drop_user_request(struct device *dev, req = dev->power.qos->flags_req; dev->power.qos->flags_req = NULL; break; + default: + WARN_ON(1); + return; } __dev_pm_qos_remove_request(req); kfree(req);