From owner-freebsd-i386@FreeBSD.ORG Thu Sep 6 13:20:08 2012 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F1C341065672 for ; Thu, 6 Sep 2012 13:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B0EAF8FC0C for ; Thu, 6 Sep 2012 13:20:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q86DK7rq078683 for ; Thu, 6 Sep 2012 13:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q86DK7WL078672; Thu, 6 Sep 2012 13:20:07 GMT (envelope-from gnats) Resent-Date: Thu, 6 Sep 2012 13:20:07 GMT Resent-Message-Id: <201209061320.q86DK7WL078672@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joel Sherrill Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 889BB106564A for ; Thu, 6 Sep 2012 13:15:26 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 733EC8FC0A for ; Thu, 6 Sep 2012 13:15:26 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q86DFQA3066646 for ; Thu, 6 Sep 2012 13:15:26 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q86DFPbm066645; Thu, 6 Sep 2012 13:15:25 GMT (envelope-from nobody) Message-Id: <201209061315.q86DFPbm066645@red.freebsd.org> Date: Thu, 6 Sep 2012 13:15:25 GMT From: Joel Sherrill To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: i386/171379: Prototype/Body Mismatch for i386 legacy_pcib_read_config X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 13:20:08 -0000 >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: