From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
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()
Date: Thu, 19 Dec 2024 18:30:20 +0530 [thread overview]
Message-ID: <Z2QY5IAheYb8ncH5@HOME-PC> (raw)
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
reply other threads:[~2024-12-19 13:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2QY5IAheYb8ncH5@HOME-PC \
--to=dheeraj.linuxdev@gmail.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.com \
--cc=simont@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.