From nobody@FreeBSD.org  Thu Sep  6 13:15:26 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 889BB106564A
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <joel.sherrill@oarcorp.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Prototype/Body Mismatch for i386 legacy_pcib_read_config
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         171379
>Category:       i386
>Synopsis:       [i386] 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:  Sun Apr 20 02:47:43 UTC 2014
>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:
