Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp305136lqt; Mon, 18 Mar 2024 08:20:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUQt5P5mvhuc7buGQD0S5pt9urR35ncya0738UkUP0mV3ejL7nf8II2oelAwyzHCulDDbbtJj3VTaXUZDuJWw/m5HXJs7ofBgAgmLKNxQ== X-Google-Smtp-Source: AGHT+IEAnvA4NVKMdrn9Nti2YNSSvbNkLTJaGRIQ1+BNdaiIWmrYmsuJ4D+3gmTrWb+sUwbzjoTj X-Received: by 2002:a17:906:52cd:b0:a46:a358:da5e with SMTP id w13-20020a17090652cd00b00a46a358da5emr4314095ejn.18.1710775200447; Mon, 18 Mar 2024 08:20:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710775200; cv=pass; d=google.com; s=arc-20160816; b=yBxGQGZELIkTdkQEO1FuJxWxc7ZhqZX5aUTSXAVKeR9cBlH4r/CsN1m/ap0XyC2F5F 448llVtlzoMgc42TRG/5NYl9MAjkGU47B7tzJKCfzTs0J5g3PcgcZShQ/YgkcIqVMitC mGcpURQFX651OgD+zJxCj1Q1ImUPAhjoQk/ZDbh0IaHWn/Kx7lko/rd3NI4ui/W4PkZA /Z7E21OmrdAY71HsM7J2CjkUAweUVaEA9WJ7LkjvTI0q0z6EpztvNeCGD17eyI0l03f0 riPn+WvbK8yJTpICQRvafDSQ/bxZyjLrjjUryirVL0JnG57tnoI/ACufPBBp5F5ToEGx 8+9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=toWyhbxvvkbbZKZQvW5MzxVDodxPwYT4N7QorbVGF+U=; fh=ry5n6GZ+WRFfG5u631jnTq5UQpSXolW+0zsyvUuBYxg=; b=FEl0DfRBF93Pe+PIkeuvuosUqFU5r3SrYmjYWVD+dpz4Sx26jCR0rsSXLL8aZaGqpB m+zmCUn5Pj5W89xa9uVmvHezLvTgSBHUBNORX51TmxxZysbOUvD2+dAGPtxw4bUeYK3S wrtZ0pC0DlAcMwbhKjsKr1Kd+xYsiJE8SWZs/9+jHj3iHRSvsSCxXzfuLCCnEpPanU7w 3DgeeMbTP5eNpObzLnxp232+/FPXGvGCG7CefNzaOxTmBdXfXqD7XvMRiWRpnzgazYEB KRBd1YFFvKEcXBMequTlR/LhU858ZDbX1eM+taP0Vcq+L6RhkQhSddh4gkhgs3NPyb+T jyig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DDpHEA37; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-106286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j16-20020a170906255000b00a464d79784bsi4325116ejb.543.2024.03.18.08.20.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DDpHEA37; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-106286-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C793B1F218AC for ; Mon, 18 Mar 2024 15:19:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18ACF4F201; Mon, 18 Mar 2024 15:19:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="DDpHEA37" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 632F04F1E3; Mon, 18 Mar 2024 15:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710775181; cv=none; b=HzBMgg2iww/XVw2Mt7PpNf9Y+EfV7ixXlS4Gjf1zXRf7g0BPh6A4Cv9VJUfpZzhzfviRNwptIc4rAyDJsntlBK+MyYkbw74c+a/CHGTB4aC+1lXLYFwDPwl+puethenMSQrz96q95s5e5h+SFAoK/XSnQdLIj5bXN0Q9vC2/tfk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710775181; c=relaxed/simple; bh=T+1c5Voa9wbuk82qx7Y34egGfh1pJlqoVUfmJFJTlGU=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a5zWT0lzHqgR3LU94w5NtEx4sR1gbjn3+akObPyWc9xN6y9J2pUXMbzgJPkdghEhKllFB3hYBm/Qwq0Cy2P8+XWkOmP9UBjRYd8pvc4xCXSd7dvGdmZJ4/uVpzfW1cHXwNIxBMjfGj5lV56IUpvpTJ7IunNUaejkjRnUw8gwmIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=DDpHEA37; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 42IFJRTe095056; Mon, 18 Mar 2024 10:19:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1710775167; bh=toWyhbxvvkbbZKZQvW5MzxVDodxPwYT4N7QorbVGF+U=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=DDpHEA371pnTqG2oaKZbQ1VKxjNWFU71Km/Z9ML+iKzJ1kch7LDr+/0C1KXF45daf NuswVTs5mW8Z57Dsry/wOJcpc6dfeWl5P9MqwiL6IWU6HKCyqL3l8KL659K+MSXWRJ Fu5xCJBX7MehXAPVkyfJJF9Cx2IptBQzbVEKv5Vs= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 42IFJRqk111282 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 Mar 2024 10:19:27 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 18 Mar 2024 10:19:27 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 18 Mar 2024 10:19:26 -0500 Received: from localhost (dhruva.dhcp.ti.com [172.24.227.68]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 42IFJQQK098058; Mon, 18 Mar 2024 10:19:26 -0500 Date: Mon, 18 Mar 2024 20:49:25 +0530 From: Dhruva Gole To: "Rafael J. Wysocki" CC: Ulf Hansson , Adrian Hunter , Tony Lindgren , Len Brown , Pavel Machek , Greg Kroah-Hartman , Viresh Kumar , , , , Subject: Re: [PATCH 1/3] PM: wakeup: make device_wakeup_disable return void Message-ID: <20240318151925.l5fcnbr7qcww7diw@dhruva> References: <20240318055054.1564696-1-d-gole@ti.com> <20240318055054.1564696-2-d-gole@ti.com> 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="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On Mar 18, 2024 at 14:47:45 +0100, Rafael J. Wysocki wrote: > On Mon, Mar 18, 2024 at 6:55 AM Dhruva Gole wrote: > > > > The device_wakeup_disable call only returns an error if no dev exists > > however there's not much a user can do at that point. > > Rather make this function return void. > > > > Signed-off-by: Dhruva Gole > > --- > > drivers/base/power/wakeup.c | 11 +++++++---- > > include/linux/pm_wakeup.h | 5 ++--- > > 2 files changed, 9 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c > > index a917219feea6..752b417e8129 100644 > > --- a/drivers/base/power/wakeup.c > > +++ b/drivers/base/power/wakeup.c > > @@ -451,16 +451,15 @@ static struct wakeup_source *device_wakeup_detach(struct device *dev) > > * Detach the @dev's wakeup source object from it, unregister this wakeup source > > * object and destroy it. > > */ > > -int device_wakeup_disable(struct device *dev) > > +void device_wakeup_disable(struct device *dev) > > { > > struct wakeup_source *ws; > > > > if (!dev || !dev->power.can_wakeup) > > - return -EINVAL; > > + return; > > > > ws = device_wakeup_detach(dev); > > wakeup_source_unregister(ws); > > - return 0; > > } > > EXPORT_SYMBOL_GPL(device_wakeup_disable); > > > > @@ -502,7 +501,11 @@ EXPORT_SYMBOL_GPL(device_set_wakeup_capable); > > */ > > int device_set_wakeup_enable(struct device *dev, bool enable) > > { > > - return enable ? device_wakeup_enable(dev) : device_wakeup_disable(dev); > > + if (enable) > > + return device_wakeup_enable(dev); > > + > > + device_wakeup_disable(dev); > > + return 0; > > } > > EXPORT_SYMBOL_GPL(device_set_wakeup_enable); > > > > diff --git a/include/linux/pm_wakeup.h b/include/linux/pm_wakeup.h > > index 6eb9adaef52b..428803eed798 100644 > > --- a/include/linux/pm_wakeup.h > > +++ b/include/linux/pm_wakeup.h > > @@ -107,7 +107,7 @@ extern void wakeup_sources_read_unlock(int idx); > > extern struct wakeup_source *wakeup_sources_walk_start(void); > > extern struct wakeup_source *wakeup_sources_walk_next(struct wakeup_source *ws); > > extern int device_wakeup_enable(struct device *dev); > > -extern int device_wakeup_disable(struct device *dev); > > +extern void device_wakeup_disable(struct device *dev); > > This change will introduce a build error in sdhci-pci-core.c AFAICS, > so you need to modify this file in the same patch to avoid bisection > breakage. Alright, I have respinned the series and fixed up the first patch itself. Thanks! -- Best regards, Dhruva Gole