Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp9758rwb; Thu, 22 Sep 2022 13:34:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7YpNYBag5ctJUvSwinQlmUzofFyI/Vx0XM18u4cU75i2M2GJaapG9McFVCJ3400y6UiBUI X-Received: by 2002:a17:903:1248:b0:172:614b:234b with SMTP id u8-20020a170903124800b00172614b234bmr5122203plh.169.1663878854740; Thu, 22 Sep 2022 13:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663878854; cv=none; d=google.com; s=arc-20160816; b=v8eJZBorKRXCJVENJgG5SyfW3fqVCk92P1wN/rYQ6f3uqCqWLMLixhvWBY2kWC9NyZ IuSlPDrk90KwT9TXXEh+xitnp6Mss6fOpWBr0GH7vDJQ1XD4pag1by1AKEc4NWDmMdec PXk0QJgdsLKgQK79Q5v8kKes1jtiVAN8dQspBtURAY4TsWv0VWAA+44S/ULAWPKfO+qY 2utz9i0yK2npo9wcnob/GzB8KVBJtSS5jYalZdfBoeTEQYbgxqbixMgQxWIUEA2uvt0t QfMLLfQGQY2vHM67VOc9f9M9chtAPKsOhtJ+pN/sxNpjPa4UwF1qNn8p2swCr8YzlLjV RgtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/QKOwekVmpIN1iELZeeAaMGxiIyfBaqOqMFigiI0UNg=; b=YoSjCtHLTQOX16oa/kZrgRYDTmqKsIVQ4oW8U5enLw12P+z3mP8YQp9y8MtjtRCIM+ mqyvv7zvp4FCWoGt8BcRKzvpz1Ajhq85PGXnGlzdUR7L9z72GSA46Io7HHKbb61nJrc5 BJ5vhtUViTiQKAPyzfRXHx5bU+viMf8IAm8I6UfD1BHPGZ1ZhK9p0IY4XbpZpp5y3Qi3 qvFFkG22D0EDNfujNdg3p11fxujpqDlYbn9bN2inthbQiT6HeKsAyt/DZEM3pPueKCKC L+DvI6+n4coud3Qgyc6yDHuA3C7vlGYPNa766dcN5PCY0r5h992vJ8xgUsaVrSKNMhC2 RUeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RrgQ++2W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a056a00140700b0053622c49905si7454416pfu.289.2022.09.22.13.33.22; Thu, 22 Sep 2022 13:34:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RrgQ++2W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232450AbiIVTnz (ORCPT + 99 others); Thu, 22 Sep 2022 15:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232146AbiIVTny (ORCPT ); Thu, 22 Sep 2022 15:43:54 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F2B810AB22 for ; Thu, 22 Sep 2022 12:43:53 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id a26so23404423ejc.4 for ; Thu, 22 Sep 2022 12:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=/QKOwekVmpIN1iELZeeAaMGxiIyfBaqOqMFigiI0UNg=; b=RrgQ++2W9ZlzvN2o0ReqZrP46rzCUJJS+f/Ky8rCAFxfn0B7wLR79CaWsJoP6YTUF3 gF8wuO8ik8e7CraRROmztE4xYaK5rBgOCWyz+11p+qhGYZ+K1VrBYyKYZQsoh3Va+OG0 Urp/FnUsSrDZeR7u+SOSgXqrxA/ynh1+eOG9g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=/QKOwekVmpIN1iELZeeAaMGxiIyfBaqOqMFigiI0UNg=; b=gtPmyczFwuq5SbF5kPqBbHWl9A2djRrWmz7yTqW/6159U5XBtWqnd9xO0KWnf3HW/l tbIlP4UUxcSju+MPrRa66gDMvAlKJE5DDGLdHVSwYxze09KVW9IqOqzQhGZe4gqH9MuR NBZ04+Hfa43JvPsM60Kol5i5nWrAEBVV76RrK72vz2EWdIoCwKcxyjlPQnd0rhNwEWe/ xG8DWqQ6Yzwc+40uIQMDTCdmdsY4vvFrpEnKITqZBaujt7wDUrjelE495UOaaTifBBWw QObWRa2Wt9BtN9fdvaULwiIRw/Hdq+Gz5CdPACehottXx0NllQF1Ptn1ZWZdAms4Z8ma qXzA== X-Gm-Message-State: ACrzQf3bHyaiQY7W8z/r3PvuDL14F6ZDpojOiW6Vj1Wpl8p3TaXP0UnR Ww/5+6yMEXGmQeFWHKUW/vir/eC6k8zcrEs/ X-Received: by 2002:a17:906:cc0d:b0:779:857f:3ee7 with SMTP id ml13-20020a170906cc0d00b00779857f3ee7mr4191167ejb.713.1663875831670; Thu, 22 Sep 2022 12:43:51 -0700 (PDT) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com. [209.85.128.42]) by smtp.gmail.com with ESMTPSA id u17-20020a170906781100b00741a0c3f4cdsm3035688ejm.189.2022.09.22.12.43.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 12:43:51 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id k3-20020a05600c1c8300b003b4fa1a85f8so2001178wms.3 for ; Thu, 22 Sep 2022 12:43:51 -0700 (PDT) X-Received: by 2002:a05:600c:5488:b0:3b5:634:731 with SMTP id iv8-20020a05600c548800b003b506340731mr2225058wmb.188.1663875831036; Thu, 22 Sep 2022 12:43:51 -0700 (PDT) MIME-Version: 1.0 References: <12079576.O9o76ZdvQC@kreacher> In-Reply-To: <12079576.O9o76ZdvQC@kreacher> From: Doug Anderson Date: Thu, 22 Sep 2022 12:43:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] PM: runtime: Return -EINPROGRESS from rpm_resume() in the RPM_NOWAIT case To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Alan Stern , Ulf Hansson Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Sep 22, 2022 at 11:04 AM Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > The prospective callers of rpm_resume() passing RPM_NOWAIT to it may > be confused when it returns 0 without actually resuming the device > which may happen if the device is suspending at the given time and it > will only resume when the suspend in progress has completed. To avoid > that confusion, return -EINPROGRESS from rpm_resume() in that case. > > Since none of the current callers passing RPM_NOWAIT to rpm_resume() > check its return value, this change has no functional impact. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/base/power/runtime.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Seems reasonable to me. Reviewed-by: Douglas Anderson