lkml.org 
[lkml]   [2011]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC tip/core/rcu 14/14] rcu: Add boosting to TREE_PREEMPT_RCU tracing
On 02/23/2011 09:39 AM, Paul E. McKenney wrote:
> rcudir = debugfs_create_dir("rcu", NULL);
> - if (!rcudir)
> + if (IS_ERR_VALUE(rcudir))
> goto free_out;

if !defined(CONFIG_DEBUG_FS)
debugfs_create_xxx() returns ERR_PTR(-ENODEV);
else
debugfs_create_xxx() returns NULL when failed.

Since TREE_RCU_TRACE selects DEBUG_FS, "if (!rcudir)" is correct,
we don't need to change it.
>
> retval = debugfs_create_file("rcudata", 0444, rcudir,
> NULL, &rcudata_fops);
> - if (!retval)
> + if (IS_ERR_VALUE(retval))
> goto free_out;
>
> retval = debugfs_create_file("rcudata.csv", 0444, rcudir,
> NULL, &rcudata_csv_fops);
> - if (!retval)
> + if (IS_ERR_VALUE(retval))
> + goto free_out;
> +
> + retval = rcu_boost_trace_create_file(rcudir);
> + if (retval)
> goto free_out;
>
> retval = debugfs_create_file("rcugp", 0444, rcudir, NULL, &rcugp_fops);
> - if (!retval)
> + if (IS_ERR_VALUE(retval))
> goto free_out;
>
> retval = debugfs_create_file("rcuhier", 0444, rcudir,
> NULL, &rcuhier_fops);
> - if (!retval)
> + if (IS_ERR_VALUE(retval))
> goto free_out;
>
> retval = debugfs_create_file("rcu_pending", 0444, rcudir,
> NULL, &rcu_pending_fops);
> - if (!retval)
> + if (IS_ERR_VALUE(retval))
> goto free_out;
> return 0;
> free_out:



\
 
 \ /
  Last update: 2011-02-23 04:09    [from the cache]
©2003-2011 Jasper Spaans