projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10f2f19
)
ALSA: hda: use swap() to make code cleaner
author
Yang Guang
<yang.guang5@zte.com.cn>
Sat, 18 Dec 2021 01:54:16 +0000
(09:54 +0800)
committer
Takashi Iwai
<tiwai@suse.de>
Sat, 25 Dec 2021 08:14:19 +0000
(09:14 +0100)
Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Link:
https://lore.kernel.org/r/ebc9db44b802dfc88e1538629b517e000acb27b3.1639790796.git.yang.guang5@zte.com.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/hda_auto_parser.c
b/sound/pci/hda/hda_auto_parser.c
index
4a85447
..
82c492b
100644
(file)
--- a/
sound/pci/hda/hda_auto_parser.c
+++ b/
sound/pci/hda/hda_auto_parser.c
@@
-92,14
+92,10
@@
static int compare_input_type(const void *ap, const void *bp)
*/
static void reorder_outputs(unsigned int nums, hda_nid_t *pins)
{
- hda_nid_t nid;
-
switch (nums) {
case 3:
case 4:
- nid = pins[1];
- pins[1] = pins[2];
- pins[2] = nid;
+ swap(pins[1], pins[2]);
break;
}
}