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,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);
......
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