[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADiBU38O6zdp5KYt90KgrZKJwAzBqPoaYQYehAJ=wS42NyVcjQ@mail.gmail.com>
Date: Sat, 26 Mar 2022 15:55:41 +0800
From: ChiYuan Huang <u0084500@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
cy_huang <cy_huang@...htek.com>, gene_chen@...htek.com,
lkml <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>
Subject: Re: [PATCH 2/2] regulator: rt5759: Add support for Richtek RT5759
DCDC converter
Mark Brown <broonie@...nel.org> 於 2022年3月26日 週六 上午9:07寫道:
>
> On Sat, Mar 26, 2022 at 08:58:47AM +0800, ChiYuan Huang wrote:
>
> > I tried to remove only __maybe_unused and build with x86 config that
> > CONFIG_OF=n.
> > There's no warning or error message when compiling the rt5759 source code.
>
> > If so, I will remove only '__maybe_unused'.
> > May I ask whether 'of_match_ptr' need to be added or not?
>
> If you add of_match_ptr() (which is a little better, though it's
> a tiny different either way) then you shouldn't remove
> __maybe_unused - the thing here is that the __maybe_unused is
> needed because of_match_ptr() is used.
Sorry, I'm confused.
Originally, Krzysztof's opinion is to tell me why 'of_device_id' is
declared as '__maybe_unused'.
That's why I mentioned that the return value about of_device_get_match_data'
And now we're talking about to add 'of_match_ptr' in struct driver
of_match_table.
Back to the original topic, two ways can solve this.
1) only remove '__maybe_unused' in of_device_id
2) keep '__maybe_unused' in of_device_id, and add of_match_ptr for
of_match_table.
But option 2 seems conflict with Krzysztof's gueestion.
May I ask which option you suggested?
Powered by blists - more mailing lists