* [PATCH] radeon: Use time_before()
@ 2014-05-21 17:39 Manuel Schölling
2014-05-21 21:02 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Manuel Schölling @ 2014-05-21 17:39 UTC (permalink / raw)
To: alexander.deucher
Cc: christian.koenig, airlied, dri-devel, linux-kernel,
kernel-janitors, Manuel Schölling
To be future-proof and for better readability the time comparisons are modified
to use time_before() instead of plain, error-prone math.
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);
}
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] radeon: Use time_before()
2014-05-21 17:39 [PATCH] radeon: Use time_before() Manuel Schölling
@ 2014-05-21 21:02 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2014-05-21 21:02 UTC (permalink / raw)
To: Manuel Schölling
Cc: kernel-janitors, linux-kernel, dri-devel, alexander.deucher,
christian.koenig
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-21 21:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 17:39 [PATCH] radeon: Use time_before() Manuel Schölling
2014-05-21 21:02 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox