model->reg_setup(®, ctr, &sys);
/* Configure the registers on all cpus. */
- smp_call_function(model->cpu_setup, ®, 0, 1);
+ (void)smp_call_function(model->cpu_setup, ®, 0, 1);
model->cpu_setup(®);
return 0;
}
static int
op_axp_start(void)
{
- smp_call_function(op_axp_cpu_start, NULL, 0, 1);
+ (void)smp_call_function(op_axp_cpu_start, NULL, 0, 1);
op_axp_cpu_start(NULL);
return 0;
}
static void
op_axp_stop(void)
{
- smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
+ (void)smp_call_function(op_axp_cpu_stop, NULL, 0, 1);
op_axp_cpu_stop(NULL);
}
for (i = 0; i < model->num_counters; ++i) {
struct dentry *dir;
- char buf[3];
+ char buf[4];
snprintf(buf, sizeof buf, "%d", i);
dir = oprofilefs_mkdir(sb, root, buf);
return 0;
}
-static struct oprofile_operations oprof_axp_ops = {
- .create_files = op_axp_create_files,
- .setup = op_axp_setup,
- .shutdown = op_axp_shutdown,
- .start = op_axp_start,
- .stop = op_axp_stop,
- .cpu_type = NULL /* To be filled in below. */
-};
-
int __init
-oprofile_arch_init(struct oprofile_operations **ops)
+oprofile_arch_init(struct oprofile_operations *ops)
{
struct op_axp_model *lmodel = NULL;
return -ENODEV;
model = lmodel;
- oprof_axp_ops.cpu_type = lmodel->cpu_type;
- *ops = &oprof_axp_ops;
+ ops->create_files = op_axp_create_files;
+ ops->setup = op_axp_setup;
+ ops->shutdown = op_axp_shutdown;
+ ops->start = op_axp_start;
+ ops->stop = op_axp_stop;
+ ops->cpu_type = lmodel->cpu_type;
printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
lmodel->cpu_type);