Bug 81608

Summary: smp.h and shced.h give conflicting defines for cpu_online.
Product: [Retired] Red Hat Raw Hide Reporter: Aleksey Nogin <aleksey>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: 1.0CC: pfrields
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-30 04:01:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksey Nogin 2003-01-11 00:54:27 UTC
Not sure whether this is a problem or not, but when compiling some custom module
using the stock kernel-source-2.4.20-2.10 from Rawhide, I get

In file included from /usr/src/linux-2.4/include/linux/mm.h:22,
                 from /usr/src/linux-2.4/include/linux/slab.h:14,
                 from /usr/src/linux-2.4/include/asm/pci.h:32,
                 from /usr/src/linux-2.4/include/linux/pci.h:657,
                 from pcibus.c:5:
/usr/src/linux-2.4/include/linux/sched.h:548:1: warning: "cpu_online" redefined
In file included from /usr/src/linux-2.4/include/linux/sched.h:25,
                 from /usr/src/linux-2.4/include/linux/mm.h:22,
                 from /usr/src/linux-2.4/include/linux/slab.h:14,
                 from /usr/src/linux-2.4/include/asm/pci.h:32,
                 from /usr/src/linux-2.4/include/linux/pci.h:657,
                 from pcibus.c:5:
/usr/src/linux-2.4/include/linux/smp.h:87:1: warning: this is the location of
the previous definition

Indeed,  grep shows:

/usr/src/linux-2.4/include/linux/sched.h:548:#define cpu_online(cpu) ((cpu) <
smp_num_cpus)
/usr/src/linux-2.4/include/linux/smp.h:87:#define cpu_online(cpu)              
    ({ BUG_ON((cpu) != 0); 1; })

Comment 1 Arjan van de Ven 2003-01-12 21:55:47 UTC
thanks for the report; fixed for next build

Comment 2 Aleksey Nogin 2003-01-15 22:07:34 UTC
Still there in 2.4.20-2.15 (built a day after your last comment). I will keep it
closed for now, will reopen if still there next time.

Comment 3 Arjan van de Ven 2003-01-15 22:10:42 UTC
I will reopen anyway since the fix gave other shit (unresolved symbols)
will be fixed but not today ;)