Re: [mm patch] oprofile: backtrace operation does not initialized

From: John Levon
Date: Thu Dec 09 2004 - 09:59:31 EST


On Thu, Dec 09, 2004 at 11:53:53PM +0900, Akinobu Mita wrote:

> Or, It may be better to revert the return type of oprofile_arch_init()
> from "void" to "int" to get the result of initialization.
> Though I don't know when/why its interface was changed. and some
> architectures (ppc, sh64, m32r) remain to have old interfaces in -mm.

I've also lost track of why we don't return -ENODEV from the
arch_init().

We should set -ENODEV after setting ->backtrace as appropriate. Then the
code should do what it used to do:

138 int err = oprofile_arch_init(&oprofile_ops);
139
140 if (err == -ENODEV || timer) {
141 timer_init(&oprofile_ops);
142 err = 0;
143 } else if (err) {
144 goto out;
145 }

john
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/