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>
This commit is contained in:
parent
62d89a7d49
commit
963e65dbfd
|
@ -213,7 +213,7 @@ static void sisfb_search_mode(char *name, bool quiet)
|
|||
/* This does some fuzzy mode naming detection */
|
||||
if(sscanf(strbuf1, "%u %u %u %u", &xres, &yres, &depth, &rate) == 4) {
|
||||
if((rate <= 32) || (depth > 32)) {
|
||||
j = rate; rate = depth; depth = j;
|
||||
swap(rate, depth);
|
||||
}
|
||||
sprintf(strbuf, "%ux%ux%u", xres, yres, depth);
|
||||
nameptr = strbuf;
|
||||
|
|
Loading…
Reference in New Issue