mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>, vkoul@kernel.org
Cc: yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH 2/4] soundwire: bandwidth allocation: Remove pointless variable
Date: Thu, 1 Jun 2023 11:39:38 -0500	[thread overview]
Message-ID: <d9bbf549-7ee3-1f8f-ad66-75350a5baf52@linux.intel.com> (raw)
In-Reply-To: <20230601161622.1808135-2-ckeepax@opensource.cirrus.com>



On 6/1/23 11:16, Charles Keepax wrote:
> The block_offset variable in _sdw_compute_port_params adds nothing
> either functionally or in terms of code clarity, remove it.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

This one is easy enough, thanks!

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>  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, &params[i],
> -						 port_bo, hstop);
> +			sdw_compute_master_ports(m_rt, &params[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;

  reply	other threads:[~2023-06-01 16:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-01 16:16 [PATCH 1/4] soundwire: stream: Add missing clear of alloc_slave_rt Charles Keepax
2023-06-01 16:16 ` [PATCH 2/4] soundwire: bandwidth allocation: Remove pointless variable Charles Keepax
2023-06-01 16:39   ` Pierre-Louis Bossart [this message]
2023-06-01 16:16 ` [PATCH 3/4] soundwire: stream: Remove unnecessary gotos Charles Keepax
2023-06-01 16:37   ` Pierre-Louis Bossart
2023-06-02  8:40     ` Charles Keepax
2023-06-01 16:16 ` [PATCH 4/4] soundwire: stream: Tidy do_bank_switch error messages Charles Keepax
2023-06-01 16:34   ` Pierre-Louis Bossart
2023-06-02  8:38     ` Charles Keepax
2023-06-01 16:43 ` [PATCH 1/4] soundwire: stream: Add missing clear of alloc_slave_rt Pierre-Louis Bossart

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=d9bbf549-7ee3-1f8f-ad66-75350a5baf52@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.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

all inboxes | Powered by JetHome®