From: wangweidong.a@awinic.com
To: broonie@kernel.org
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
herve.codina@bootlin.com, ivprusov@salutedevices.com,
jack.yu@realtek.com, krzk+dt@kernel.org, lgirdwood@gmail.com,
linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
masahiroy@kernel.org, neil.armstrong@linaro.org,
nuno.sa@analog.com, perex@perex.cz, quic_pkumpatl@quicinc.com,
rf@opensource.cirrus.com, robh@kernel.org, tiwai@suse.com,
wangweidong.a@awinic.com, yesanishhere@gmail.com,
yijiangtao@awinic.com, zhoubinbin@loongson.cn
Subject: Re: [PATCH V1 2/2] ASoC: codecs: Add aw88083 amplifier driver
Date: Thu, 19 Dec 2024 16:54:09 +0800 [thread overview]
Message-ID: <20241219085409.29073-1-wangweidong.a@awinic.com> (raw)
In-Reply-To: <152595a2-2216-4c6c-935d-9c58939bffe0@sirena.org.uk>
On Tue, Dec 10, 2024 at 12:51:13 +0000, broonie@kernel.org wrote:
> On Tue, Dec 10, 2024 at 05:10:54PM +0800, wangweidong.a@awinic.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
prev parent reply other threads:[~2024-12-19 8:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 9:10 [PATCH V1 0/2] " wangweidong.a
2024-12-10 9:10 ` [PATCH V1 1/2] ASoC: dt-bindings: Add schema for "awinic,aw88083" wangweidong.a
2024-12-10 9:23 ` Krzysztof Kozlowski
2024-12-10 9:10 ` [PATCH V1 2/2] ASoC: codecs: Add aw88083 amplifier driver wangweidong.a
2024-12-10 12:51 ` Mark Brown
2024-12-19 8:54 ` wangweidong.a [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241219085409.29073-1-wangweidong.a@awinic.com \
--to=wangweidong.a@awinic.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=herve.codina@bootlin.com \
--cc=ivprusov@salutedevices.com \
--cc=jack.yu@realtek.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=nuno.sa@analog.com \
--cc=perex@perex.cz \
--cc=quic_pkumpatl@quicinc.com \
--cc=rf@opensource.cirrus.com \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
--cc=yesanishhere@gmail.com \
--cc=yijiangtao@awinic.com \
--cc=zhoubinbin@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®