Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1719855lqg; Mon, 4 Mar 2024 01:21:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVuGFqRjV7kMHZyZ9ItS1UTImZmlfB5vUs+4rj2tgVYLRJxAUtJMic30J/9rk3LqplT0wejTJp1J23ed50T0REGImeakj3PccNq6Utb8A== X-Google-Smtp-Source: AGHT+IEowFUEw92/x0HzwnuBGTeLU4Rk8uTwEsqRg1wH4FWtBfUetWZtvxqQ9g+W+suatuVTo22o X-Received: by 2002:a05:6a20:7493:b0:1a1:49ab:2e23 with SMTP id p19-20020a056a20749300b001a149ab2e23mr2793278pzd.29.1709544116553; Mon, 04 Mar 2024 01:21:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709544116; cv=pass; d=google.com; s=arc-20160816; b=wZ1riQ5mN5GEBGwV+g6pUQkCH06KYVlSapR/YN7/5MPmm81jHleNydLqewcdW8fLoJ Wzl4baUsWoyxYx4qc80hkbc3Ps0xrNRNAaOA0o/i5kSQ+RSuu4thArDJxefLGOozmF+j fUqsyOah3eMhZov2REgp6LrlGWB6iUMopOM+VMu1eWTTaLE+vKjkvy8NyPCnbLZ1JlL3 AEfVIRWpu13C1B2ZtDSYXWtI5VV6SZSs6Iq5ircm0cSyNy58kbmhVfQtHASboonAwKUK Kc3GFkdewxkrgTK8VrCDUkiIGMIgqMZoiRkCpFoK6FkyCyB2c1/gM03bx+fzHZ58ynRT 6Ctg== 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:dkim-signature; bh=4zN5+FKzNLQFl/DpUeHuod+XxanEz52qirrq1m8AlbQ=; fh=MVkyZDqkf608NcwphRYX6gQ+of/76BOFIIij8Z16lRE=; b=BU+02lUEMWOr/061knmf2XBBXrv2O4SGgH/I6L3krNp0+5y7uqyPpz3TEfuX7Cp5hF F5g0z8NgtQFEE4LohkeXUBPWSWzlfu3r85CNCA7ptmUrtiiaEUDyKmmEIseBXU6uPTiu y9BcGn/u7bSrSwmlSHqI7bdou7DWsk+rZTcfW7Q9ilRy5A8sUBRkJRFlJzHpQwWuZ5wq EzmPKwNV0xVCPfMo7ewGATvpAWgRZcdTmFRRLSYaWso1PZfFeSxpedbKRs9MSe40ZVsV kDIo7A+SvYvL9ASTABo0xsCFTRoFkOzdn6hAMhos3HheD1x3xXyGv90f1Yqc3xDFtuO5 oxzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DuJm+66A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lb8-20020a056a004f0800b006e537cc7299si530724pfb.256.2024.03.04.01.21.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:21:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DuJm+66A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-90300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90300-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 404C32834E4 for ; Mon, 4 Mar 2024 09:21:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B10A02230C; Mon, 4 Mar 2024 09:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DuJm+66A" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CF51A12E73; Mon, 4 Mar 2024 09:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709544095; cv=none; b=gadWbYku6mElee2ogQhFFctaCTvH75OKOElxTch/009EhQGlspa/TLIUBEBATkahSZ5bfQTOYA7ozc+7o1K6/FHttFmLmr89gnfeDxfZoiCxG3qbdwHWzrB1TkNcLkiOXIcXuPTtx3pcx0hJaiM8u9AfJ3cme25YmwLszEyq6uw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709544095; c=relaxed/simple; bh=lOa50vXkrUsDFtIi8C9JTx4wGk9mm9mtJoD1tNnorho=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tjXh+AU9vpnu1Cf5IO2hxl2RI8dBBr2V46MmHD9mCzsMEk6v2l/4nDffYM+cCpLUPlbm8aZ+2/KCMLZV52N0arda3h+S6Nuur0jMMtvt+9LWM7yx38PqLK1/WKYniRQdOvnVgpBBBbVMD41qdTzu9NPFTnN0OsEaPpBnelXzYBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DuJm+66A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64F12C433F1; Mon, 4 Mar 2024 09:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709544095; bh=lOa50vXkrUsDFtIi8C9JTx4wGk9mm9mtJoD1tNnorho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DuJm+66A65ap4KUPFek0FET5sProtZDdcqySyv4Ul+T1yfNKR9kVXRW+8oDwbqxkv vJZo3BSdIZMFm9s26GuEGVaWmLwUUID1UZILQP6Xn9Irz4uFM51yANy5RxC1sgR7Lt zIFuf0aIuq68BiM7j56YWAu7uAS6IXzO1j64R56Uf0R+ThNBig/04DQFMfrH/qj7Kl huXHMOqvpyO9A/YdbnUarXTi0IorJLnPtDTvziVbUHjkw+Dcfq92/G7XJDPzIdENUl zR+cqviNLc2cVXHSgNl45BD/10truw82TOgP+5fhZ4WT3+UIHpmXuGrBsuxAVC/sLV 7ZVo+FTdL2Wgg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rh4Vz-000000006M9-1I22; Mon, 04 Mar 2024 10:21:43 +0100 Date: Mon, 4 Mar 2024 10:21:43 +0100 From: Johan Hovold To: Anand Moon Cc: Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski , Alim Akhtar , 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 v1 2/4] usb: ehci-exynos: Switch from CONFIG_PM guards to pm_ptr() Message-ID: References: <20240301193831.3346-1-linux.amoon@gmail.com> <20240301193831.3346-3-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: <20240301193831.3346-3-linux.amoon@gmail.com> On Sat, Mar 02, 2024 at 01:08:09AM +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. > > Use RUNTIME_PM_OPS runtime macro for suspend/resume function. > > Signed-off-by: Anand Moon > --- > drivers/usb/host/ehci-exynos.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > static const struct dev_pm_ops exynos_ehci_pm_ops = { > - .suspend = exynos_ehci_suspend, > - .resume = exynos_ehci_resume, > + RUNTIME_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume, NULL) > }; This is also broken and clearly not tested. See the definition of RUNTIME_PM_OPS() which sets the runtime pm callbacks, not the suspend ones: #define RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ .runtime_suspend = suspend_fn, \ .runtime_resume = resume_fn, \ .runtime_idle = idle_fn, Johan