Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp584752lqo; Wed, 8 May 2024 08:43:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWV8Ig21Jw25rIQXaShGoYVX1fcpbH55rDFjHrKWMW45mnmyC6mH7VLKaxRHH41eS/YEFhMvCbfqoWFkLi5L1GZYGNlHFxHaGeWXXJSWw== X-Google-Smtp-Source: AGHT+IG/AwC75vh+agv4xMt744k4wUOmRxotWbl8qMhNbSijyZesSh5it9NodGwtU2t6+G0GiAoD X-Received: by 2002:a05:6a00:828b:b0:6ea:914e:a108 with SMTP id d2e1a72fcca58-6f49c211c95mr2633911b3a.12.1715183017713; Wed, 08 May 2024 08:43:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715183017; cv=pass; d=google.com; s=arc-20160816; b=sjtRecnCMaBwkqZocLhwK1DlUz29mGnGp8RO0Fd+F8NhanPQIklnyotjC37rFPEf/s 8tfFeLBJ/ngQwIaZurJHbYryj3oUnp5Ry514rl32qED85dv1SJsbUkxc1r2dXx4dGixo MEUAhFe97bwOdbunZHk79W8Vf/CK/Llu7AZmCKi1V5JMiWkJVCvrAXOPHZWPHmRHwhr9 MZ24DGesabzhtA2sQAvGIOhIMWDt2GH5ztJuyGw+pRL9Y5+t6wxVVDrV/RXOpsYWwq8Z tVEE3vu0KDs1wGeDaGqAv7CSU4i406UCpCekMR/jrVv1IBQ7efhuRvggjkylfQ1dTb7u UnMA== 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:dkim-signature; bh=64GgHjzyf1nWo5azBtCeDRChg9QZkk/X0xEYsvQpMxM=; fh=HE2HZNNF6uZcNnYoLyNXztqDYsQT6e7rtLQCSrxOQGs=; b=p9oii6cmNqbzu+0FWizCt2jazAJWC5Wtr3biN3XFOkxyDtcSaVUYIOUKK61ezMPQs4 zacupo+wPmQ4puEe+KmNhCGmx/YfGffllyO6vTECoX7JCkba6W36LDBRM/V9lbS0vE61 vS0HIHsUMdHrZQIFBPzpvlgZdGTAdqYE0Y4S2aAsnanF/ePLp8KQQ/vMBM9uEYMr8+kD Wul9WypABa7PDLyMm4JAPaPgUHZv6kjYTH0Ct0oAz33nYuEysLbOcVDyTI99jorbrn8K QDihhYUmYbCd0pVqt142omxXJC89dAEhJzYVaAhVV8cXgKBNF6rGYHewcRU3i/+RDjEc mBlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IBwou4AL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173501-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173501-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. [139.178.88.99]) by mx.google.com with ESMTPS id g8-20020a056a0023c800b006f457336f6asi9935396pfc.12.2024.05.08.08.43.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:43:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173501-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IBwou4AL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173501-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173501-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 A8395282BAB for ; Wed, 8 May 2024 15:43:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 303F8128368; Wed, 8 May 2024 15:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IBwou4AL" 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 4D5031A2C05; Wed, 8 May 2024 15:43:28 +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=1715183008; cv=none; b=UmwJkaPrOIFp8XXhznNpr1DJMn7EoN/HE8e4KAP0UIRJy3G0cL2d+UTsndftInZa7GThjeT+O5ONeE2ytqwSrwRvfIC0vMBdCnUuOwIp2FbzspW1kxu1EBvpRbtAkd8LMpj3UXnbSIQT+2tNNs5kI9XPfIeN2rKR/bGbwhgDqK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715183008; c=relaxed/simple; bh=WGEKQNPsGIlqGJkiD5yTGPTYvZOR4IkHFj8Rd9RX0so=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pFwdFn8uBrEWNslNXwjJHuvbwi2DZ28ByKuQ6iYGplPogR3BnCRyEwNlJhY6OH+6dgUWUVIGlOYowkkIeoqKqPApaxWIcGoWSiIzll/fRZGpHaY/R+daltSjELC/fTnBhyWi7D/oHv5+iwwSvZDyYYTsrnPTugiT0OXC3b7aj8Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IBwou4AL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAAE9C32782; Wed, 8 May 2024 15:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715183008; bh=WGEKQNPsGIlqGJkiD5yTGPTYvZOR4IkHFj8Rd9RX0so=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IBwou4ALRHngYqW5G0hJhXy6VE0u/AjCPSHpeMFfmzmaKw4Tv3Nkb5Ird/gKkkx6q uKX6CxEPS3Yl5S3bqccKe6wkqwhGkyou7o2rwZcw+yS/KYk+Tf26maA4z/6bYFtp5m 4ZX0XWa1zLOpSDN21ErmpndKQ8PuNAoI1a+EZF9VWDI0C2CV2dFGdyRgJ5S2xpudhc P4TuXDcQDLvCoihgTp9hG4I2+G87H3xKkSjoZjG0SRdu4Q3pp0PpyZRaczEGXEhCzX WpAkHisB0WsMqZaMsHRS5eu/QHz1LBNd3up24r8Q1o8RXvqKtthovUNGWnREpoxVpQ P6qaLKj7idS0Q== Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5b21e393debso1872626eaf.2; Wed, 08 May 2024 08:43:27 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVAjoYYOjTtsSYL4qHp3gA7YgLuqF9YuSEutOwdgPAiUPV0Q+wZv1rgd3uFtJXC+xRMMp/T2qre6BvCzDbWfTHWmmdu7lrciolzWSZWJjBE1xpQIPWnXyZ8y8IFUuAt9Hsj8IYLEAjshHkXf2ZUBXG2hrVSkhIKQC6mZfHmdoAgcW4/mw4QS9dG2g== X-Gm-Message-State: AOJu0YwuIljzbQ9jLk96jUAEyXOX4y6VYq10wjsRT0MuyhM8k8nt/Zeq JXGMJ3wwQG9brCjElLmPs9YwrI+4ziUvDg2NmE74/GjE5wxwagXbCzKlQaUIeqkIft5qETdVUZE dG/lcTyJl14I4YzY9XCQosWRFWsY= X-Received: by 2002:a4a:aaca:0:b0:5b2:a5b:a88b with SMTP id 006d021491bc7-5b24d110a4emr2651009eaf.2.1715183007358; Wed, 08 May 2024 08:43:27 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240417044459.1908-1-linux.amoon@gmail.com> <20240417044459.1908-2-linux.amoon@gmail.com> In-Reply-To: <20240417044459.1908-2-linux.amoon@gmail.com> From: Chanwoo Choi Date: Thu, 9 May 2024 00:42:50 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/2] PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions To: Anand Moon Cc: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Apr 17, 2024 at 1:45=E2=80=AFPM Anand Moon = wrote: > > This macro has the advantage over SET_SYSTEM_SLEEP_PM_OPS that we don't > have to care about when the functions are actually used. > > Also make use of pm_sleep_ptr() to discard all PM_SLEEP related > stuff if CONFIG_PM_SLEEP isn't enabled. > > Signed-off-by: Anand Moon > --- > v3: fix using new DEFINE_SIMPLE_DEV_PM_OPS PM macro hence > change the $subject and the commit message > > v2: add __maybe_unused to suspend/resume functions in case CONFIG_PM > is disabled > --- > drivers/devfreq/exynos-bus.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > > diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c > index 153340b6685f..b89e04eb8430 100644 > --- a/drivers/devfreq/exynos-bus.c > +++ b/drivers/devfreq/exynos-bus.c > @@ -454,7 +454,6 @@ static void exynos_bus_shutdown(struct platform_devic= e *pdev) > devfreq_suspend_device(bus->devfreq); > } > > -#ifdef CONFIG_PM_SLEEP > static int exynos_bus_resume(struct device *dev) > { > struct exynos_bus *bus =3D dev_get_drvdata(dev); > @@ -482,11 +481,9 @@ static int exynos_bus_suspend(struct device *dev) > > return 0; > } > -#endif > > -static const struct dev_pm_ops exynos_bus_pm =3D { > - SET_SYSTEM_SLEEP_PM_OPS(exynos_bus_suspend, exynos_bus_resume) > -}; > +static DEFINE_SIMPLE_DEV_PM_OPS(exynos_bus_pm, > + exynos_bus_suspend, exynos_bus_resume); > > static const struct of_device_id exynos_bus_of_match[] =3D { > { .compatible =3D "samsung,exynos-bus", }, > @@ -499,7 +496,7 @@ static struct platform_driver exynos_bus_platdrv =3D = { > .shutdown =3D exynos_bus_shutdown, > .driver =3D { > .name =3D "exynos-bus", > - .pm =3D &exynos_bus_pm, > + .pm =3D pm_sleep_ptr(&exynos_bus_pm), > .of_match_table =3D exynos_bus_of_match, > }, > }; > -- > 2.44.0 > > Applied it. Thanks. --=20 Best Regards, Chanwoo Choi Samsung Electronics