Red Hat Bugzilla – Bug 152634
Compiler warning from error in include/linux/delay.h
Last modified: 2015-01-04 17:18:23 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10.1
Description of problem:
The definition of mdelay() in include/linux/delay.h includes a definition of the variable warned, but the following use of that variable is commented out. This results in every module that uses the mdelay macro giving a warning about the unused variable warned.
Assuming the reason for commenting out the use of the variable is valid, the definition of the variable should also be commented out. Here is the definition:
#define mdelay(n) ( \
static int warned=0; \
unsigned long __ms=(n); \
/*WARN_ON(in_irq() && !(warned++));*/ \
while (__ms--) udelay(1000); \
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.install kernel source rpm
2.rpmbuild -bb /usr/src/redhat/SPECS/kernel-2.6.spec
Actual Results: Compilation warnings such as:
drivers/video/cirrusfb.c: In function `init_vgachip':
drivers/video/cirrusfb.c:1801: warning: unused variable `warned'
Expected Results: None of those warnings
This obviously does not cause any real harm, but the fix is trivial and would help reduce the clutter of meaningless warnings making it easier to see real warnings that might cause real problems.
already fixed in CVS, will be in U1.