]> git.neil.brown.name Git - history.git/commitdiff
sysfs: Fixup NUMA sysfs file.
authorPatrick Mochel <mochel@osdl.org>
Mon, 13 Jan 2003 05:55:37 +0000 (23:55 -0600)
committerPatrick Mochel <mochel@osdl.org>
Mon, 13 Jan 2003 05:55:37 +0000 (23:55 -0600)
- Remove count and off parameters from per-node meminfo show() method.

drivers/base/node.c

index 8196d30dad0dd5f6e157d952ac70a969124f84ee..679a4685b0b8ecf56195a93e79697ee403959060 100644 (file)
@@ -36,29 +36,27 @@ static ssize_t node_read_cpumap(struct device * dev, char * buf, size_t count, l
 static DEVICE_ATTR(cpumap,S_IRUGO,node_read_cpumap,NULL);
 
 #define K(x) ((x) << (PAGE_SHIFT - 10))
-static ssize_t node_read_meminfo(struct device * dev, char * buf, size_t count, loff_t off)
+static ssize_t node_read_meminfo(struct device * dev, char * buf)
 {
        struct sys_root *node = to_root(dev);
        int nid = node->id;
        struct sysinfo i;
        si_meminfo_node(&i, nid);
-       return off ? 0 : sprintf(buf, "\n"
-                       "Node %d MemTotal:     %8lu kB\n"
-                       "Node %d MemFree:      %8lu kB\n"
-                       "Node %d MemUsed:      %8lu kB\n"
-                       "Node %d HighTotal:    %8lu kB\n"
-                       "Node %d HighFree:     %8lu kB\n"
-                       "Node %d LowTotal:     %8lu kB\n"
-                       "Node %d LowFree:      %8lu kB\n",
-                       nid, K(i.totalram),
-                       nid, K(i.freeram),
-                       nid, K(i.totalram-i.freeram),
-                       nid, K(i.totalhigh),
-                       nid, K(i.freehigh),
-                       nid, K(i.totalram-i.totalhigh),
-                       nid, K(i.freeram-i.freehigh));
-
-       return 0;
+       return sprintf(buf, "\n"
+                      "Node %d MemTotal:     %8lu kB\n"
+                      "Node %d MemFree:      %8lu kB\n"
+                      "Node %d MemUsed:      %8lu kB\n"
+                      "Node %d HighTotal:    %8lu kB\n"
+                      "Node %d HighFree:     %8lu kB\n"
+                      "Node %d LowTotal:     %8lu kB\n"
+                      "Node %d LowFree:      %8lu kB\n",
+                      nid, K(i.totalram),
+                      nid, K(i.freeram),
+                      nid, K(i.totalram-i.freeram),
+                      nid, K(i.totalhigh),
+                      nid, K(i.freehigh),
+                      nid, K(i.totalram-i.totalhigh),
+                      nid, K(i.freeram-i.freehigh));
 }
 #undef K 
 static DEVICE_ATTR(meminfo,S_IRUGO,node_read_meminfo,NULL);