[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1620904271-76027-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Thu, 13 May 2021 19:11:11 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: perex@...ex.cz
Cc: tiwai@...e.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH v2] ALSA: hda: generic: Remove redundant assignment to dac
Variable dac is set to zero, but this value is never read as it is
overwritten or not used later on, hence it is a redundant assignment
and can be removed.
Clean up the following clang-analyzer warning:
sound/pci/hda/hda_generic.c:1436:4: warning: Value stored to 'dac' is
never read [clang-analyzer-deadcode.DeadStores].
Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
Changes in v2:
-For the follow advice: https://lore.kernel.org/patchwork/patch/1423536/
sound/pci/hda/hda_generic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index b638fc2..fc02957 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1433,7 +1433,7 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs,
path = snd_hda_add_new_path(codec, dac, pin, 0);
}
if (!path) {
- dac = dacs[i] = 0;
+ dacs[i] = 0;
badness += bad->no_dac;
} else {
/* print_nid_path(codec, "output", path); */
--
1.8.3.1
Powered by blists - more mailing lists