kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] drivers/net/wan/sdla_ppp.c : Use of time_after macro
Date: Wed, 13 Jul 2005 05:43:35 +0000	[thread overview]
Message-ID: <42D4AA07.9070206@feitoza.com.br> (raw)

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: sdla_ppp.patch --]
[-- Type: text/x-patch, Size: 891 bytes --]

Use of the time_after() macro, defined at linux/jiffies.h, which deal
with wrapping correctly and are nicer to read.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>

--- linux/drivers/net/wan/sdla_ppp.c	2005-06-17 16:48:29.000000000 -0300
+++ linux-kj/drivers/net/wan/sdla_ppp.c	2005-07-07 22:46:45.547173016 -0300
@@ -101,6 +101,7 @@
 #include <linux/if_arp.h>	/* ARPHRD_* defines */
 #include <asm/byteorder.h>	/* htons(), etc. */
 #include <linux/in.h>		/* sockaddr_in */
+#include <linux/jiffies.h>	/* time_after() macro */
 
 
 #include <asm/uaccess.h>
@@ -482,7 +483,7 @@
 		if(ppp_priv_area->update_comms_stats == 0){
 			break;
 		}
-                if ((jiffies - timeout) > (1 * HZ)){
+                if (time_after(jiffies, timeout + 1 * HZ)){
     			ppp_priv_area->update_comms_stats = 0;
  			ppp_priv_area->timer_int_enabled &=
 				~TMR_INT_ENABLED_UPDATE; 

[-- Attachment #3: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

                 reply	other threads:[~2005-07-13  5:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=42D4AA07.9070206@feitoza.com.br \
    --to=marcelo@feitoza.com.br \
    --cc=kernel-janitors@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).