Commit 71b9ad66 authored by Patrick Mochel's avatar Patrick Mochel

sysfs: Fixup NUMA sysfs file.

- Remove count and off parameters from per-node meminfo show() method.
parent b61ea41d
......@@ -36,13 +36,13 @@ 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"
return sprintf(buf, "\n"
"Node %d MemTotal: %8lu kB\n"
"Node %d MemFree: %8lu kB\n"
"Node %d MemUsed: %8lu kB\n"
......@@ -57,8 +57,6 @@ static ssize_t node_read_meminfo(struct device * dev, char * buf, size_t count,
nid, K(i.freehigh),
nid, K(i.totalram-i.totalhigh),
nid, K(i.freeram-i.freehigh));
return 0;
}
#undef K
static DEVICE_ATTR(meminfo,S_IRUGO,node_read_meminfo,NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment