[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YvZDXivnmHc3pSkw@sirena.org.uk>
Date: Fri, 12 Aug 2022 13:11:10 +0100
From: Mark Brown <broonie@...nel.org>
To: Kevin Lu <luminlong@....com>
Cc: linux-kernel@...r.kernel.org, shenghao-ding@...com, kevin-lu@...com
Subject: Re: [PATCH 1/1] drivers: Add kcontrol
On Fri, Aug 12, 2022 at 11:18:16AM +0800, Kevin Lu wrote:
> Add a new kcontrol for phase calib
>
> Signed-off-by: Kevin Lu <luminlong@....com>
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
> +static const char * const phase_calib_switch[] = {
> + "Disable",
> + "Enable"
> +};
> +
> +static const struct soc_enum phase_calib_enum[] = {
> + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(phase_calib_switch), phase_calib_switch),
> +};
To repeat this is a simple on/off control and should be a normal Switch,
not an enum.
> +static int adcx140_phase_calib_get(struct snd_kcontrol *Kcontrol,
> + struct snd_ctl_elem_value *Value)
*Please* follow the kernel coding style for variable names. It's good
that you've taken out the hungarian notation but the caps are also bad.
> +static int adcx140_phase_calib_put(struct snd_kcontrol *Kcontrol,
> + struct snd_ctl_elem_value *Value)
> +{
> + struct snd_soc_component *codec
> + = snd_soc_kcontrol_component(Kcontrol);
> + struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(codec);
> +
> + adcx140->phase_calib_on = Value->value.integer.value[0] ? true : false;
> +
> + return 0;
> +}
To repeat my previous comments:
| This should return 1 if the value changes, the mixer-test selftest will
| check for this and a number of other issues - you should ensure your
| driver passes that cleanly.
Please don't ignore review comments, people are generally making them
for a reason and are likely to have the same concerns if issues remain
unaddressed. Having to repeat the same comments can get repetitive and
make people question the value of time spent reviewing. If you disagree
with the review comments that's fine but you need to reply and discuss
your concerns so that the reviewer can understand your decisions.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists