From: Thierry Reding <thierry.reding@gmail.com>
To: "Manuel Schölling" <manuel.schoelling@gmx.de>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, alexander.deucher@amd.com,
christian.koenig@amd.com
Subject: Re: [PATCH] radeon: Use time_before()
Date: Wed, 21 May 2014 21:02:20 +0000 [thread overview]
Message-ID: <20140521210215.GB6237@mithrandir> (raw)
In-Reply-To: <1400693977-21033-1-git-send-email-manuel.schoelling@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Wed, May 21, 2014 at 07:39:37PM +0200, Manuel Schölling wrote:
> To be future-proof and for better readability the time comparisons are modified
> to use time_before() instead of plain, error-prone math.
Nit: commit messages are best wrapped around column 72.
> Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
> ---
> drivers/gpu/drm/radeon/radeon_pm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
> index f30b842..b08db66 100644
> --- a/drivers/gpu/drm/radeon/radeon_pm.c
> +++ b/drivers/gpu/drm/radeon/radeon_pm.c
> @@ -1592,7 +1592,7 @@ static void radeon_dynpm_idle_work_handler(struct work_struct *work)
> * to false since we want to wait for vbl to avoid flicker.
> */
> if (rdev->pm.dynpm_planned_action != DYNPM_ACTION_NONE &&
> - jiffies > rdev->pm.dynpm_action_timeout) {
> + time_before(rdev->pm.dynpm_action_timeout, jiffies)) {
> radeon_pm_get_dynpm_state(rdev);
> radeon_pm_set_clocks(rdev);
> }
I think time_after(jiffies, rdev->pm.dynpm_action_timeout) would be more
intuitive, but either way:
Reviewed-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2014-05-21 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 17:39 [PATCH] radeon: Use time_before() Manuel Schölling
2014-05-21 21:02 ` Thierry Reding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140521210215.GB6237@mithrandir \
--to=thierry.reding@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manuel.schoelling@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox