Re: [PATCH 1/4] Extend notifier_call_chain to count nr_calls made.

Gautham R Shenoy
2006-11-22T06:35:48Z

Hi Andrew,

On Mon, Nov 20, 2006 at 10:19:41PM -0800, Andrew Morton wrote:

> > +
> > + if (nr_calls)
> > + *nr_calls ++;
>
> This gets
>
> kernel/sys.c: In function 'notifier_call_chain':
> kernel/sys.c:164: warning: value computed is not used
>
>
> And indeed, this code doesn't work.
>
> What happened?

I didn't get the warnings because my test box still has the prehistoric
version 3.4.4 of gcc.
I compiled the code with gcc 4.1.1 and got the warnings.

The code does not work because of my carelessness.
It should have been (*nr_calls)++ in the first place. I apologise.

Thanks for fixing it.

Regards
gautham.