public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Sergio Paracuellos <sergio.paracuellos@gmail.com>,
	linux-clk@vger.kernel.org
Cc: tsbogend@alpha.franken.de, mturquette@baylibre.com,
	linux-kernel@vger.kernel.org, ndesaulniers@google.com,
	arnd@kernel.org, yangshiji66@outlook.com,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] clk: ralink: mtmips: quiet unused variable warning
Date: Wed, 18 Oct 2023 17:32:02 -0700	[thread overview]
Message-ID: <13d7cf46270082855174414b691fb3be.sboyd@kernel.org> (raw)
In-Reply-To: <20230827023932.501102-1-sergio.paracuellos@gmail.com>

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@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202307242310.CdOnd2py-lkp@intel.com/
> Suggested-by: Arnd Bergmann <arnd@kernel.org>
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---

Applied to clk-next

  parent reply	other threads:[~2023-10-19  0:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-27  2:39 [PATCH v2] clk: ralink: mtmips: quiet unused variable warning Sergio Paracuellos
2023-10-07  7:20 ` Sergio Paracuellos
2023-10-17 15:52 ` Nathan Chancellor
2023-10-18  8:59   ` Sergio Paracuellos
2023-10-19  0:32 ` Stephen Boyd [this message]
2023-10-19  4:10   ` Sergio Paracuellos

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=13d7cf46270082855174414b691fb3be.sboyd@kernel.org \
    --to=sboyd@kernel.org \
    --cc=arnd@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mturquette@baylibre.com \
    --cc=ndesaulniers@google.com \
    --cc=sergio.paracuellos@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangshiji66@outlook.com \
    /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