projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
839c4de
)
sparc: Use swap() to fix Coccinelle warning
author
Thorsten Blum
<thorsten.blum@toblux.com>
Thu, 4 Apr 2024 11:23:14 +0000
(13:23 +0200)
committer
Andreas Larsson
<andreas@gaisler.com>
Mon, 22 Apr 2024 14:45:22 +0000
(16:45 +0200)
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>
arch/sparc/include/asm/floppy_64.h
patch
|
blob
|
history
diff --git
a/arch/sparc/include/asm/floppy_64.h
b/arch/sparc/include/asm/floppy_64.h
index 6efeb24b0a92cafe92c5c9231ff6f2cf7416d5f9..83decacd0a2d5d1e53d541eccd7da1efe9af140f 100644
(file)
--- 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;