Date: Sat, 10 Nov 2012 13:24:34 +0000 (UTC) From: Takahashi Yoshihiro <nyan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242866 - head/sys/pc98/include Message-ID: <201211101324.qAADOYw0018142@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211101324.qAADOYw0018142>