Date: Thu, 6 Sep 2012 13:15:25 GMT From: Joel Sherrill <joel.sherrill@oarcorp.com> To: freebsd-gnats-submit@FreeBSD.org Subject: i386/171379: Prototype/Body Mismatch for i386 legacy_pcib_read_config Message-ID: <201209061315.q86DFPbm066645@red.freebsd.org> Resent-Message-ID: <201209061320.q86DK7WL078672@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209061315.q86DFPbm066645>