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]
Message-ID: <20110610172734.GI26441@sirena.org.uk>
Date:	Fri, 10 Jun 2011 18:27:35 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Lars-Peter Clausen <lars@...afoo.de>
Cc:	Liam Girdwood <lrg@...com>,
	uclinux-dist-devel@...ckfin.uclinux.org,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
	device-drivers-devel@...ckfin.uclinux.org
Subject: Re: [alsa-devel] [PATCH 1/3] ASoC: Add ADAU1701 codec driver

On Fri, Jun 10, 2011 at 07:18:49PM +0200, Lars-Peter Clausen wrote:
> This patch adds support for the Analog Devices ADAU1701 SigmaDSP.
> 
> Signed-off-by: Lars-Peter Clausen <lars@...afoo.de>

Looks OK but one thing it'd be nice to do:

> +static unsigned int adau1701_register_size(unsigned int reg)
> +{
> +	switch (reg) {
> +	case ADAU1701_DSPCTRL:
> +	case ADAU1701_SEROCTL:
> +	case ADAU1701_AUXNPOW:
> +	case ADAU1701_OSCIPOW:
> +	case ADAU1701_DACSET:
> +		return 2;
> +	case ADAU1701_SERICTL:
> +		return 1;
> +	}
> +
> +	return 0;
> +}

I'd be happier if this complained loudly when it fell through the
switch in case something goes wrong.  You've got checks in the callers
but I'd feel safer if the log were here in case we missed a caller.

Also someone should remonstrate with the hardware designers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ