Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 152634 - Compiler warning from error in include/linux/delay.h
Compiler warning from error in include/linux/delay.h
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Dave Jones
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-03-30 16:59 EST by John A. Tamplin
Modified: 2015-01-04 17:18 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-06-27 16:07:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John A. Tamplin 2005-03-30 16:59:08 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):

How reproducible:

Steps to Reproduce:
1.install kernel source rpm
2.rpmbuild -bb /usr/src/redhat/SPECS/kernel-2.6.spec
3.notice warnings

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 

Additional info:

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.
Comment 1 Dave Jones 2005-03-30 17:08:35 EST
already fixed in CVS, will be in U1.

Note You need to log in before you can comment on or make changes to this bug.