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]
Message-ID: <152595a2-2216-4c6c-935d-9c58939bffe0@sirena.org.uk>
Date: Tue, 10 Dec 2024 12:51:13 +0000
From: Mark Brown <broonie@...nel.org>
To: wangweidong.a@...nic.com
Cc: lgirdwood@...il.com, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, perex@...ex.cz, tiwai@...e.com,
	rf@...nsource.cirrus.com, jack.yu@...ltek.com,
	neil.armstrong@...aro.org, ivprusov@...utedevices.com,
	zhoubinbin@...ngson.cn, quic_pkumpatl@...cinc.com,
	herve.codina@...tlin.com, masahiroy@...nel.org, nuno.sa@...log.com,
	yesanishhere@...il.com, linux-sound@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	yijiangtao@...nic.com
Subject: Re: [PATCH V1 2/2] ASoC: codecs: Add aw88083 amplifier driver

On Tue, Dec 10, 2024 at 05:10:54PM +0800, wangweidong.a@...nic.com wrote:

> -	aw88081_dev_clear_int_status(aw_dev);
> +	if (aw88081->devtype == AW88081)
> +		/* clear inturrupt */
> +		aw88081_dev_clear_int_status(aw_dev);
> +

These if (devtype) statements will get hard to maintain as more device
types are added (and the diff here is already pretty confusing).  It's
better to use a switch statement with cases for the devices that need
specific handling, that way more devices can easily slot in.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ