Skip to content

Commit 6eedc22

Browse files
charleskeepaxvinodkoul
authored andcommitted
soundwire: bandwidth allocation: Remove pointless variable
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> Link: https://lore.kernel.org/r/20230602101140.2040141-2-ckeepax@opensource.cirrus.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent c05bfbd commit 6eedc22

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

drivers/soundwire/generic_bandwidth_allocation.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,16 @@ static void _sdw_compute_port_params(struct sdw_bus *bus,
139139
{
140140
struct sdw_master_runtime *m_rt;
141141
int hstop = bus->params.col - 1;
142-
int block_offset, port_bo, i;
142+
int port_bo, i;
143143

144144
/* Run loop for all groups to compute transport parameters */
145145
for (i = 0; i < count; i++) {
146146
port_bo = 1;
147-
block_offset = 1;
148147

149148
list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) {
150-
sdw_compute_master_ports(m_rt, &params[i],
151-
port_bo, hstop);
149+
sdw_compute_master_ports(m_rt, &params[i], port_bo, hstop);
152150

153-
block_offset += m_rt->ch_count *
154-
m_rt->stream->params.bps;
155-
port_bo = block_offset;
151+
port_bo += m_rt->ch_count * m_rt->stream->params.bps;
156152
}
157153

158154
hstop = hstop - params[i].hwidth;

0 commit comments

Comments
 (0)