ftrace: cleanups
no code changed. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Thomas Gleixner
parent
d4c5a2f587
commit
4bf39a9411
@@ -756,9 +756,11 @@ ftrace_avail_open(struct inode *inode, struct file *file)
|
|||||||
ret = seq_open(file, &show_ftrace_seq_ops);
|
ret = seq_open(file, &show_ftrace_seq_ops);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
struct seq_file *m = file->private_data;
|
struct seq_file *m = file->private_data;
|
||||||
|
|
||||||
m->private = iter;
|
m->private = iter;
|
||||||
} else
|
} else {
|
||||||
kfree(iter);
|
kfree(iter);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -770,6 +772,7 @@ int ftrace_avail_release(struct inode *inode, struct file *file)
|
|||||||
|
|
||||||
seq_release(inode, file);
|
seq_release(inode, file);
|
||||||
kfree(iter);
|
kfree(iter);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1620,8 +1620,7 @@ tracing_set_trace_read(struct file *filp, char __user *ubuf,
|
|||||||
r = sprintf(buf, "\n");
|
r = sprintf(buf, "\n");
|
||||||
mutex_unlock(&trace_types_lock);
|
mutex_unlock(&trace_types_lock);
|
||||||
|
|
||||||
return simple_read_from_buffer(ubuf, cnt, ppos,
|
return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
|
||||||
buf, r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
@@ -1680,8 +1679,7 @@ tracing_max_lat_read(struct file *filp, char __user *ubuf,
|
|||||||
*ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr));
|
*ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr));
|
||||||
if (r > 64)
|
if (r > 64)
|
||||||
r = 64;
|
r = 64;
|
||||||
return simple_read_from_buffer(ubuf, cnt, ppos,
|
return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
|
||||||
buf, r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t
|
||||||
@@ -1925,8 +1923,8 @@ tracing_read_long(struct file *filp, char __user *ubuf,
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = sprintf(buf, "%ld\n", *p);
|
r = sprintf(buf, "%ld\n", *p);
|
||||||
return simple_read_from_buffer(ubuf, cnt, ppos,
|
|
||||||
buf, r);
|
return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations tracing_read_long_fops = {
|
static struct file_operations tracing_read_long_fops = {
|
||||||
|
Reference in New Issue
Block a user