From: Yang Guang Date: Sat, 18 Dec 2021 01:56:59 +0000 (+0800) Subject: video: fbdev: sis: use swap() to make code cleaner X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=963e65dbfd352c764be3dcd1683ad205be31b08c;p=linux.git 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 Signed-off-by: David Yang Signed-off-by: Yang Guang Signed-off-by: Helge Deller --- diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index 266a5582f94d3..742f62986b80b 100644 --- a/drivers/video/fbdev/sis/sis_main.c +++ b/drivers/video/fbdev/sis/sis_main.c @@ -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;