Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vt_buffer.h: get rid of dead code in default scr_...() instances

Only 4 architectures define VT_BUF_HAVE_RW (alpha, mips, powerpc, sparc)
and all of them define VT_BUF_HAVE_MEM{SET,CPY,MOVE}W. In other
words, the code under #ifdef VT_BUF_HAVE_RW in default scr_mem...w()
instances won't be compiled anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

Al Viro and committed by
Arnd Bergmann
fb56007c c0dc9214

-24
-24
include/linux/vt_buffer.h
··· 28 28 #ifndef VT_BUF_HAVE_MEMSETW 29 29 static inline void scr_memsetw(u16 *s, u16 c, unsigned int count) 30 30 { 31 - #ifdef VT_BUF_HAVE_RW 32 - count /= 2; 33 - while (count--) 34 - scr_writew(c, s++); 35 - #else 36 31 memset16(s, c, count / 2); 37 - #endif 38 32 } 39 33 #endif 40 34 41 35 #ifndef VT_BUF_HAVE_MEMCPYW 42 36 static inline void scr_memcpyw(u16 *d, const u16 *s, unsigned int count) 43 37 { 44 - #ifdef VT_BUF_HAVE_RW 45 - count /= 2; 46 - while (count--) 47 - scr_writew(scr_readw(s++), d++); 48 - #else 49 38 memcpy(d, s, count); 50 - #endif 51 39 } 52 40 #endif 53 41 54 42 #ifndef VT_BUF_HAVE_MEMMOVEW 55 43 static inline void scr_memmovew(u16 *d, const u16 *s, unsigned int count) 56 44 { 57 - #ifdef VT_BUF_HAVE_RW 58 - if (d < s) 59 - scr_memcpyw(d, s, count); 60 - else { 61 - count /= 2; 62 - d += count; 63 - s += count; 64 - while (count--) 65 - scr_writew(scr_readw(--s), --d); 66 - } 67 - #else 68 45 memmove(d, s, count); 69 - #endif 70 46 } 71 47 #endif 72 48