diff options
author | Yang Guang <yang.guang5@zte.com.cn> | 2021-12-18 09:56:59 +0800 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2022-01-29 22:24:25 +0100 |
commit | 963e65dbfd352c764be3dcd1683ad205be31b08c (patch) | |
tree | f20e8219fea43ca1da7068a59ce7d874c0a71257 /drivers | |
parent | 62d89a7d49afe46e6b9bbe9e23b004ad848dbde4 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/sis/sis_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c index 266a5582f94d..742f62986b80 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; |