From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Shenghao Ding <13916275206@139.com>,
broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz,
pierre-louis.bossart@linux.intel.com
Cc: kevin-lu@ti.com, shenghao-ding@ti.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
x1077012@ti.com, peeyush@ti.com, navada@ti.com
Subject: Re: [PATCH v10] ASoC: tas2781: Add tas2781 driver
Date: Thu, 30 Mar 2023 13:53:59 +0200 [thread overview]
Message-ID: <8d0d0478-1e45-ea52-f1b7-910b747d6282@linux.intel.com> (raw)
In-Reply-To: <20230329100107.8181-1-13916275206@139.com>
On 3/29/2023 12:01 PM, Shenghao Ding wrote:
> Create tas2781 driver.
>
> Signed-off-by: Shenghao Ding <13916275206@139.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.
next prev parent reply other threads:[~2023-03-30 11:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 10:01 Shenghao Ding
2023-03-30 11:53 ` Amadeusz Sławiński [this message]
2023-03-31 2:19 ` [EXTERNAL] " Ding, Shenghao
2023-03-31 20:41 ` Christophe JAILLET
2023-04-05 11:21 ` [EXTERNAL] " Ding, Shenghao
2023-04-05 11:35 ` Amadeusz Sławiński
2023-04-05 12:02 ` Mark Brown
2023-04-06 18:35 ` Christophe JAILLET
2023-03-30 18:17 ` Christophe JAILLET
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=8d0d0478-1e45-ea52-f1b7-910b747d6282@linux.intel.com \
--to=amadeuszx.slawinski@linux.intel.com \
--cc=13916275206@139.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kevin-lu@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=navada@ti.com \
--cc=peeyush@ti.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=shenghao-ding@ti.com \
--cc=x1077012@ti.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®