[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_Jsq+O7YD+WuABOMvWT-uyuDvt6L9wQmeFunR-z4RpXLFo2A@mail.gmail.com>
Date: Tue, 15 Sep 2020 12:58:44 -0600
From: Rob Herring <robh@...nel.org>
To: Paul Cercueil <paul@...pouillou.net>
Cc: od@...c.me, Linux I2C <linux-i2c@...r.kernel.org>,
devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] i2c: jz4780: Remove of_match_ptr()
On Tue, Sep 15, 2020 at 10:07 AM Paul Cercueil <paul@...pouillou.net> wrote:
>
>
>
> Le mar. 15 sept. 2020 à 10:03, Rob Herring <robh@...nel.org> a écrit :
> > On Tue, Sep 15, 2020 at 4:07 AM Paul Cercueil <paul@...pouillou.net>
> > wrote:
> >>
> >> Hi Rob,
> >>
> >> Le lun. 14 sept. 2020 à 16:12, Rob Herring <robh@...nel.org> a
> >> écrit :
> >> > On Fri, Sep 04, 2020 at 03:11:52PM +0200, Paul Cercueil wrote:
> >> >> CONFIG_OF is selected by CONFIG_MACH_INGENIC, therefore we don't
> >> >> need to
> >> >> handle the case where Device Tree is not supported.
> >> >
> >> > What about COMPILE_TEST? If not supported, why not?
> >>
> >> What about it? It will still compile fine with COMPILE_TEST.
> >
> > CONFIG_OF could be disabled in that case, so the above reasoning
> > doesn't hold.
> >
>
> CONFIG_OF can be disabled in that case, correct, but why should we
> care? The driver will still compile fine.
Indeed, because jz4780_i2c_of_matches isn't within a CONFIG_OF ifdef
as is sometimes done and is when you need of_match_ptr(). IMO, the
commit msg should have something like "The driver is only used with
CONFIG_OF enabled, so of_match_ptr() is not necessary.
jz4780_i2c_of_matches is always defined."
Rob
Powered by blists - more mailing lists