From patchwork Tue Jan 3 11:06:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 89630 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp7951479qgi; Tue, 3 Jan 2017 03:07:14 -0800 (PST) X-Received: by 10.84.218.76 with SMTP id f12mr111792581plm.146.1483441634412; Tue, 03 Jan 2017 03:07:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si25735369plk.60.2017.01.03.03.07.14; Tue, 03 Jan 2017 03:07:14 -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 dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934822AbdACLGx (ORCPT + 25 others); Tue, 3 Jan 2017 06:06:53 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:35156 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933885AbdACLGg (ORCPT ); Tue, 3 Jan 2017 06:06:36 -0500 Received: by mail-pg0-f48.google.com with SMTP id i5so149098236pgh.2 for ; Tue, 03 Jan 2017 03:06:36 -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=Tdd15/qHX8xEArIbegBUho10mZedUzpoaxtRbDakXSivTRk4TrL/8VkTVaTXa5+k9r CoFPrIC5TBSC7XouB3p5rgM8a8DlvrrqO6ctgdGLC265mF1lOUmnZG9nvCPzeNNLq1GP 4LGkCWohwyIa0zWNSmEuuJbM39inn31Gbqn+A= 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=haJOyVNtRanzRa91DX/RJ+mq9/6qAaaHEHCA71W1XisV5LWPGboeFwBU1fpD3sH5dy ZYkI1Z13Q5ObUyLfBAWzaFv3/cb7CrVyHYdyVqibADcLgxa+WbHRKW866RJTt+pLIUi9 cwAPUC68dAhp8papI12sR62bbUCN87vjHZv9pBPzLi8KR2UTlPwPt5wgqv36YYt6IQjt ln3XacbtlAEdQ3VxWF5/hvhrj/FT0+872N0793c54IbLPOtctbFhmnPmpikXnOL8LvbJ HGFoTAzjZMfLu9uXBJJzaP4VrlbZ7/szp7F1FD8wGK/S2TC/hq8htLbSaCB5MQooyPSZ NHYg== X-Gm-Message-State: AIkVDXLch8Baedumv5BIFfiyo+zLtBKwjh/YfJnIZcmvq110rlxNtKGBjuIboNEEagAsprAL X-Received: by 10.84.215.194 with SMTP id g2mr135110112plj.16.1483441595500; Tue, 03 Jan 2017 03:06:35 -0800 (PST) Received: from localhost ([122.171.77.55]) by smtp.gmail.com with ESMTPSA id s65sm140212432pgb.25.2017.01.03.03.06.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2017 03:06:34 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , khilman@baylibre.com, ulf.hansson@linaro.org, Pavel Machek , Len Brown Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd , Nishanth Menon , Vincent Guittot , robh+dt@kernel.org, mark.rutland@arm.com, lina.iyer@linaro.org, rnayak@codeaurora.org, Viresh Kumar Subject: [PATCH 1/6] PM / QOS: Add default case to the switch Date: Tue, 3 Jan 2017 16:36:07 +0530 Message-Id: <476c2130ecb697b4e9f427be0dd247a6a6d3ef81.1483439894.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);