Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100522
b: refs/heads/master
c: cffae43
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Thomas Gleixner committed May 23, 2008
1 parent 7fefc23 commit a9d699d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: afc2abc0ae4265730a0fc48618012193a09a1d10
refs/heads/master: cffae437cdfbc8a5370d38cefbff1dfe34dad6ca
25 changes: 12 additions & 13 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ unsigned long __read_mostly tracing_max_latency = (cycle_t)ULONG_MAX;
unsigned long __read_mostly tracing_thresh;

/* dummy trace to disable tracing */
static struct tracer no_tracer __read_mostly =
{
static struct tracer no_tracer __read_mostly = {
.name = "none",
};

Expand Down Expand Up @@ -1906,8 +1905,8 @@ tracing_iter_ctrl_write(struct file *filp, const char __user *ubuf,
int neg = 0;
int i;

if (cnt > 63)
cnt = 63;
if (cnt >= sizeof(buf))
return -EINVAL;

if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
Expand Down Expand Up @@ -1999,8 +1998,8 @@ tracing_ctrl_write(struct file *filp, const char __user *ubuf,
long val;
char buf[64];

if (cnt > 63)
cnt = 63;
if (cnt >= sizeof(buf))
return -EINVAL;

if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
Expand Down Expand Up @@ -2099,10 +2098,10 @@ tracing_max_lat_read(struct file *filp, char __user *ubuf,
char buf[64];
int r;

r = snprintf(buf, 64, "%ld\n",
r = snprintf(buf, sizeof(buf), "%ld\n",
*ptr == (unsigned long)-1 ? -1 : nsecs_to_usecs(*ptr));
if (r > 64)
r = 64;
if (r > sizeof(buf))
r = sizeof(buf);
return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
}

Expand All @@ -2114,8 +2113,8 @@ tracing_max_lat_write(struct file *filp, const char __user *ubuf,
long val;
char buf[64];

if (cnt > 63)
cnt = 63;
if (cnt >= sizeof(buf))
return -EINVAL;

if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
Expand Down Expand Up @@ -2378,8 +2377,8 @@ tracing_entries_write(struct file *filp, const char __user *ubuf,
unsigned long val;
char buf[64];

if (cnt > 63)
cnt = 63;
if (cnt >= sizeof(buf))
return -EINVAL;

if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
Expand Down

0 comments on commit a9d699d

Please sign in to comment.