public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [BK PATCH] More USB changes for 2.5.38
Date: Fri, 27 Sep 2002 12:42:58 -0700	[thread overview]
Message-ID: <20020927194258.GF12909@kroah.com> (raw)
In-Reply-To: <20020927194240.GE12909@kroah.com>

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.611.1.4 -> 1.611.1.5
#	drivers/usb/storage/sddr55.c	1.4     -> 1.5    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/26	tim@physik3.uni-rostock.de	1.611.1.5
# [PATCH] fix compares of jiffies
# 
# on rechecking the current stable kernel code, I found some places where jiffies
# were compared in a way that seems to break when they wrap. For these,
# I made up patches to use the macros "time_before()" or "time_after()"
# that are supposed to handle wraparound correctly.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
--- a/drivers/usb/storage/sddr55.c	Fri Sep 27 12:30:17 2002
+++ b/drivers/usb/storage/sddr55.c	Fri Sep 27 12:30:17 2002
@@ -788,7 +788,7 @@
 	/* only check card status if the map isn't allocated, ie no card seen yet
 	 * or if it's been over half a second since we last accessed it
 	 */
-	if (info->lba_to_pba == NULL || jiffies > (info->last_access + HZ/2)) {
+	if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) {
 
 		/* check to see if a card is fitted */
 		result = sddr55_status (us);

  reply	other threads:[~2002-09-27 19:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-27 19:37 [BK PATCH] More USB changes for 2.5.38 Greg KH
2002-09-27 19:38 ` Greg KH
2002-09-27 19:40   ` Greg KH
2002-09-27 19:40     ` Greg KH
2002-09-27 19:42       ` Greg KH
2002-09-27 19:42         ` Greg KH [this message]
2002-09-27 19:43           ` Greg KH
2002-09-27 19:43             ` Greg KH
2002-09-27 19:43               ` Greg KH
2002-09-27 19:44                 ` Greg KH
2002-09-27 19:48                   ` Greg KH

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=20020927194258.GF12909@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /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