]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
lowmem: remove an unecessary local variable
authorViktor Rosendahl <viktor.rosendahl@nokia.com>
Thu, 11 Sep 2008 16:20:36 +0000 (19:20 +0300)
committerTony Lindgren <tony@atomide.com>
Fri, 12 Sep 2008 18:11:42 +0000 (11:11 -0700)
This "changed" variable is kind of deprecated. We used to have a spinlock
[which was later deemed unecessary] around the first if clause in the
*_watermark_state() functions; the variable was needed in order to move the
operation in the second if clause out of the lock section.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
security/lowmem.c

index 2dc0c4a78e0826f3d02fabbfe22d0ec719456c07..183c57fb280b14194f114f53fc290b5d77333868 100644 (file)
@@ -136,28 +136,18 @@ KERNEL_ATTR_RO(high_watermark);
 
 static void low_watermark_state(int new_state)
 {
-       int changed = 0;
-
        if (low_watermark_reached != new_state) {
                low_watermark_reached = new_state;
-               changed = 1;
-       }
-
-       if (changed)
                sysfs_notify(&kernel_subsys.kset.kobj, NULL, "low_watermark");
+       }
 }
 
 static void high_watermark_state(int new_state)
 {
-       int changed = 0;
-
        if (high_watermark_reached != new_state) {
                high_watermark_reached = new_state;
-               changed = 1;
-       }
-
-       if (changed)
                sysfs_notify(&kernel_subsys.kset.kobj, NULL, "high_watermark");
+       }
 }
 
 static int low_vm_enough_memory(long pages)