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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241219085409.29073-1-wangweidong.a@awinic.com>
Date: Thu, 19 Dec 2024 16:54:09 +0800
From: wangweidong.a@...nic.com
To: broonie@...nel.org
Cc: conor+dt@...nel.org,
	devicetree@...r.kernel.org,
	herve.codina@...tlin.com,
	ivprusov@...utedevices.com,
	jack.yu@...ltek.com,
	krzk+dt@...nel.org,
	lgirdwood@...il.com,
	linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org,
	masahiroy@...nel.org,
	neil.armstrong@...aro.org,
	nuno.sa@...log.com,
	perex@...ex.cz,
	quic_pkumpatl@...cinc.com,
	rf@...nsource.cirrus.com,
	robh@...nel.org,
	tiwai@...e.com,
	wangweidong.a@...nic.com,
	yesanishhere@...il.com,
	yijiangtao@...nic.com,
	zhoubinbin@...ngson.cn
Subject: Re: [PATCH V1 2/2] ASoC: codecs: Add aw88083 amplifier driver

On Tue, Dec 10, 2024 at 12:51:13 +0000, broonie@...nel.org wrote:
> 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.

Thank you very much for your reviewer.
I will use "switch" to differentiate devices


Best regards
Weidong Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ