summaryrefslogtreecommitdiff
path: root/arch/sparc
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-04-04 14:23:14 +0300
committerAndreas Larsson <andreas@gaisler.com>2024-04-22 17:45:22 +0300
commit6c94284465ffefa9c5afc5288bb8cec2a020317f (patch)
treeaa2ca712d874000df66d0bc8ce1325939efc1f0f /arch/sparc
parent839c4dece27426a3f24ca3cb9b6624ce576374bd (diff)
downloadlinux-6c94284465ffefa9c5afc5288bb8cec2a020317f.tar.xz
sparc: Use swap() to fix Coccinelle warning
Fixes the following Coccinelle/coccicheck warning reported by swap.cocci: WARNING opportunity for swap() Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Reviewed-by: Andreas Larsson <andreas@gaisler.com> Link: https://lore.kernel.org/r/20240404112313.11898-2-thorsten.blum@toblux.com Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/floppy_64.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index 6efeb24b0a92..83decacd0a2d 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -704,9 +704,7 @@ static unsigned long __init sun_floppy_init(void)
ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
ns87303_modify(config, FCR, 0, FCR_LDE);
- config = sun_floppy_types[0];
- sun_floppy_types[0] = sun_floppy_types[1];
- sun_floppy_types[1] = config;
+ swap(sun_floppy_types[0], sun_floppy_types[1]);
if (sun_pci_broken_drive != -1) {
sun_pci_broken_drive = 1 - sun_pci_broken_drive;