lkml.org 
[lkml]   [2006]   [Nov]   [22]   [last100]   RSS Feed
Views: [more markup]   [less markup]   [headers]   [forward]  
 
Messages in this thread
/
DateWed, 22 Nov 2006 11:43:51 +0530
FromGautham R Shenoy <>
SubjectRe: [PATCH 1/4] Extend notifier_call_chain to count nr_calls made.
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.
-- 
Gautham R Shenoy
Linux Technology Center
IBM India.
"Freedom comes with a price tag of responsibility, which is still a bargain,
because Freedom is priceless!"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-22 06:41    [W:0.546 / U:0.050 seconds]
©2003-2008 Jasper Spaans