From: Yang Guang <yang.gua...@zte.com.cn>

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

Reported-by: Zeal Robot <zea...@zte.com.cn>
Signed-off-by: Yang Guang <yang.gua...@zte.com.cn>
---
 arch/powerpc/platforms/powermac/pic.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/pic.c 
b/arch/powerpc/platforms/powermac/pic.c
index 4921bccf0376..75d8d7ec53db 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -311,11 +311,8 @@ static void __init pmac_pic_probe_oldstyle(void)
 
                /* Check ordering of master & slave */
                if (of_device_is_compatible(master, "gatwick")) {
-                       struct device_node *tmp;
                        BUG_ON(slave == NULL);
-                       tmp = master;
-                       master = slave;
-                       slave = tmp;
+                       swap(master, slave);
                }
 
                /* We found a slave */
-- 
2.30.2

Reply via email to