From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 396CA2248AA for ; Thu, 19 Dec 2024 13:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734613228; cv=none; b=mTA5QhL9efplGylTZmt25neXMeciKjD4ZUYevpcw6qIBrMMTDRWbthnVWGonY25+/XxDEkESkrm5T3JJL6ImOb3TCFGH2bXOZ1x7bz6lmma1pGndCR3cTTF2Lc4gGdINzw6iE3elTs5fxTuCCkJQM5TuJXMo8HiAfdOjm9Vm88s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734613228; c=relaxed/simple; bh=yrI9qQpTXy9AVU+2g7w9RWqQGT9V/KoXCVmVCoj2RFc=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=sY06PP+RHJVX8Fh9+LHIwP2yWrlPJYYDR98jDkKIBa6rKryl5OGk4Cba0JBswRPFOVDS+E7nftScP9D9mWdHbWKKEJUH6CsOzTkdM6J+iYzNuilsbB3nmrydt+cJE9KY1hYNjxW9wY+TfhoQ22XFrR2EC9IY9CG9R25vLSWyXM4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JuDgmEcK; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JuDgmEcK" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2ee51f8c47dso513002a91.1 for ; Thu, 19 Dec 2024 05:00:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734613224; x=1735218024; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=YQxxPLlfdY1yT7fxzTeZ1T831cUnPAbtbhQjnTEoK8w=; b=JuDgmEcK3m+2Ce7joEuJ8VLwdsz0+WDzY9iO0wxhnqEoB7t5NaWrwKFloim6zW4t+K 3gYzZ6bypWTjBDU9+zwPGKTxVz7xMynxvxBvFvNsb4AnfEb3TWdD5mOpKUkKnBow0dYI Y7uqYzVZLA19bgW22aynAWX0NxTGstOuQre0gdt5OQh9m3dB2UFTyUM6EwT/eLNdSJ0R Gssf5WSGBWgDydNTCu13x258Z9RC1Mr18pvguQBRABJqPJ9z9kFGiZzmORLgyJjfKxsH 0/00tVbzSOKtd4eyZTGxziuW44H2JxJYRBiV445qKAGoNqUGc05Qg4RERKFN55nwGDX2 IuRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734613224; x=1735218024; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YQxxPLlfdY1yT7fxzTeZ1T831cUnPAbtbhQjnTEoK8w=; b=fjh/l8ySmbOYRnjI5+QuqKX7n35X+jJyhQV57bJRbg65l16kYxbmyyeluM0D72I5q+ F5FlzCC5kl67RaTqUMxLRZRGjR0n24H5BqmpHtmOW3fK3nVULbgsJ3Vao8YQXfPOicb9 Na8SZdDqNKHmY84YovMPAMeOZk7/S8sRo8DuGUyaJshK1HVzRO58wBmUpFm8PcZkI8Zl CC5kDswKACuIzNu4xjlNYoLel18C4rO9YTFoF11JLDcyatuk2nT2zD4BUsjkuGQBuf8p LAlfeBgJGB+ghXNB1DxLEMecKEGwQxAgEhshIQHQXYEK/j7VvGfY/y5CVodX9uZGIVk1 S/Zg== X-Forwarded-Encrypted: i=1; AJvYcCWOD/s81qgPEcBQWdYHMPOnDcTl/Rj/9/skSAKdDoLuUe9LS/shzw06qSXOr/dkrdUeDXH3ziGKEMI5Mzs=@vger.kernel.org X-Gm-Message-State: AOJu0Yy7aOij4k4zL9dEaQWbzzK38BArACN/TtP9Dpc3iRoAFfe+j4zq E6msUQlcI7YxTnIJ7Vj1cpwxYZ+0DzDvlrHoMpf2rdWETdm12ATbHJUFdoZk X-Gm-Gg: ASbGncuicldDwccXleT0Chd2ad5FWdZ6NF4Tck9A1cAYrT5rRtZ4ppOurKKZw/uCSze 4DO/4Nw5ss1DSzWSZcZMlhtSE5NqV81fRQ2Rn5H/wXNzohNIECkxnN7puWoRBno4U2gTyZkq2la c7h+dEPKjjUOG2C2Ov9xpM5jLoGFIZZZHpxlfFKzlFHtVub+f4sVMSzGS2M7d1i8OEkPhe5qLuB B4DLh6N+wooUehmDKue1IcboruUDtlchrF50r8UXTzt0m3CJi2jvSrhSMwZNw== X-Google-Smtp-Source: AGHT+IGSbVT8chVBWEnb5pmTCv5C3Gaq+coCod0MfrnGoTn30EklFEw5t+Lv/wXfVfRiLgpqlRXNZg== X-Received: by 2002:a17:90b:1f8e:b0:2ee:fd53:2b17 with SMTP id 98e67ed59e1d1-2f443d3cc65mr4739254a91.29.1734613224240; Thu, 19 Dec 2024 05:00:24 -0800 (PST) Received: from HOME-PC ([223.185.132.235]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f447798ab6sm1307915a91.4.2024.12.19.05.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2024 05:00:23 -0800 (PST) Date: Thu, 19 Dec 2024 18:30:20 +0530 From: Dheeraj Reddy Jonnalagadda To: simont@opensource.cirrus.com, ckeepax@opensource.cirrus.com, rf@opensource.cirrus.com, patches@opensource.cirrus.com Cc: broonie@kernel.org, arnd@arndb.de, linux-kernel@vger.kernel.org Subject: Clarification on unused variable in bin_patch_one_word_multiple_algs() Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dear Maintainers, While reviewing the bin_patch_one_word_multiple_algs function in the cs_dsp_test_bin.c module, I came across an unused value warning flagged by Coverity (CID 1602511). The issue is related to the variable alg_base_words, which is assigned a value in the first for loop but is not utilized in that loop. The value is later overwritten in the second loop, where it is used to calculate register addresses. The same issue is also detected in bin_patch_one_word_multiple_algs_unordered function. Link to the Coverity issues: https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602511 https://scan7.scan.coverity.com/#/project-view/52337/11354?selectedIssue=1602490 Given that alg_base_words in the first loop is not used and its value is overwritten in the second loop, I wanted to confirm the intended behavior: 1. Is the assignment of alg_base_words in the first loop redundant, and can it be safely removed? 2. Or is there a missed use case for alg_base_words within the first loop that requires attention? I appreciate your time. Please let me know if further context or details are needed. -Dheeraj