From owner-svn-src-head@FreeBSD.ORG Sat Nov 10 13:24:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59A5E688; Sat, 10 Nov 2012 13:24:34 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 34B348FC0A; Sat, 10 Nov 2012 13:24:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAADOYHW018143; Sat, 10 Nov 2012 13:24:34 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAADOYw0018142; Sat, 10 Nov 2012 13:24:34 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <201211101324.qAADOYw0018142@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sat, 10 Nov 2012 13:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242866 - head/sys/pc98/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2012 13:24:34 -0000 Author: nyan Date: Sat Nov 10 13:24:33 2012 New Revision: 242866 URL: http://svnweb.freebsd.org/changeset/base/242866 Log: Use ANSI prototype to fix build with clang. MFC after: 1 week Modified: head/sys/pc98/include/bus.h Modified: head/sys/pc98/include/bus.h ============================================================================== --- head/sys/pc98/include/bus.h Sat Nov 10 12:42:28 2012 (r242865) +++ head/sys/pc98/include/bus.h Sat Nov 10 13:24:33 2012 (r242866) @@ -317,24 +317,22 @@ _BUS_ACCESS_METHODS_PROTO(u_int32_t,4) /* * read methods */ -#define _BUS_SPACE_READ(TYPE,BWN) \ -static __inline TYPE \ -bus_space_read_##BWN (tag, bsh, offset) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ -{ \ - register TYPE result; \ - \ - __asm __volatile("call *%2" \ - :"=a" (result), \ - "=d" (offset) \ - :"o" (bsh->bsh_bam.bs_read_##BWN), \ - "b" (bsh), \ - "1" (offset) \ - ); \ - \ - return result; \ +#define _BUS_SPACE_READ(TYPE,BWN) \ +static __inline TYPE \ +bus_space_read_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset) \ +{ \ + register TYPE result; \ + \ + __asm __volatile("call *%2" \ + :"=a" (result), \ + "=d" (offset) \ + :"o" (bsh->bsh_bam.bs_read_##BWN), \ + "b" (bsh), \ + "1" (offset) \ + ); \ + \ + return result; \ } _BUS_SPACE_READ(u_int8_t,1) @@ -344,22 +342,19 @@ _BUS_SPACE_READ(u_int32_t,4) /* * write methods */ -#define _BUS_SPACE_WRITE(TYPE,BWN) \ -static __inline void \ -bus_space_write_##BWN (tag, bsh, offset, val) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ -{ \ - \ - __asm __volatile("call *%1" \ - :"=d" (offset) \ - :"o" (bsh->bsh_bam.bs_write_##BWN), \ - "a" (val), \ - "b" (bsh), \ - "0" (offset) \ - ); \ +#define _BUS_SPACE_WRITE(TYPE,BWN) \ +static __inline void \ +bus_space_write_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, TYPE val) \ +{ \ + \ + __asm __volatile("call *%1" \ + :"=d" (offset) \ + :"o" (bsh->bsh_bam.bs_write_##BWN), \ + "a" (val), \ + "b" (bsh), \ + "0" (offset) \ + ); \ } _BUS_SPACE_WRITE(u_int8_t,1) @@ -371,12 +366,8 @@ _BUS_SPACE_WRITE(u_int32_t,4) */ #define _BUS_SPACE_READ_MULTI(TYPE,BWN) \ static __inline void \ -bus_space_read_multi_##BWN (tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE *buf; \ - size_t cnt; \ +bus_space_read_multi_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, TYPE *buf, size_t cnt) \ { \ \ __asm __volatile("call *%3" \ @@ -400,12 +391,8 @@ _BUS_SPACE_READ_MULTI(u_int32_t,4) */ #define _BUS_SPACE_WRITE_MULTI(TYPE,BWN) \ static __inline void \ -bus_space_write_multi_##BWN (tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - const TYPE *buf; \ - size_t cnt; \ +bus_space_write_multi_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, const TYPE *buf, size_t cnt) \ { \ \ __asm __volatile("call *%3" \ @@ -429,12 +416,8 @@ _BUS_SPACE_WRITE_MULTI(u_int32_t,4) */ #define _BUS_SPACE_READ_REGION(TYPE,BWN) \ static __inline void \ -bus_space_read_region_##BWN (tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE *buf; \ - size_t cnt; \ +bus_space_read_region_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, TYPE *buf, size_t cnt) \ { \ \ __asm __volatile("call *%3" \ @@ -458,12 +441,8 @@ _BUS_SPACE_READ_REGION(u_int32_t,4) */ #define _BUS_SPACE_WRITE_REGION(TYPE,BWN) \ static __inline void \ -bus_space_write_region_##BWN (tag, bsh, offset, buf, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - const TYPE *buf; \ - size_t cnt; \ +bus_space_write_region_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, const TYPE *buf, size_t cnt) \ { \ \ __asm __volatile("call *%3" \ @@ -487,12 +466,8 @@ _BUS_SPACE_WRITE_REGION(u_int32_t,4) */ #define _BUS_SPACE_SET_MULTI(TYPE,BWN) \ static __inline void \ -bus_space_set_multi_##BWN (tag, bsh, offset, val, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ - size_t cnt; \ +bus_space_set_multi_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, TYPE val, size_t cnt) \ { \ \ __asm __volatile("call *%2" \ @@ -515,12 +490,8 @@ _BUS_SPACE_SET_MULTI(u_int32_t,4) */ #define _BUS_SPACE_SET_REGION(TYPE,BWN) \ static __inline void \ -bus_space_set_region_##BWN (tag, bsh, offset, val, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t bsh; \ - bus_size_t offset; \ - TYPE val; \ - size_t cnt; \ +bus_space_set_region_##BWN (bus_space_tag_t tag, bus_space_handle_t bsh, \ + bus_size_t offset, TYPE val, size_t cnt) \ { \ \ __asm __volatile("call *%2" \ @@ -543,13 +514,8 @@ _BUS_SPACE_SET_REGION(u_int32_t,4) */ #define _BUS_SPACE_COPY_REGION(BWN) \ static __inline void \ -bus_space_copy_region_##BWN (tag, sbsh, src, dbsh, dst, cnt) \ - bus_space_tag_t tag; \ - bus_space_handle_t sbsh; \ - bus_size_t src; \ - bus_space_handle_t dbsh; \ - bus_size_t dst; \ - size_t cnt; \ +bus_space_copy_region_##BWN (bus_space_tag_t tag, bus_space_handle_t sbsh, \ + bus_size_t src, bus_space_handle_t dbsh, bus_size_t dst, size_t cnt) \ { \ \ if (dbsh->bsh_bam.bs_copy_region_1 != sbsh->bsh_bam.bs_copy_region_1) \