Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp282220pxj; Thu, 13 May 2021 04:59:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL93HaPpR1YyYwQbMsTaOcg9jggjfKzN3ZwSxU7OzmHps7Xyd9rxiHycMuPoJHja8Hi/Bd X-Received: by 2002:a02:6d6c:: with SMTP id e44mr36861136jaf.81.1620907195066; Thu, 13 May 2021 04:59:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620907195; cv=none; d=google.com; s=arc-20160816; b=elZ0pOshyB4jL8XlQ7+AGVco+0rPNtRRHvmZ9aAoBa4+Iv43H82LpPn9pcLZwZqoI3 LM/u0Sl+IBb0sgEEtDk9guwzX8fLQ1eiRx2JjPHjZgWYK8BwMTMP5PWBSzYu8GK4k5CE SXKM4g4x5FYMSnYS+jADPxNouD29Fx46aFoKhsKVyWu0wNvsKkFNSLgpWBuFMhdlNvPt vWmo5b56yuJQcRGWPSC4AktmJz3seIua3qcK8+U1ndtGNKYP4pClQxtEuEIp8cGf0Mj9 UeWxsMozL7Iq4xPR+yx8p0ZYp/JYnxaVXIBaDAjGVv4wulLg8zNdIA4DnDXE39NglxfU OglA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=IB8a2vzI5A2clSIWuTFCODj6iJlwexveyibWadgKzeY=; b=W7AWcf9Maj6ZlPdQmuDsxvaasQXBGxO25hbZPTQC4f0kE4bfSqcDXLcJEue+/64mZL KGimQpJsRpRDZ+sAq9oxV7IQDK33eZcGtUX0pQl0EovP+9N3qXgPPGlsbJEGi9omQYma WCOn4XqbveHBVUCelXm3Ci953VW5IXnJHhnkUkPGoAjAMsyvHwIZxWyg7Cis8zL6fuG9 Am+w/tvp0D9BXsIROHmze65RPqDgOucguktKYKeQ9tdwqxYiZ7mrqU8wo+G8LNeNp08L vCzYV1TYgr0uW5QREYCBOrEIjurmxorEg6hlQoUjfTqY6Xn9UMeicrtiwV+vIXHpQ+Bj DuXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si3251133ioq.28.2021.05.13.04.59.41; Thu, 13 May 2021 04:59:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233232AbhEMLMa (ORCPT + 99 others); Thu, 13 May 2021 07:12:30 -0400 Received: from out30-130.freemail.mail.aliyun.com ([115.124.30.130]:43801 "EHLO out30-130.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbhEMLM2 (ORCPT ); Thu, 13 May 2021 07:12:28 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R361e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0UYkXXym_1620904272; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UYkXXym_1620904272) by smtp.aliyun-inc.com(127.0.0.1); Thu, 13 May 2021 19:11:17 +0800 From: Jiapeng Chong To: perex@perex.cz Cc: tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH v2] ALSA: hda: generic: Remove redundant assignment to dac Date: Thu, 13 May 2021 19:11:11 +0800 Message-Id: <1620904271-76027-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Jiapeng Chong --- 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