[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3eb7ffc5-a16a-4ac2-93a0-260f7cb1f81c@sirena.org.uk>
Date: Wed, 7 Jun 2023 12:44:25 +0100
From: Mark Brown <broonie@...nel.org>
To: Walker Chen <walker.chen@...rfivetech.com>
Cc: Claudiu Beznea <Claudiu.Beznea@...rochip.com>,
Dan Carpenter <dan.carpenter@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Takashi Iwai <tiwai@...e.com>,
Jaroslav Kysela <perex@...ex.cz>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] ASoC: starfive: Cleanup and fix error check for
JH7110 TDM
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.
> - 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).
> -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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists