i386/171379: Prototype/Body Mismatch for i386
legacy_pcib_read_config
Joel Sherrill
joel.sherrill at oarcorp.com
Thu Sep 6 13:20:08 UTC 2012
>Number: 171379
>Category: i386
>Synopsis: Prototype/Body Mismatch for i386 legacy_pcib_read_config
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-i386
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Sep 06 13:20:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Joel Sherrill
>Release: 8.3.0
>Organization:
RTEMS Project
>Environment:
Porting FreeBSD 8.x USB and TCP/IP stacks to RTEMS.
This difference in build environment highlights nits like this.
>Description:
The prototype for legacy_pcib_read_config in sys/i386/include/legacyvar.h and the body in sys/i386/pci/pci_bus.c have a subtle difference. The .h has a return type of uint32_t while the body is returning u_int32_t. Notice the _ after the u.
sys/i386/include/legacyvar.h
uint32_t legacy_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func,
u_int reg, int bytes);
sys/i386/pci/pci_bus.c
u_int32_t
legacy_pcib_read_config(device_t dev, u_int bus, u_int slot, u_int func,
u_int reg, int bytes)
This particular code appears to have been removed in 9.x.
However, we have spotted variations on this problem in other files. For example, sys/net/radix_mpath.[ch] has a similar problem for rn_mpath_count() and rtalloc_mpath_fib().
As minor as these are, they are inconsistencies. As code clean up issues, are issues like these of interest to FreeBSD developers?
>How-To-Repeat:
>Fix:
Simply change the body to match the prototype.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-i386
mailing list