[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMhs-H8ek=bGOQpeF7i7CnSnu-AYCUN+jTxTtOXW2EgLAmQXfg@mail.gmail.com>
Date: Thu, 19 Oct 2023 06:10:30 +0200
From: Sergio Paracuellos <sergio.paracuellos@...il.com>
To: Stephen Boyd <sboyd@...nel.org>
Cc: linux-clk@...r.kernel.org, tsbogend@...ha.franken.de,
mturquette@...libre.com, linux-kernel@...r.kernel.org,
ndesaulniers@...gle.com, arnd@...nel.org, yangshiji66@...look.com,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2] clk: ralink: mtmips: quiet unused variable warning
On Thu, Oct 19, 2023 at 2:32 AM Stephen Boyd <sboyd@...nel.org> wrote:
>
> Quoting Sergio Paracuellos (2023-08-26 19:39:32)
> > When CONFIG_OF is disabled then the matching table is not referenced and
> > the following warning appears:
> >
> > drivers/clk/ralink/clk-mtmips.c:821:34: warning: unused variable 'mtmips_of_match' [-Wunused-const-variable]
> > 821 | static const struct of_device_id mtmips_of_match[] = {
> > | ^
> >
> > There are two match tables in the driver: one for the clock driver and the
> > other for the reset driver. The only difference between them is that the
> > clock driver uses 'data' and does not have 'ralink,rt2880-reset' compatible.
> > Both just can be merged into a single one just by adding the compatible
> > 'ralink,rt2880-reset' entry to 'mtmips_of_match[]', which will allow it to
> > be used for 'mtmips_clk_driver' (which doesn't use the data) as well as for
> > 'mtmips_clk_init()' (which doesn't need get called for 'ralink,rt2880-reset').
> >
> > Doing in this way ensures that 'CONFIG_OF' is not disabled anymore so the
> > above warning disapears.
> >
> > Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs")
> > Reported-by: kernel test robot <lkp@...el.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202307242310.CdOnd2py-lkp@intel.com/
> > Suggested-by: Arnd Bergmann <arnd@...nel.org>
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
> > ---
>
> Applied to clk-next
Thanks Stephen!
Best regards,
Sergio Paracuellos
Powered by blists - more mailing lists