Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2668274pxb; Thu, 10 Feb 2022 02:55:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeviPlyR7KBYjFiHaR992WMyUBPeDlFK+XkAj7nsF5kAtl0aqSUXR1/i4CeUDmMb4RIy9l X-Received: by 2002:aa7:d1c5:: with SMTP id g5mr7701747edp.172.1644490559562; Thu, 10 Feb 2022 02:55:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644490559; cv=none; d=google.com; s=arc-20160816; b=BZfo5DMahqzPo9isZS5zFpGvkMFT4BE6lmypNqTaSZn0B20kYGSw8140+PXyjPHh6o OCH7KVeFRk7fHOODTS0yApkJ31fyfeqlYZgGIi65u7yPZx316RCc0OaV3lXijwYGq4mW /xGIwodfEUV4LbjeYve1NqM4mSOtVwkuJPqchZYFXrNG4NrMwPLU59dSOB/fV7iCTGJ5 R1JBXPUzz3sHxyHlzVrDp4t6Dap5VXwYlbAYM0t1yMwlOleUkV5vYNtOgWlyz5gH8VZR Jz2t6nf3B0U2agKyDAa14/FQNN3iJSWZHgtJ9ZiEjm3RNPWlfR3AGrIiAS3wQcLwtx98 dc4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=0hRNHZC47qLl3e/waRAhKxiMrGy/aiNvb8Y7VBW8mEA=; b=JZPgXZNsmnSZ0lsIGDt3oZxKXowux2K2pj9NJ7KLIEEDiwdP8mv+crPVSjbIzVD6c2 HXkXhnNPhU1PQMDBLvAUc80vXIGbXkRK0mQBo1EiDtixc8/lZY43cV3liM4zi4iT+2u4 cXyvVil9eABI8acUMhIG5QazRP1byS0FTylrUzKI9hWMEfemYfMuQqu1DDxouMtLfzi1 x5hf+bkHc/9t6E5U+t+qoa7QLjPSgJ3PhD2nZiKYFo8e5JnfixoMhw8uTSoR+MY/7/Co f2y6m8aIKOCCLd2MRornEVsOQDp9SJpi+hzgJ5a9s2AyByTNHLorEF2atMXyIp61e7vC zo9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nIsX+aUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7si13734956ejc.853.2022.02.10.02.55.34; Thu, 10 Feb 2022 02:55:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nIsX+aUC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238818AbiBJJio (ORCPT + 99 others); Thu, 10 Feb 2022 04:38:44 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:57870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238772AbiBJJin (ORCPT ); Thu, 10 Feb 2022 04:38:43 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F33F220; Thu, 10 Feb 2022 01:38:45 -0800 (PST) Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0760193; Thu, 10 Feb 2022 10:38:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1644485921; bh=lF+r6UQCxoqWroIZy8/2n+0n/A+ghFkPyKqL+rYmqL4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=nIsX+aUCZpg42I5BMkVxnW3NzL+xrWrld4vcDWTJYe3M+saH5lhg4RYD8ixO0PhPA zxdQVr58HRIFIJHw95qKt91z0GBERL0glsPJI1b995rxII2iZqNx7dpRJ9nzd8mLw2 z7fyydxbZPRtyb6Bua6g3icy28+AMgfCMXKh9Yv4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1644481960-15049-1-git-send-email-wangqing@vivo.com> References: <1644481960-15049-1-git-send-email-wangqing@vivo.com> Subject: Re: [PATCH] media: wl128x: use time_after_eq() instead of jiffies judgment From: Kieran Bingham Cc: Wang Qing To: Mauro Carvalho Chehab , Qing Wang , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Date: Thu, 10 Feb 2022 09:38:38 +0000 Message-ID: <164448591856.3354066.6123333934504651771@Monstersaurus> User-Agent: alot/0.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, All of these patches you've just sent say "Use time_after_eq()" in the subject, but I haven't yet seen a usage of that. Could you make your patch subject reflective of the true changes in each patch please? Batching them in a series as suggested by Joe would be helpful too. Quoting Qing Wang (2022-02-10 08:32:39) > From: Wang Qing >=20 > It is better to use time_xxx() directly instead of jiffies judgment > for understanding. >=20 > Signed-off-by: Wang Qing > --- > drivers/media/radio/wl128x/fmdrv_common.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/ra= dio/wl128x/fmdrv_common.c > index 6142484d..a599d08 > --- a/drivers/media/radio/wl128x/fmdrv_common.c > +++ b/drivers/media/radio/wl128x/fmdrv_common.c > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > =20 > #include "fmdrv.h" > #include "fmdrv_v4l2.h" > @@ -342,7 +343,7 @@ static void send_tasklet(struct tasklet_struct *t) > return; > =20 > /* Check, is there any timeout happened to last transmitted packe= t */ > - if ((jiffies - fmdev->last_tx_jiffies) > FM_DRV_TX_TIMEOUT) { > + if (time_after(jiffies, fmdev->last_tx_jiffies + FM_DRV_TX_TIMEOU= T)) { It looks like there are specific macros for working with jiffies too. Should this be=20 time_is_after_jiffies(fmdev->last_tx_jiffies + FM_DRV_TX_TIME= OUT) { Although that is in fact 2 characters longer ;-S -- Kieran > fmerr("TX timeout occurred\n"); > atomic_set(&fmdev->tx_cnt, 1); > } > --=20 > 2.7.4 >