Skip to content

Commit fb56007

Browse files
Al Viroarndb
authored andcommitted
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 <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent c0dc921 commit fb56007

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

include/linux/vt_buffer.h

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,45 +28,21 @@
2828
#ifndef VT_BUF_HAVE_MEMSETW
2929
static inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
3030
{
31-
#ifdef VT_BUF_HAVE_RW
32-
count /= 2;
33-
while (count--)
34-
scr_writew(c, s++);
35-
#else
3631
memset16(s, c, count / 2);
37-
#endif
3832
}
3933
#endif
4034

4135
#ifndef VT_BUF_HAVE_MEMCPYW
4236
static inline void scr_memcpyw(u16 *d, const u16 *s, unsigned int count)
4337
{
44-
#ifdef VT_BUF_HAVE_RW
45-
count /= 2;
46-
while (count--)
47-
scr_writew(scr_readw(s++), d++);
48-
#else
4938
memcpy(d, s, count);
50-
#endif
5139
}
5240
#endif
5341

5442
#ifndef VT_BUF_HAVE_MEMMOVEW
5543
static inline void scr_memmovew(u16 *d, const u16 *s, unsigned int count)
5644
{
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
6845
memmove(d, s, count);
69-
#endif
7046
}
7147
#endif
7248

0 commit comments

Comments
 (0)