Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp585908rwb; Mon, 26 Sep 2022 03:17:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4mQy9w5fquMJSdXyXb+ahWV8EhuguKwH9LwtFFJZBoQ5itDzc/aotIOKUhU/R6xp3ySQEs X-Received: by 2002:a05:6402:42c5:b0:44e:b640:16fb with SMTP id i5-20020a05640242c500b0044eb64016fbmr22451735edc.29.1664187476294; Mon, 26 Sep 2022 03:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664187476; cv=none; d=google.com; s=arc-20160816; b=Cm1wjzCqYKLTpgBD/Aks/IQv2BJ+l4ZkNSRnnEI1LcixRECR5cX7NEOZ6/baTgAlKU Telo9a4gjefQDlIKIPdjYV6D6vyCseiQEcVOOD/53AEIeuco/ORD/+lnex35dVsn0xh5 FqeMq24McW7fWZhETqW9VjssGOLtVx9YREoUC32ePJtTvINXR0lqXrCdl1/Etfkb5oxT 6+6g27g7m3Pn/cUKF+8z8+pdjtFf4EL5y4EC5QXd4f0T9hWNy375ydW5gqpUdhNgHh1z IrugY9r2/pURlDrFMXXdpZmyMuwbYUCPyHfxsSedVj3RkUqw5Y60cTiWdsLX1tMxNS4p /Rnw== 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=slUfOYuDocHXvoiOKi/PLZKBwEeaKg4fvimUypzpNFE=; b=N5QA2sZlb1ANJAzStZfzj12e8OEWn9WpksA2jnrrI+XtDOJmwYYP9l06aMo4HmiXCA lHa0QX9FhSwMkuhnOR6iGAZdoFQfN8myBtYPl8Uc5FRAkUlxVF05FD9fqG1ZiVPZxAZA Jfn1yLME09hnXuG34Rj7SGq/KC06X5I3fYenkKTVx4Za0lSHNmWKQ68QNTtxdzqZHXVK 1CWVyGb9b9wR9QO+HR7s/5FBRDmkBHeV4VztO6CmUgcN+JqvwErnSwuCckUT+KeF4r8z IV4W6p5NfJ46gtdGeX/7MMi+pmlzN8GZCt46uJLGxVKIH75BTNGvT4a1XoaRxzDqxDjm eObw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AAtKLaqa; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a17090658c500b0072aeac5f74bsi13604464ejs.119.2022.09.26.03.17.30; Mon, 26 Sep 2022 03:17:56 -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=@linaro.org header.s=google header.b=AAtKLaqa; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234669AbiIZJug (ORCPT + 99 others); Mon, 26 Sep 2022 05:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234540AbiIZJuM (ORCPT ); Mon, 26 Sep 2022 05:50:12 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F126A20F6E for ; Mon, 26 Sep 2022 02:50:08 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id s14so9411377wro.0 for ; Mon, 26 Sep 2022 02:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=slUfOYuDocHXvoiOKi/PLZKBwEeaKg4fvimUypzpNFE=; b=AAtKLaqaduwHpH1pwz7t0Sfn9uoftCpSiLLB/YNkmg6AC67wwx2f7aMNxyF6td21Ym LqPco5+Rmt/vu+4i/CzlJg3wRR0FbGwAtCi1AcWW3wEfptYDNfnh/pxrO+S9f3I6eFLQ Pm63nPEJrkayrBJW29EfJH7lYSnNJwNqth3lL5PV5HdFto59L2Ye05tjOX3WsOUd+HV5 LIcXG8tjrIy3jx7+GGFuAtwQSw/wLW6v8UGMGBgTEZQxTwESEaSecYbrOUXtZsE7KHzl dteSU0AOzKz9C6UFzrZARYxpYhyRdC4IGj6bNyIUmkylMEj1XpMo5YRgtPvOhBy46wWB rU9g== 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=slUfOYuDocHXvoiOKi/PLZKBwEeaKg4fvimUypzpNFE=; b=xwSU73SIAXc405YEiuuMjhPZJ/IZJFgz8S2eSYYUr3fQ9Ph9sSrV4OmxOBTplDR0KX 7lUU2NY0nYngG7lKioU2Dw1Jf7ki7T+MJ4ABPIMVtIo2sR3ZHYpV1pXqTJxZw6DvVPki +0yV5oshvFHLPTSNMl/Oiy0PAt+a4qz/o31+tq6mOvYNb2qpF0Q8WehqVzxAFxfDNzwc 0BETOrDoYfAMD65xI0M6VUYngDeS91WUEXbmfwSzUDf65bY+EoPioyD0ni1bGMg6Y8Cs E3vO4gfGXi9c70j00P6plj7Uh8HIZpc5EhaSFb3K+xj62Rb00seGkAeszwM9i4jLwEo+ g3VQ== X-Gm-Message-State: ACrzQf2rxlpwjwDgduqU72bHCG01vKtlHhRc3+j/1Qi930O7MUxLnbFz HL4Wp7hzmu1q3FftB3tXOsy6QRegV/LwFKPNYQ5cvg== X-Received: by 2002:a5d:6c6f:0:b0:22a:7778:6ea2 with SMTP id r15-20020a5d6c6f000000b0022a77786ea2mr13176073wrz.15.1664185807520; Mon, 26 Sep 2022 02:50:07 -0700 (PDT) MIME-Version: 1.0 References: <12079576.O9o76ZdvQC@kreacher> In-Reply-To: From: Ulf Hansson Date: Mon, 26 Sep 2022 11:49:30 +0200 Message-ID: Subject: Re: [PATCH] PM: runtime: Return -EINPROGRESS from rpm_resume() in the RPM_NOWAIT case To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM , Douglas Anderson , LKML , Alan Stern Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 On Fri, 23 Sept 2022 at 17:53, Rafael J. Wysocki wrote: > > On Fri, Sep 23, 2022 at 3:26 PM Ulf Hansson wrote: > > > > On Thu, 22 Sept 2022 at 20:04, 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. > > > > Sounds like there are additional improvements that can be made around > > this, right? > > This allows RPM_NOWAIT to be used in places where the caller doesn't > want to wait, because it might deadlock or similar, but they still > need to know whether or not the device can be accessed safely. > > Or do you mean something else? Nope, I was mostly wondering if you are planning to make those improvements too. Sooner or later. [...] Kind regards Uffe