Re: [PATCH 4/7] ARM: oprofile: Move non-ARM code into separateinit/exit

From: Robert Richter
Date: Wed Oct 06 2010 - 14:44:25 EST


On 06.10.10 14:23:17, Grant Likely wrote:
> >> diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
> >> index b336cd9..76d97a5 100644
> >> --- a/drivers/oprofile/oprof.c
> >> +++ b/drivers/oprofile/oprof.c
> >> @@ -252,6 +252,8 @@ static int __init oprofile_init(void)
> >>  {
> >>       int err;
> >>
> >> +     memset(&oprofile_ops, 0, sizeof(struct oprofile_operations));
> >> +
> >
> > Yes, this looks much better. Thanks Paul.
>
> oprofile_ops is allocated in bss and so is already zeroed. No need to
> do it explicitly.

Before oprofile_arch_init() it isn't necessarily needed, but we should
definitely add it before oprofile_timer_init(). For code readability I
would rather tend to let the first in too.

-Robert

--
Advanced Micro Devices, Inc.
Operating System Research Center

--
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/