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
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]