From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 843CF8248B for ; Mon, 5 Jan 2026 21:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767648702; cv=none; b=QtJUhQoLexD4se8D9pXKXLAeCT0DEwS9nBpTLysg/LBOWqLh+VvECDXCLWOH/WYhJ6x4JwwOKl3N0Rql2veS2iQ98Cn++H9iQe5ixFhSjt+sYBysQm+UTYicXafCWtlkwPJRcWneTisek9KQ7YEPxgYXxMquK9v4XFqQGMOHEIo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767648702; c=relaxed/simple; bh=vPp3AvTGPchLW2c+AGwJirbOQoWxFBkOxQEfOGFlo5U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jqm2Y7iYlod7OVqtgXNkOH3eigccSqz4I6E0KTizH+Nh0YHF3mTg1nnCLLSYNPqn/dTrjKcaQuxzUKYrq/cph3ZprDtk8gcZJvS5nluDc1AHr4lRtr7YIjoRY8VTIvJSr6ebYnO6K4dWfDSeFtE1430k6j4SA7ay2U4OBbuek+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=SxOMrIet; arc=none smtp.client-ip=209.85.215.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="SxOMrIet" Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-b6ce6d1d3dcso236405a12.3 for ; Mon, 05 Jan 2026 13:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1767648700; x=1768253500; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SLE/vO3ZvnLaOBduDAh1SAq6McjdOl4HC6YjHnCaxmk=; b=SxOMrIet7JfKlkTB+MNkBl05ryUqtI6mSdQdkby4YxvwiNVLQwaV+4/knhONuWuXBR 4JbXmUWqWccayE4HTctV0vnvBhW0XYh2xYQHxCOpzLaCHthiiAz/QHwzeC4VrVnechvz bwIwWyd59EzOIQLAWT8wwscaePjMnO2EGlyzI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767648700; x=1768253500; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SLE/vO3ZvnLaOBduDAh1SAq6McjdOl4HC6YjHnCaxmk=; b=vuP6q+rBOVFM9sKHJVp+t1Ktxyjm49jpciyFoK6zG+CTyPK2lGo4i5g513fHvF6hs3 qq1JJvSaXmWN11XLKnZ1KAYdfxrwvV1DqAXVfoj2fS6vqLNhFYjEE4MR6wFkwBWE83HZ wZu00dqWL9+kzinkVRlimSAcRzFHdxzON9L5a13cBH2nwUnvtVYvhXbQkJ/HETmCK0f/ WmzmQaxlkHASlDIYNrtg6N8Q5rv5NXkrpIjccL4fyGH/bNlga14ELpSgi7mhwqgkMW7n WoQVm8rrkfsNsoP8oiu7OIh8dX7ElZrcrUg4hhtlk7AbuRNnXkzL5NwM3G9LDiTqhwMZ urBg== X-Forwarded-Encrypted: i=1; AJvYcCWiH8wHpwkQfyRRju3e54NiXCob1hsmzz10HUP9mrsVz5vvjq7Ta5wY+K6HuHKd49CngSx34slemsbgX7c=@vger.kernel.org X-Gm-Message-State: AOJu0Yyp6sSBJRdbLG1Xo7f0EnK2xFnUNnjpfoRks1btRtfOkakcFM0g lEHZlHqgZogKmCjsbqmJCpW0cQVWX8+oyU0R7o6PBgFQX+KxvTJwA3i2MpYOakjTjA== X-Gm-Gg: AY/fxX7GUPMVWuFaex3R1nNrHp2sXVEXClq6s1co9hyw8ByKL0lGhhzoIZVvAayF4Hc 9i58j6P6/X+suMIbhEE9zXRbO/tUEqMTLQf2zpTHreuTzxExT48rns7JcXtdFzAE3QW8/ntlrVO E03nAYXLl9txBlbpWUpfTtzDjy7IX7sez6ZFRmcWexErsKQSjWlLwGwpmyJKy+CrsgDgib9l1vf uUju1UvbzZ+6ecsnMeC16F0KK8zi9AG0zF5ACYm9IdH0n72WwQU7iWmc3mFUa1YsbpboYuh/ycw IBpRpc7nG6ldpoC5XRysquxcxrt6tbugQaqJWraLuwM19qnuH3BDJoUKkvDCzL+xgGScNXVtglx DtE+MGgabtQQcQUrXDNjH/nUrLClok48+LO5eSTYv5hb3BfVcdP04+GFREvpTRMDeLSJga8XbHF 06WeyGSTyuMXYcbNPeqRfKil5OOY8pWRDIiOGXxJWcnyIq8w96qQ== X-Google-Smtp-Source: AGHT+IFJ9JDeRFynFjJTq4iT72J0gsfQX5pc9IxuV9lkM7nLv2iM1FuklTdwLW++i3XlTEDta9dRgA== X-Received: by 2002:a05:7300:b295:b0:2a4:3593:6474 with SMTP id 5a478bee46e88-2b16f92f172mr559835eec.36.1767648699808; Mon, 05 Jan 2026 13:31:39 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:526d:9db9:4a72:4149]) by smtp.gmail.com with UTF8SMTPSA id 5a478bee46e88-2b1706a53f0sm498920eec.10.2026.01.05.13.31.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jan 2026 13:31:39 -0800 (PST) Date: Mon, 5 Jan 2026 13:31:36 -0800 From: Brian Norris To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Ulf Hansson Subject: Re: [PATCH v1 23/23] PM: runtime: Change pm_runtime_put() return type to void Message-ID: References: <6245770.lOV4Wx5bFT@rafael.j.wysocki> <14387202.RDIVbhacDa@rafael.j.wysocki> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14387202.RDIVbhacDa@rafael.j.wysocki> On Mon, Dec 22, 2025 at 09:36:25PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The primary role of pm_runtime_put() is to decrement the runtime PM > usage counter of the given device. It always does that regardless of > the value returned by it later. > > In addition, if the runtime PM usage counter after decrementation turns > out to be zero, a work item is queued up to check whether or not the > device can be suspended. This is not guaranteed to succeed though and > even if it is successful, the device may still not be suspended going > forward. > > There are multiple valid reasons why pm_runtime_put() may not decide to > queue up the work item mentioned above, including, but not limited to, > the case when user space has written "on" to the device's runtime PM > "control" file in sysfs. In all of those cases, pm_runtime_put() > returns a negative error code (even though the device's runtime PM > usage counter has been successfully decremented by it) which is very > confusing. In fact, its return value should only be used for debug > purposes and care should be taken when doing it even in that case. > > Accordingly, to avoid the confusion mentioned above, change the return > type of pm_runtime_put() to void. > > Signed-off-by: Rafael J. Wysocki > --- > include/linux/pm_runtime.h | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) I'm always happy to see rough edges of the runtime PM API sanded off. Thanks for doing this! Reviewed-by: Brian Norris