Skip to content

Commit

Permalink
sparc: Use swap() to fix Coccinelle warning
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
toblux authored and andreas-gaisler committed Apr 22, 2024
1 parent 839c4de commit 6c94284
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/sparc/include/asm/floppy_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6c94284

Please sign in to comment.