From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932649AbdKDL3B (ORCPT ); Sat, 4 Nov 2017 07:29:01 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:49767 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756630AbdKDL27 (ORCPT ); Sat, 4 Nov 2017 07:28:59 -0400 X-Google-Smtp-Source: ABhQp+Rn/DqEudWEpe1bAhjz88DBkZvIt7QKkMAaF37ZSzYypYugMmkmixFl14u7hXl68bxqPDVpsX2AWqVGNBz5vrM= MIME-Version: 1.0 In-Reply-To: References: <5770848.Kdi5IjVKeE@aspire.rjw.lan> <2520927.XkLgALY3I0@aspire.rjw.lan> <36826935.bDl2WuZxgq@aspire.rjw.lan> From: "Rafael J. Wysocki" Date: Sat, 4 Nov 2017 12:28:58 +0100 X-Google-Sender-Auth: 4saJsI1NCjYzkPMLBYMG-K8mQOw Message-ID: Subject: Re: [RFT][PATCH v2 2/2] PM / QoS: Fix device resume latency framework To: Reinette Chatre Cc: "Rafael J. Wysocki" , Linux PM , LKML , Ulf Hansson , Geert Uytterhoeven , Tero Kristo , Ramesh Thomas , Alex Shi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 3, 2017 at 5:39 PM, Reinette Chatre wrote: > Hi Rafael, > > I started to test this but found myself triggering one of the warnings: > > On 11/3/2017 4:50 AM, Rafael J. Wysocki wrote: >> --- linux-pm.orig/include/linux/pm_qos.h >> +++ linux-pm/include/linux/pm_qos.h >> @@ -28,16 +28,19 @@ enum pm_qos_flags_status { >> PM_QOS_FLAGS_ALL, >> }; >> >> -#define PM_QOS_DEFAULT_VALUE -1 >> +#define PM_QOS_DEFAULT_VALUE (-1) > > PM_QOS_DEFAULT_VALUE is -1 ... > > >> =================================================================== >> --- linux-pm.orig/drivers/base/power/qos.c >> +++ linux-pm/drivers/base/power/qos.c >> @@ -139,6 +139,9 @@ static int apply_constraint(struct dev_p >> >> switch(req->type) { >> case DEV_PM_QOS_RESUME_LATENCY: >> + if (WARN_ON(value < 0)) >> + value = 0; >> + > > ... causing me to hit this WARN_ON because apply_constraint() is called by __dev_pm_qos_remove_request() with the value parameter set to PM_QOS_DEFAULT_VALUE. Thanks for the report! I've added it to catch bugs in the future, but it has caught a bug right away. :-) That actually is a bug in the existing code that needs to be fixed. Thanks, Rafael