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:	Fri, 13 May 2016 11:58:52 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Peter Rosin <peda@...ntia.se>
Cc:	linux-kernel@...r.kernel.org, Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>,
	Misbah Ullah Khan <Misbahk@...lawinc.com>,
	alsa-devel@...a-project.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v3] ASoC: MAX9860: new driver

On Fri, May 13, 2016 at 09:25:33AM +0200, Peter Rosin wrote:

> +static int max9860_dai_startup(struct snd_pcm_substream *substream,
> +			       struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_codec *codec = dai->codec;
> +	struct max9860_priv *max9860 = snd_soc_codec_get_drvdata(codec);
> +
> +	switch (max9860->fmt & SND_SOC_DAIFMT_MASTER_MASK) {
> +	case SND_SOC_DAIFMT_CBM_CFM:
> +	case SND_SOC_DAIFMT_CBS_CFS:
> +		return 0;
> +
> +	default:
> +		return -EINVAL;
> +	}
> +}

This isn't the place to enforce restrictions on DAI format, do it in
set_dai_fmt().

Otherwise this looks good.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ