Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp232417lqp; Thu, 4 Apr 2024 11:27:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWKUA0FgXyX+rN1VtCtIlETX+X0WY9F9/sh/u5Wen6n3+eolas+MA6n8xm0FAQureAXf/syyMiqYN58sRIxesLpyVy1mCy/z4KLY+4t3g== X-Google-Smtp-Source: AGHT+IE8bwXItEjKO3jkGyusYhYkAzoqPfq6HSYZWtfPL2E80KiONdZsIqf272FbfIEbV0tuXCpO X-Received: by 2002:ac8:7d4f:0:b0:432:f3dd:f04e with SMTP id h15-20020ac87d4f000000b00432f3ddf04emr761581qtb.3.1712255259777; Thu, 04 Apr 2024 11:27:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712255259; cv=pass; d=google.com; s=arc-20160816; b=FAytFkywYFRAsQpyEs+0bic50z22pGaqKAVHdTHnZI9P6JDmUZJJhQ0LsPtUsQfiWC 5UoDpNdu0D5IeOD47iSOuSHCYkxsbor/zH023Whr6kybAXs34sORaPiyUjliVXlEJq6I 93uScs0QiI8w4lNvglT/hdImtu1qYaZj9X48wItX/jjkKkmr03NoJnnuvsZRmvygGheB 8EbXjx5EOnHOuwU2Yg6fxgiJvOwqdEpJvBT0mvSXJTeLAYm6urMPXsvEJFrvUNQqM9Kd dIlZwuXrMUrmUGvyLszkE4GXnmdZyQetZnmPCD2kh0ii+V9F10NDU4wE6HqzTfl3D6Ac BsxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=oETdcltFtK18t4tglLV+WfYvrzcuDnpCpIlWHhA7E1Y=; fh=UTU1/xo2FO/KWC3uhDxl9NhJ228mqpEO1F8n3ktSp1Y=; b=RfFSF9zZJGyeYsgDXqzL7bz4uPayM4zyVmJvrKfaEy7rAIw6EuARFxLqRPpCsUIOx6 qQ5cWT647/vSgqWOj76eJYd1SDArKPV8KqfWFFPPhjnjAphZ36Bql28u0YvrDaO3eFQn 9N7nfM4GHJpUcAsh3NsS3qZMfYFW9ER9uwGjk8tfT35Er074M0x+VTA1IB6MhNJgxw+r +U1i/VUlODtakaTondQwgBha+XdKgEp7w52tvmHVw44nr/x2o1ao8QNRdczyyitjgQXk D4H7A0MvPWmTyGQhn9ynXKGbROHd3GL7tZQh7kXv7lIEnztEHyRAIi3ScUff+Oyug7Qd baGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-131955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131955-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p1-20020a05622a00c100b0043439b932bdsi2732234qtw.776.2024.04.04.11.27.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 11:27:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-131955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131955-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu 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 EC5B71C26B50 for ; Thu, 4 Apr 2024 18:27:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43E01130486; Thu, 4 Apr 2024 18:27:09 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 274B2130A48 for ; Thu, 4 Apr 2024 18:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712255228; cv=none; b=a01EXmpmVKgVq+lLSgQpg9zUPRiJTKNs1ocLlr+i/j8dnK+kwxQ4qqMfq78xrgmYVOVdt1KREHD/0JE4rwDRqB9GyLXkmy5HLH6eUhSktigpA61Q7CiJDHGceLOvjViq5HWImgJgtkotR+sL+JpyiNaBomowC7s7YyVhnFEcjvg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712255228; c=relaxed/simple; bh=I6jRZ854ecCgWY95SZlS6zIp0tbz6PMCpLeBKuhM+TI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f8YrHVi2A4e25m2Jy+rdlHE9x7q/cn3GeqMLVY28wrdcXIH1WwL+rZ0ol30j6LYQWwNlLwnML18bbWTGUvcM/6uXjRbluXtzkQAOZYfjwXR6tJA5pvxN1CmFweq4KsipjgD6KkO14PFmCiOakymtutmKPpMT/0tDDNN3qTCHEWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 15760 invoked by uid 1000); 4 Apr 2024 14:27:06 -0400 Date: Thu, 4 Apr 2024 14:27:06 -0400 From: Alan Stern To: Anand Moon Cc: Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , Christophe JAILLET , Johan Hovold , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/6] usb: ohci-exynos: Switch from CONFIG_PM guards to pm_ptr() Message-ID: <6a29e005-8a35-46be-bfe5-57818b02af16@rowland.harvard.edu> References: <20240404071350.4242-1-linux.amoon@gmail.com> <20240404071350.4242-5-linux.amoon@gmail.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=us-ascii Content-Disposition: inline In-Reply-To: <20240404071350.4242-5-linux.amoon@gmail.com> On Thu, Apr 04, 2024 at 12:43:20PM +0530, Anand Moon wrote: > Use the new PM macros for the suspend and resume functions to be > automatically dropped by the compiler when CONFIG_PM are disabled, > without having to use #ifdef guards. If CONFIG_PM unused, > they will simply be discarded by the compiler. > > Signed-off-by: Anand Moon > --- > v2: new changes in this series. > --- Acked-by: Alan Stern > drivers/usb/host/ohci-exynos.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c > index 85d04ae0ae40..3e647e0b341d 100644 > --- a/drivers/usb/host/ohci-exynos.c > +++ b/drivers/usb/host/ohci-exynos.c > @@ -212,8 +212,7 @@ static void exynos_ohci_shutdown(struct platform_device *pdev) > hcd->driver->shutdown(hcd); > } > > -#ifdef CONFIG_PM > -static int exynos_ohci_suspend(struct device *dev) > +static int __maybe_unused exynos_ohci_suspend(struct device *dev) > { > struct usb_hcd *hcd = dev_get_drvdata(dev); > struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); > @@ -230,7 +229,7 @@ static int exynos_ohci_suspend(struct device *dev) > return 0; > } > > -static int exynos_ohci_resume(struct device *dev) > +static int __maybe_unused exynos_ohci_resume(struct device *dev) > { > struct usb_hcd *hcd = dev_get_drvdata(dev); > struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); > @@ -249,10 +248,6 @@ static int exynos_ohci_resume(struct device *dev) > > return 0; > } > -#else > -#define exynos_ohci_suspend NULL > -#define exynos_ohci_resume NULL > -#endif > > static const struct ohci_driver_overrides exynos_overrides __initconst = { > .extra_priv_size = sizeof(struct exynos_ohci_hcd), > @@ -277,7 +272,7 @@ static struct platform_driver exynos_ohci_driver = { > .shutdown = exynos_ohci_shutdown, > .driver = { > .name = "exynos-ohci", > - .pm = &exynos_ohci_pm_ops, > + .pm = pm_ptr(&exynos_ohci_pm_ops), > .of_match_table = of_match_ptr(exynos_ohci_match), > } > }; > -- > 2.44.0 >