CC: [email protected] CC: [email protected] TO: Denis Efremov <[email protected]> CC: Julia Lawall <[email protected]> CC: Michael Ellerman <[email protected]> CC: Benjamin Herrenschmidt <[email protected]> CC: Paul Mackerras <[email protected]> CC: Nathan Chancellor <[email protected]> CC: Xiongwei Song <[email protected]> CC: [email protected] CC: [email protected]
From: kernel test robot <[email protected]> arch/powerpc/kernel/fadump.c:1285:34-35: WARNING opportunity for swap() Check for opencoded swap() implementation. Generated by: scripts/coccinelle/misc/swap.cocci CC: Denis Efremov <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: kernel test robot <[email protected]> --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 2b14864acbaaf03d9c01982e243a84632524c3ac commit: 7845daa8bd72efa8bbc1de122edfce6e058bbe41 coccinelle: misc: add swap script :::::: branch date: 19 hours ago :::::: commit date: 8 months ago Please take the patch only if it's a positive warning. Thanks! fadump.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -1280,11 +1280,9 @@ static void sort_and_merge_mem_ranges(st if (mem_ranges[idx].base > mem_ranges[j].base) idx = j; } - if (idx != i) { - tmp_range = mem_ranges[idx]; - mem_ranges[idx] = mem_ranges[i]; - mem_ranges[i] = tmp_range; - } + if (idx != i) + + swap(mem_ranges[idx], mem_ranges[i]); } /* Merge adjacent reserved ranges */ _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
