From patchwork Thu Sep 1 10:28:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentina Goncharenko X-Patchwork-Id: 12963639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B49E1ECAAA1 for ; Fri, 2 Sep 2022 06:03:44 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9F3A71630; Fri, 2 Sep 2022 08:02:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9F3A71630 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662098622; bh=VetbOzof6aLXxmltfifFTKX6aMKDbev/eE8VPkjVHsg=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Sc2uP6maJObqrMphBTlegN7xLZXSTHn308SCEAjHX8M1ExlB8XL9ZMSOn5VY7Q1SG fbHPim9yWyJanMdtB71BC/FDKDFVsnZ+QUCbraKyLSLEB9OE33bjQZV4eTcf196/nB GxxeMEirNHSPDKWRYZ5Zv+jnRY6kn3cVUlMWlAjk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 40762F8020D; Fri, 2 Sep 2022 08:02:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B2ADFF8026D; Thu, 1 Sep 2022 12:28:46 +0200 (CEST) Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CE9CBF800EB for ; Thu, 1 Sep 2022 12:28:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE9CBF800EB Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPSA id E5B9B40D403D; Thu, 1 Sep 2022 10:28:31 +0000 (UTC) From: Valentina Goncharenko To: Jaroslav Kysela Subject: [PATCH] ALSA: asihpi - Remove useless code in hpi_meter_get_peak() Date: Thu, 1 Sep 2022 13:28:14 +0300 Message-Id: <20220901102814.131855-1-goncharenko.vp@ispras.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 02 Sep 2022 08:02:51 +0200 Cc: ldv-project@linuxtesting.org, alsa-devel@alsa-project.org, Takashi Iwai , Valentina Goncharenko , linux-kernel@vger.kernel.org, Eliot Blennerhassett X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The hpi_meter_get_peak() function contains the expression "hm.obj_index = hm.obj_index", which does not carry any semantic load. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 719f82d3987a ("ALSA: Add support of AudioScience ASI boards") Signed-off-by: Valentina Goncharenko --- sound/pci/asihpi/hpifunc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c index 1de05383126a..24047fafef51 100644 --- a/sound/pci/asihpi/hpifunc.c +++ b/sound/pci/asihpi/hpifunc.c @@ -2020,7 +2020,6 @@ u16 hpi_meter_get_peak(u32 h_control, short an_peakdB[HPI_MAX_CHANNELS] HPI_CONTROL_GET_STATE); if (hpi_handle_indexes(h_control, &hm.adapter_index, &hm.obj_index)) return HPI_ERROR_INVALID_HANDLE; - hm.obj_index = hm.obj_index; hm.u.c.attribute = HPI_METER_PEAK; hpi_send_recv(&hm, &hr);