All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Josef 'Jeff' Sipek" <jeffpc@optonline.net>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6] watch64: generic variable monitoring system
Date: Fri, 03 Sep 2004 16:40:30 -0400	[thread overview]
Message-ID: <200409031640.30731.jeffpc@optonline.net> (raw)
In-Reply-To: <200409031618.47521.jeffpc@optonline.net>

The following fixes watch64 patch previously submitted to follow CodingStyle
guidelines. BK repo is up to date as well

Jeff.

Signed-off-by: Josef "Jeff" Sipek <jeffpc@optonline.net>


--- 1.7/kernel/watch64.c 2004-07-14 16:41:26 -04:00
+++ edited/watch64.c 2004-09-03 16:12:39 -04:00
@@ -110,7 +110,8 @@
   return;
  }
  
- printk(KERN_WARNING "watch64: 2003/08/22 Josef 'Jeff' Sipek <jeffpc@optonline.net>\n");
+ printk(KERN_WARNING "watch64: 2003/08/22 Josef 'Jeff' Sipek "
+     "<jeffpc@optonline.net>\n");
  printk(KERN_WARNING "watch64: Enabling Watch64 extensions...");
 
  init_timer(&watch64_timer);
@@ -139,19 +140,21 @@
  rcu_read_lock();
  list_for_each_rcu(entry, &watch64_head) {
   watch_struct = list_entry(entry, struct watch64, list);
-  if (*watch_struct->ptr != watch_struct->oldval) {
-   tmp = *watch_struct->ptr;
-   if (tmp > watch_struct->oldval) {
-    write_seqlock(&watch_struct->lock);
-    watch_struct->total += tmp - watch_struct->oldval;
-    write_sequnlock(&watch_struct->lock);
-   } else if (tmp < watch_struct->oldval) {
-    write_seqlock(&watch_struct->lock);
-    watch_struct->total += ((u_int64_t) 1<<BITS_PER_LONG) - watch_struct->oldval + tmp;
-    write_sequnlock(&watch_struct->lock);
-   }
-   watch_struct->oldval = tmp;
+  if (*watch_struct->ptr == watch_struct->oldval)
+   continue;
+  
+  tmp = *watch_struct->ptr;
+  if (tmp > watch_struct->oldval) {
+   write_seqlock(&watch_struct->lock);
+   watch_struct->total += tmp - watch_struct->oldval;
+   write_sequnlock(&watch_struct->lock);
+  } else if (tmp < watch_struct->oldval) {
+   write_seqlock(&watch_struct->lock);
+   watch_struct->total += ((u_int64_t) 1<<BITS_PER_LONG)
+      - watch_struct->oldval + tmp;
+   write_sequnlock(&watch_struct->lock);
   }
+  watch_struct->oldval = tmp;
  }
  rcu_read_unlock();
  
@@ -181,7 +184,8 @@
   temp->interval = WATCH64_INTERVAL;
  else if (interval<WATCH64_MINIMUM) {
   temp->interval = WATCH64_MINIMUM;
-  printk("watch64: attempted to add new watch with interval below %d jiffies",WATCH64_MINIMUM);
+  printk("watch64: attempted to add new watch with "
+    "interval below %d jiffies",WATCH64_MINIMUM);
  } else
   temp->interval = interval;
 

  reply	other threads:[~2004-09-03 20:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 17:06 [PATCH/RFC 2.6] NET: 64-bit network statistics josef Jeff Sipek
2004-09-03 17:19 ` [PATCH 2.6] watch64: generic variable monitoring system Josef 'Jeff' Sipek
2004-09-03 19:07   ` YOSHIFUJI Hideaki / 吉藤英明
2004-09-03 20:24     ` Jeff Sipek
2004-09-03 19:16   ` Stephen Hemminger
2004-09-03 20:18     ` Jeff Sipek
2004-09-03 20:40       ` Josef 'Jeff' Sipek [this message]
2004-09-03 21:44     ` Josef 'Jeff' Sipek
2004-09-04 13:19       ` jamal
2004-09-05 16:19         ` Jeff Sipek
2004-09-07 10:18           ` jamal
2004-09-12 15:53             ` Jeff Sipek
2004-09-03 17:22 ` [PATCH 2.6] 64network: 64-bit network statistics Josef 'Jeff' Sipek
2004-09-03 17:24 ` [PATCH/RFC 2.6] NET: " Jeff Sipek

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=200409031640.30731.jeffpc@optonline.net \
    --to=jeffpc@optonline.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=shemminger@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.