From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <vkoul@kernel.org>
Cc: <yung-chuan.liao@linux.intel.com>,
<pierre-louis.bossart@linux.intel.com>, <sanyog.r.kale@intel.com>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>
Subject: [PATCH v2 2/5] soundwire: bandwidth allocation: Remove pointless variable
Date: Fri, 2 Jun 2023 11:11:37 +0100 [thread overview]
Message-ID: <20230602101140.2040141-2-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20230602101140.2040141-1-ckeepax@opensource.cirrus.com>
The block_offset variable in _sdw_compute_port_params adds nothing
either functionally or in terms of code clarity, remove it.
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
No changes since v1.
Thanks,
Charles
drivers/soundwire/generic_bandwidth_allocation.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/soundwire/generic_bandwidth_allocation.c b/drivers/soundwire/generic_bandwidth_allocation.c
index 325c475b6a66d..31162f2b56381 100644
--- a/drivers/soundwire/generic_bandwidth_allocation.c
+++ b/drivers/soundwire/generic_bandwidth_allocation.c
@@ -139,20 +139,16 @@ static void _sdw_compute_port_params(struct sdw_bus *bus,
{
struct sdw_master_runtime *m_rt;
int hstop = bus->params.col - 1;
- int block_offset, port_bo, i;
+ int port_bo, i;
/* Run loop for all groups to compute transport parameters */
for (i = 0; i < count; i++) {
port_bo = 1;
- block_offset = 1;
list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) {
- sdw_compute_master_ports(m_rt, ¶ms[i],
- port_bo, hstop);
+ sdw_compute_master_ports(m_rt, ¶ms[i], port_bo, hstop);
- block_offset += m_rt->ch_count *
- m_rt->stream->params.bps;
- port_bo = block_offset;
+ port_bo += m_rt->ch_count * m_rt->stream->params.bps;
}
hstop = hstop - params[i].hwidth;
--
2.30.2
next prev parent reply other threads:[~2023-06-02 10:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 10:11 [PATCH v2 1/5] soundwire: stream: Add missing clear of alloc_slave_rt Charles Keepax
2023-06-02 10:11 ` Charles Keepax [this message]
2023-06-02 10:11 ` [PATCH v2 3/5] soundwire: stream: Remove unneeded checks for NULL bus Charles Keepax
2023-06-02 14:57 ` Pierre-Louis Bossart
2023-06-02 10:11 ` [PATCH v2 4/5] soundwire: stream: Invert logic on runtime alloc flags Charles Keepax
2023-06-02 15:01 ` Pierre-Louis Bossart
2023-06-02 10:11 ` [PATCH v2 5/5] soundwire: stream: Remove unnecessary gotos Charles Keepax
2023-06-02 15:13 ` Pierre-Louis Bossart
2023-06-08 11:39 ` [PATCH v2 1/5] soundwire: stream: Add missing clear of alloc_slave_rt Vinod Koul
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=20230602101140.2040141-2-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--cc=vkoul@kernel.org \
--cc=yung-chuan.liao@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox