From 93d8be03d9013f64bac974548adbef9a49dfd2d2 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Fri, 1 Jan 2010 20:55:11 +0000 Subject: [PATCH] Quiet variable "shadows" warning: sys/vmmeter.h: warning: shadowed declaration is here machine/cpufunc.h: In function 'insw': machine/cpufunc.h: warning: declaration of 'cnt' shadows a global declaration ..snip.. --- sys/amd64/include/cpufunc.h | 36 ++++++++++++++++++------------------ sys/i386/include/cpufunc.h | 36 ++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index dee78cb57a1d..123e2faea811 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -190,28 +190,28 @@ inl(u_int port) } static __inline void -insb(u_int port, void *addr, size_t cnt) +insb(u_int port, void *addr, size_t count) { __asm __volatile("cld; rep; insb" - : "+D" (addr), "+c" (cnt) + : "+D" (addr), "+c" (count) : "d" (port) : "memory"); } static __inline void -insw(u_int port, void *addr, size_t cnt) +insw(u_int port, void *addr, size_t count) { __asm __volatile("cld; rep; insw" - : "+D" (addr), "+c" (cnt) + : "+D" (addr), "+c" (count) : "d" (port) : "memory"); } static __inline void -insl(u_int port, void *addr, size_t cnt) +insl(u_int port, void *addr, size_t count) { __asm __volatile("cld; rep; insl" - : "+D" (addr), "+c" (cnt) + : "+D" (addr), "+c" (count) : "d" (port) : "memory"); } @@ -244,26 +244,26 @@ outl(u_int port, u_int data) } static __inline void -outsb(u_int port, const void *addr, size_t cnt) +outsb(u_int port, const void *addr, size_t count) { __asm __volatile("cld; rep; outsb" - : "+S" (addr), "+c" (cnt) + : "+S" (addr), "+c" (count) : "d" (port)); } static __inline void -outsw(u_int port, const void *addr, size_t cnt) +outsw(u_int port, const void *addr, size_t count) { __asm __volatile("cld; rep; outsw" - : "+S" (addr), "+c" (cnt) + : "+S" (addr), "+c" (count) : "d" (port)); } static __inline void -outsl(u_int port, const void *addr, size_t cnt) +outsl(u_int port, const void *addr, size_t count) { __asm __volatile("cld; rep; outsl" - : "+S" (addr), "+c" (cnt) + : "+S" (addr), "+c" (count) : "d" (port)); } @@ -670,9 +670,9 @@ void halt(void); void ia32_pause(void); u_char inb(u_int port); u_int inl(u_int port); -void insb(u_int port, void *addr, size_t cnt); -void insl(u_int port, void *addr, size_t cnt); -void insw(u_int port, void *addr, size_t cnt); +void insb(u_int port, void *addr, size_t count); +void insl(u_int port, void *addr, size_t count); +void insw(u_int port, void *addr, size_t count); register_t intr_disable(void); void intr_restore(register_t rf); void invd(void); @@ -697,9 +697,9 @@ void load_gs(u_int sel); void ltr(u_short sel); void outb(u_int port, u_char data); void outl(u_int port, u_int data); -void outsb(u_int port, const void *addr, size_t cnt); -void outsl(u_int port, const void *addr, size_t cnt); -void outsw(u_int port, const void *addr, size_t cnt); +void outsb(u_int port, const void *addr, size_t count); +void outsl(u_int port, const void *addr, size_t count); +void outsw(u_int port, const void *addr, size_t count); void outw(u_int port, u_short data); u_long rcr0(void); u_long rcr2(void); diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index a0cecca05785..2de6f448c9a9 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -203,28 +203,28 @@ inl(u_int port) } static __inline void -insb(u_int port, void *addr, size_t cnt) +insb(u_int port, void *addr, size_t count) { __asm __volatile("cld; rep; insb" - : "+D" (addr), "+c" (cnt) + : "+D" (addr), "+c" (count) : "d" (port) : "memory"); } static __inline void -insw(u_int port, void *addr, size_t cnt) +insw(u_int port, void *addr, size_t count) { __asm __volatile("cld; rep; insw" - : "+D" (addr), "+c" (cnt) + : "+D" (addr), "+c" (count) : "d" (port) : "memory"); } static __inline void -insl(u_int port, void *addr, size_t cnt) +insl(u_int port, void *addr, size_t count) { __asm __volatile("cld; rep; insl" - : "+D" (addr), "+c" (cnt) + : "+D" (addr), "+c" (count) : "d" (port) : "memory"); } @@ -257,26 +257,26 @@ outl(u_int port, u_int data) } static __inline void -outsb(u_int port, const void *addr, size_t cnt) +outsb(u_int port, const void *addr, size_t count) { __asm __volatile("cld; rep; outsb" - : "+S" (addr), "+c" (cnt) + : "+S" (addr), "+c" (count) : "d" (port)); } static __inline void -outsw(u_int port, const void *addr, size_t cnt) +outsw(u_int port, const void *addr, size_t count) { __asm __volatile("cld; rep; outsw" - : "+S" (addr), "+c" (cnt) + : "+S" (addr), "+c" (count) : "d" (port)); } static __inline void -outsl(u_int port, const void *addr, size_t cnt) +outsl(u_int port, const void *addr, size_t count) { __asm __volatile("cld; rep; outsl" - : "+S" (addr), "+c" (cnt) + : "+S" (addr), "+c" (count) : "d" (port)); } @@ -684,9 +684,9 @@ void halt(void); void ia32_pause(void); u_char inb(u_int port); u_int inl(u_int port); -void insb(u_int port, void *addr, size_t cnt); -void insl(u_int port, void *addr, size_t cnt); -void insw(u_int port, void *addr, size_t cnt); +void insb(u_int port, void *addr, size_t count); +void insl(u_int port, void *addr, size_t count); +void insw(u_int port, void *addr, size_t count); register_t intr_disable(void); void intr_restore(register_t ef); void invd(void); @@ -711,9 +711,9 @@ void load_gs(u_int sel); void ltr(u_short sel); void outb(u_int port, u_char data); void outl(u_int port, u_int data); -void outsb(u_int port, const void *addr, size_t cnt); -void outsl(u_int port, const void *addr, size_t cnt); -void outsw(u_int port, const void *addr, size_t cnt); +void outsb(u_int port, const void *addr, size_t count); +void outsl(u_int port, const void *addr, size_t count); +void outsw(u_int port, const void *addr, size_t count); void outw(u_int port, u_short data); u_int rcr0(void); u_int rcr2(void);