lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140521210215.GB6237@mithrandir>
Date:	Wed, 21 May 2014 23:02:20 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Manuel Schölling <manuel.schoelling@....de>
Cc:	alexander.deucher@....com, christian.koenig@....com,
	airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] radeon: Use time_before()

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@....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@...dia.com>

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ