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] [day] [month] [year] [list]
Date:	Tue, 1 Jul 2014 18:48:44 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Rongjun Ying <rongjun.ying@....com>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
	Barry Song <baohua@...nel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>, linux-kernel@...r.kernel.org,
	alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org,
	devicetree@...r.kernel.org, Workgroup.linux@....com
Subject: Re: [PATCH 1/2] ASoC: sirf: Add audio usp interface driver

On Tue, Jul 01, 2014 at 10:18:53AM +0800, Rongjun Ying wrote:

A few *really* trivial things below, otherwise this looks good:

> +	if (usp->daifmt_format == SND_SOC_DAIFMT_I2S)
> +		regmap_update_bits(usp->regmap, USP_RX_FRAME_CTRL,
> +			USP_I2S_SYNC_CHG, USP_I2S_SYNC_CHG);
> +	else if (usp->daifmt_format == SND_SOC_DAIFMT_DSP_A) {
> +		regmap_update_bits(usp->regmap, USP_RX_FRAME_CTRL,
> +			USP_I2S_SYNC_CHG, 0);
> +		frame_len = data_len * params_channels(params);
> +		data_len = frame_len;
> +	}

Make this a switch statement for legibility, and if you do need to use {
} make sure they're used consistently for all branches of an if ().

> +	int playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;

I'm not sure the extra variable adds much here.

> +static struct snd_soc_dai_driver sirf_usp_pcm_dai = {
> +	.probe = sirf_usp_pcm_dai_probe,
> +	.name		= "sirf-usp-pcm",
> +	.id			= 0,

Weird indentation here.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ