lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z8AJqo6K7j3176cS@vaman>
Date: Thu, 27 Feb 2025 12:13:54 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Bard Liao <yung-chuan.liao@...ux.intel.com>
Cc: linux-sound@...r.kernel.org, broonie@...nel.org, tiwai@...e.de,
	linux-kernel@...r.kernel.org, pierre-louis.bossart@...ux.dev,
	bard.liao@...el.com
Subject: Re: [PATCH v2 09/16] soundwire: cadence: add BTP/BRA helpers to
 format data

On 24-02-25, 14:44, Bard Liao wrote:
> +
> +static unsigned int sdw_cdns_write_pdi0_buffer_size(unsigned int actual_data_size)
> +{
> +	unsigned int total;
> +
> +	total = SDW_CDNS_BRA_HDR + SDW_CDNS_BRA_HDR_CRC + SDW_CDNS_BRA_HDR_CRC_PAD;
> +
> +	total += actual_data_size;
> +	if (actual_data_size & 1)
> +		total += SDW_CDNS_BRA_DATA_PAD;
> +
> +	total += SDW_CDNS_BRA_DATA_CRC + SDW_CDNS_BRA_DATA_CRC_PAD;
> +
> +	return total * 2;
> +}
> +
> +static unsigned int sdw_cdns_write_pdi1_buffer_size(unsigned int actual_data_size)
> +{
> +	unsigned int total;
> +
> +	total = SDW_CDNS_BRA_HDR_RESP +	SDW_CDNS_BRA_HDR_RESP_PAD +
> +		SDW_CDNS_BRA_FOOTER_RESP + SDW_CDNS_BRA_FOOTER_RESP_PAD;
> +
> +	return total * 2;
> +}

Argument is unused, why not define this as a static value?

> +
> +static unsigned int sdw_cdns_read_pdi0_buffer_size(unsigned int actual_data_size)
> +{
> +	unsigned int total;
> +
> +	total = SDW_CDNS_BRA_HDR + SDW_CDNS_BRA_HDR_CRC + SDW_CDNS_BRA_HDR_CRC_PAD;
> +
> +	return total * 2;
> +}

Here as well
-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ