From: Walker Chen <walker.chen@starfivetech.com>
To: Mark Brown <broonie@kernel.org>
Cc: Claudiu Beznea <Claudiu.Beznea@microchip.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Takashi Iwai <tiwai@suse.com>, Jaroslav Kysela <perex@perex.cz>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] ASoC: starfive: Cleanup and fix error check for JH7110 TDM
Date: Thu, 8 Jun 2023 10:15:03 +0800 [thread overview]
Message-ID: <d941ac20-e8b3-cb13-4258-3a9a86e978d3@starfivetech.com> (raw)
In-Reply-To: <3eb7ffc5-a16a-4ac2-93a0-260f7cb1f81c@sirena.org.uk>
On 2023/6/7 19:44, Mark Brown wrote:
> On Wed, Jun 07, 2023 at 04:14:39PM +0800, Walker Chen wrote:
>
>> Some minor issues were found during addtional testing and static
>> analysis. The patch fixed these minor issues.
>> 1.Use BIT() macro to indicate configuration for TDM registers.
>>
>> 2.Fix the check for devm_reset_control_array_get_exclusive return
>> value. The devm_reset_control_array_get_exclusive() function may return
>> NULL if it's an optional request. If optional is intended then NULL
>> should not be treated as an error case, but as a special kind of success
>> case. So here the IS_ERR() is used to check better.
>
> As covered in submitting-patches.rst please submit one patch per change
> rather than combining multiple changes into a single patch, it makes
> things much easier to review and handle.
Hi Mark,
Thanks for your review.
OK, I will submit a single patch for each change in the next version.
>
>> - datarx = (tdm->rx.ifl << IFL_BIT) |
>> - (tdm->rx.wl << WL_BIT) |
>> - (tdm->rx.sscale << SSCALE_BIT) |
>> - (tdm->rx.sl << SL_BIT) |
>> - (tdm->rx.lrj << LRJ_BIT);
>> + datarx = (tdm->rxwl << 8) |
>> + (tdm->rxsscale << 4) |
>> + (tdm->rxsl << 2) |
>> + TDM_PCMRXCR_LEFT_J;
>
> I'm not sure this change to use numbers here is a win - the _BIT
> definitions look fine (I might've called them _SHIFT but whatever).
This is Claudiu's advice. Using the macro BIT() to replace these definition of *_BIT,
it will result in big changes in the code.
Please refer to previous comments:
https://lore.kernel.org/all/143e2fa2-e85d-8036-4f74-ca250c026c1b@microchip.com/
@Claudiu What do think about this ?
>
>> -static const struct of_device_id jh7110_tdm_of_match[] = {
>> +static const struct of_device_id jh7110_tdm_match[] = {
>> { .compatible = "starfive,jh7110-tdm", },
>> {}
>> };
>>
>> -MODULE_DEVICE_TABLE(of, jh7110_tdm_of_match);
>> +MODULE_DEVICE_TABLE(of, jh7110_tdm_match);
>
> This rename wasn't mentioned in the changelog.
Will be added in the change log.
Best regards,
Walker
next prev parent reply other threads:[~2023-06-08 2:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 8:14 [PATCH v1] ASoC: starfive: Cleanup and fix error check for JH7110 TDM Walker Chen
2023-06-07 11:44 ` Mark Brown
2023-06-08 2:15 ` Walker Chen [this message]
2023-06-08 10:15 ` Mark Brown
2023-06-08 10:43 ` Walker Chen
2023-06-08 10:50 ` Mark Brown
2023-06-08 12:17 ` Walker Chen
2023-06-09 7:50 ` Claudiu.Beznea
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=d941ac20-e8b3-cb13-4258-3a9a86e978d3@starfivetech.com \
--to=walker.chen@starfivetech.com \
--cc=Claudiu.Beznea@microchip.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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