Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp243043lqt; Mon, 18 Mar 2024 06:51:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsQ18yHrnNUMHEQ/WZ601vQFydf7lHw8OwWIJRr9hwOXwySV5PHgsZYscJ0g8lSrZHFMw8Kye0duCetuGVNX6eYw4BRFzYw6cRjOlO1g== X-Google-Smtp-Source: AGHT+IGg63OcmRAmJqTHbeNMX7gNMkiCMmTk+IZWYje7GpiT+Cj5uLLQ+5bCA9h0GAdZxnargQ5w X-Received: by 2002:a05:6122:17aa:b0:4d3:398f:8633 with SMTP id o42-20020a05612217aa00b004d3398f8633mr8466943vkf.10.1710769869300; Mon, 18 Mar 2024 06:51:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710769869; cv=pass; d=google.com; s=arc-20160816; b=m5wcWmgnTgyiHETfnGNeOklIghB7iGK+6BHdKJ2AZGG/3qYpzbg5HJCTZisi0uIgKW ahnVOkySJTPoS7KiXxvn9TD9CFdgEP8x5hyWGOo9g6oQNpcGT4bFFJImfKJo7Z5BZ40C WYQJnP2nGWt+oQA2qVIyVTDpJ4jbqKrJQf0QnIRuiHxrrdLgg2nX0DtEJ7qoqeiCQ3jW BF3MIggy1SMLsLBPbfCSII5U7SQqbA8jhCenj7bxMPCMHIU6i672GXrPT6KuN8CxLup8 b2EVsN3ov2AK1M3w1lIHHkihXOfW3fSBCAyTux7bKEUkxBtdYBO150ArfduvKwQYVjB/ UThA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=frJQpGP/jsZFYv57qEo/cVAJgItldw9pamarEjBSknc=; fh=xum/t77DtEly0hipS3Gdc4aFUwWw0ZAzRih39ZmFa1Y=; b=PHibyHXw4w1zykbTXpJD9WSEFX7U0gJc+4KgUqgl90jnCfgndTRuZiv0SuyKCyUdLn U0fXKLa/7lCIViA8Yqm3kwTVTx6PJSAZP+FywBPDGPPLqMQvAkTy5Hkl6kxvoxSMxpp7 FyF8ZQ3bhVNJM+Kn1Pk1IB4uPHXDmc/I63y2aVHTJK78hn0YGG1XkxCMjF1r73A21Wd1 rdJP7/AH8XhesKnHRGfF9L18M4dA9o+R7RPZnog2yQPT5x8sK2A/njKd3sowuGLfrvcI HXKF5vvmhv5KlVphlYaRT9DrfFs3QyQ+qEXl7n+EUimB8WpZtTEdKD+FK2G+cUZpcx+y BOUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t8-20020ad45bc8000000b006961c19311asi2104087qvt.172.2024.03.18.06.51.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 06:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-106181-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106181-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0C0BA1C2048D for ; Mon, 18 Mar 2024 13:51:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79FF44AEDD; Mon, 18 Mar 2024 13:51:02 +0000 (UTC) Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (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 8599B482F2; Mon, 18 Mar 2024 13:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710769862; cv=none; b=D3fjX43z1+QY81H25Kpnoj9J460uxb4z1ngewQV0rVJ8xrgbrIGYGP/30Is1BRbIBqEA39LZyrI9hpA2siPMNrnACC627qVHJNqOJQBaeezStDi0v7gPE+ougutFE4MfT+Rx3G2I4a9GwNHigzatQHojHc7Ip93mnFQ+nNSg784= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710769862; c=relaxed/simple; bh=po+xrY1xC1IdfvvAGhGiKp9tL3TxSWg0q8EjjelD5N4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=o5nsIEcqubna9Wu/yHWX4W9oR+hwoIFNQiyk1xGGDV2oujACn8KK8OXSAy1UzOdFXZi4VHjOjvbRmeXRTsgmVwa6+vKDgkQTiq2c+LPKsOGLXlCjDodNLVegVdfHfifBYNQTKwj4KmNmV2ISSmki1KFtOFBT3XYTDbisxrsPg3s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-221d4c52759so611719fac.1; Mon, 18 Mar 2024 06:51:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710769859; x=1711374659; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=frJQpGP/jsZFYv57qEo/cVAJgItldw9pamarEjBSknc=; b=rD/LTZuw3Q2wAD5TUfVdzOA+dvoYm0XBJEGfRAKMsasnxzbeP8MN3zaMMeeiJ6ze4B IHplLORIukKAJfzyju1g3XGQ4CZR05qMxaFvbqwXKnoK6cV8Y03aO+PuGI71JfqfiSEK Ps6eqF5TNJ1chVLyuQ2GJuwYhNOnG7eCztHq2P/QGOq4TbrS3VEiJTAc9EVGyywn6wzs xQhEZ9/LccBwaYIxeCJh05AVgMoG0XX1PVZGKoRnM4cQxXWvKK+YPOEDZvaZ9Ehg97Nt JKUtpRUXztnzSbGcNO5QVkBGgmwFpseFIPS3cjYG+zVBK8/ugyKD6n1sHsgEu4MGK6oF Rfhw== X-Forwarded-Encrypted: i=1; AJvYcCVL0bCrV7O7v5p5LYlmWn7ucmSwNQFAfgejlBzma2WhcvYr7MzIuhhxqluhZFt2+DGOdDZBwbEaceGHxZKbTn22rxh0rUBRZsa/GOKk1btA1xCExQAnHFge5oGUjI6xoRoSFZKtTkfcwDpT/5C3+OE3+DDLSmQY7B6IxdJCylOU+Hg= X-Gm-Message-State: AOJu0YylYvdoBeSFcVlDpD6IpE1qFmi3A6jwg9qySr2g8UX1UsHKelFK ZH+B/kj8BiUYMIYVbpAjiFJcTE9+REwPt/H/hVEqULF3BLrKUnpdEWtUiyDxc65dlKqNbJayhH2 PSPyQR9KuAlA5lL6bBVduSVY8kSc= X-Received: by 2002:a05:6871:5b11:b0:221:a151:7f3d with SMTP id op17-20020a0568715b1100b00221a1517f3dmr12036854oac.2.1710769859602; Mon, 18 Mar 2024 06:50:59 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240318055054.1564696-1-d-gole@ti.com> <20240318055054.1564696-4-d-gole@ti.com> In-Reply-To: <20240318055054.1564696-4-d-gole@ti.com> From: "Rafael J. Wysocki" Date: Mon, 18 Mar 2024 14:50:48 +0100 Message-ID: Subject: Re: [PATCH 3/3] mmc: sdhci-pci: Use device_set_wakeup_enable for en/disable wakeups To: Dhruva Gole Cc: Ulf Hansson , "Rafael J. Wysocki" , Adrian Hunter , Tony Lindgren , Len Brown , Pavel Machek , Greg Kroah-Hartman , Viresh Kumar , theo.lebrun@bootlin.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 18, 2024 at 6:55=E2=80=AFAM Dhruva Gole wrote: > > There exists device_set_wakeup_enable for wrapping device_wakeup_enable > and device_wakeup_disable. Use that instead to avoid confusion in > returning from a void vs int function. > > Signed-off-by: Dhruva Gole > --- > > I do not have the hardware to test out this driver, hence requesting > someone to review/ test it if atall you suspect that this change can > break existing functionality. > > drivers/mmc/host/sdhci-pci-core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-p= ci-core.c > index 025b31aa712c..db614389a5fc 100644 > --- a/drivers/mmc/host/sdhci-pci-core.c > +++ b/drivers/mmc/host/sdhci-pci-core.c > @@ -61,9 +61,9 @@ static int sdhci_pci_init_wakeup(struct sdhci_pci_chip = *chip) > } > > if ((pm_flags & MMC_PM_KEEP_POWER) && (pm_flags & MMC_PM_WAKE_SDI= O_IRQ)) > - return device_wakeup_enable(&chip->pdev->dev); > + return device_set_wakeup_enable(&chip->pdev->dev, true); This change is not necessary. > else if (!cap_cd_wake) > - return device_wakeup_disable(&chip->pdev->dev); > + return device_set_wakeup_enable(&chip->pdev->dev, false); It would be sufficient to simply drop the return statement from here, that = is + device_wakeup_disable(&chip->pdev->dev); and it can be done in the first patch (which would be less confusing even I= MO). > > return 0; > } > --