From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751718AbbERAIu (ORCPT ); Sun, 17 May 2015 20:08:50 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:47196 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751045AbbERAIm (ORCPT ); Sun, 17 May 2015 20:08:42 -0400 From: "Rafael J. Wysocki" To: Jin Qian Cc: Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] power: validate wakeup source before activating it. Date: Mon, 18 May 2015 02:34 +0200 Message-ID: <6066146.sNzXFSI8Td@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.0.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1430951216-3003-1-git-send-email-jinqian@android.com> <1816596.LjGsP0DkBO@vostro.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit 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 Friday, May 15, 2015 06:28:17 PM Jin Qian wrote: > Hi Rafael, > > The latest version is in [PATCHv3 1/3] power: validate wakeup source > before activating it. I changed WARN_ONCE back to WARN since if > multiple drivers activating uninitialized wakeup_sources, only the > first driver will by flagged. Which is OK. If you're a user, you can't fix the problem by yourself and spamming the logs with continued warnings doesn't help here. If you're a developer, you'll fix the first driver and then see the warning from the second one. > We lost alert for other drivers. The warning should really happen during > driver development. Hope this is ok. First, I've applied your patch already. Second, I really think that WARN_ON_ONCE() is better here. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.