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

Configure Feed

Select the types of activity you want to include in your feed.

powerpc: 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>
[mpe: Add include of linux/minmax.h]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/71a702c2189b16c152affd8a8cda1d84ce32741c.1639792543.git.yang.guang5@zte.com.cn

authored by

Yang Guang and committed by
Michael Ellerman
a605b39e 2fe4ca6a

+2 -4
+2 -4
arch/powerpc/platforms/powermac/pic.c
··· 18 18 #include <linux/interrupt.h> 19 19 #include <linux/syscore_ops.h> 20 20 #include <linux/adb.h> 21 + #include <linux/minmax.h> 21 22 #include <linux/pmu.h> 22 23 23 24 #include <asm/sections.h> ··· 312 311 313 312 /* Check ordering of master & slave */ 314 313 if (of_device_is_compatible(master, "gatwick")) { 315 - struct device_node *tmp; 316 314 BUG_ON(slave == NULL); 317 - tmp = master; 318 - master = slave; 319 - slave = tmp; 315 + swap(master, slave); 320 316 } 321 317 322 318 /* We found a slave */