Skip to content

Commit 6c94284

Browse files
tobluxandreas-gaisler
authored andcommitted
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 <[email protected]> Reviewed-by: Andreas Larsson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andreas Larsson <[email protected]>
1 parent 839c4de commit 6c94284

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

arch/sparc/include/asm/floppy_64.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -704,9 +704,7 @@ static unsigned long __init sun_floppy_init(void)
704704
ns87303_modify(config, ASC, ASC_DRV2_SEL, 0);
705705
ns87303_modify(config, FCR, 0, FCR_LDE);
706706

707-
config = sun_floppy_types[0];
708-
sun_floppy_types[0] = sun_floppy_types[1];
709-
sun_floppy_types[1] = config;
707+
swap(sun_floppy_types[0], sun_floppy_types[1]);
710708

711709
if (sun_pci_broken_drive != -1) {
712710
sun_pci_broken_drive = 1 - sun_pci_broken_drive;

0 commit comments

Comments
 (0)