Re: [PATCH] ioat: Use time_before()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 22, 2014 at 1:11 PM, Manuel Schölling
<manuel.schoelling@xxxxxx> wrote:
> 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@xxxxxx>
> ---
>  drivers/dma/ioat/dma_v2.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c
> index 8d10580..fdd60c7 100644
> --- a/drivers/dma/ioat/dma_v2.c
> +++ b/drivers/dma/ioat/dma_v2.c
> @@ -735,7 +735,8 @@ int ioat2_check_space_lock(struct ioat2_dma_chan *ioat, int num_descs)
>          * called under bh_disabled so we need to trigger the timer
>          * event directly
>          */
> -       if (jiffies > chan->timer.expires && timer_pending(&chan->timer)) {
> +       if (time_before(chan->timer.expires, jiffies)
> +           && timer_pending(&chan->timer)) {
>                 struct ioatdma_device *device = chan->device;

Thanks, let's use time_is_before_jiffies() for this cleanup... I'll
fix up and apply.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux