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

video: fbdev: sis: use swap() to make code cleaner

Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Yang Guang and committed by
Helge Deller
963e65db 62d89a7d

+1 -1
+1 -1
drivers/video/fbdev/sis/sis_main.c
··· 213 213 /* This does some fuzzy mode naming detection */ 214 214 if(sscanf(strbuf1, "%u %u %u %u", &xres, &yres, &depth, &rate) == 4) { 215 215 if((rate <= 32) || (depth > 32)) { 216 - j = rate; rate = depth; depth = j; 216 + swap(rate, depth); 217 217 } 218 218 sprintf(strbuf, "%ux%ux%u", xres, yres, depth); 219 219 nameptr = strbuf;