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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 Mar 2023 13:53:59 +0200
From:   Amadeusz Sławiński 
        <amadeuszx.slawinski@...ux.intel.com>
To:     Shenghao Ding <13916275206@....com>, broonie@...nel.org,
        lgirdwood@...il.com, perex@...ex.cz,
        pierre-louis.bossart@...ux.intel.com
Cc:     kevin-lu@...com, shenghao-ding@...com, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, x1077012@...com, peeyush@...com,
        navada@...com
Subject: Re: [PATCH v10] ASoC: tas2781: Add tas2781 driver

On 3/29/2023 12:01 PM, Shenghao Ding wrote:
> Create tas2781 driver.
> 
> Signed-off-by: Shenghao Ding <13916275206@....com>
> 
> ---
> Changes in v10:
>   - using be16_to_cpu and be32_to_cpu instead of SMS_HTONS and SMS_HTONL
>   - optimize and reduce the boundary checks
>   - Add comments on some kmemdup instead of kzalloc+memcpy
>   Changes to be committed:
> 	modified:   sound/soc/codecs/Kconfig
> 	modified:   sound/soc/codecs/Makefile
> 	new file:   sound/soc/codecs/tas2781-dsp.c
> 	new file:   sound/soc/codecs/tas2781-dsp.h
> 	new file:   sound/soc/codecs/tas2781-i2c.c
> 	new file:   sound/soc/codecs/tas2781.h
> ---

...

> +
> +static int fw_parse_block_data_kernel(struct tasdevice_fw *tas_fmw,
> +	struct tasdev_blk *block, const struct firmware *fmw, int offset)
> +{
> +	const unsigned char *data = fmw->data;
> +
> +	if (offset + 16 > fmw->size) {
> +		dev_err(tas_fmw->dev, "%s: File Size error\n", __func__);
> +		offset = -EINVAL;
> +		goto out;
> +	}
> +	block->type = be32_to_cpup((__be32 *)&data[offset]);

Wouldn't just be32_to_cpu(data[offset]) work instead of be32_to_cpup? 
Same in other cases.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ