public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	dmaengine@vger.kernel.org,
	Milan Stevanovic <milan.stevanovic@se.com>,
	Jimmy Lalande <jimmy.lalande@se.com>,
	Pascal Eberhard <pascal.eberhard@se.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Herve Codina <herve.codina@bootlin.com>,
	Clement Leger <clement.leger@bootlin.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2 2/2] dmaengine: dw: dmamux: Fix build without CONFIG_OF
Date: Tue, 7 Jun 2022 19:32:47 +0300	[thread overview]
Message-ID: <Yp99r87N7uyQYvwz@smile.fi.intel.com> (raw)
In-Reply-To: <20220607152215.46731-2-miquel.raynal@bootlin.com>

On Tue, Jun 07, 2022 at 05:22:15PM +0200, Miquel Raynal wrote:
> When built without OF support, of_match_node() expands to NULL, which
> produces the following output:
> >> drivers/dma/dw/rzn1-dmamux.c:105:34: warning: unused variable 'rzn1_dmac_match' [-Wunused-const-variable]
>    static const struct of_device_id rzn1_dmac_match[] = {
> 
> One way to silence the warning is to enclose the structure definition
> with an #ifdef CONFIG_OF/#endif block.
> 
> In order to keep the harmony in the driver, the second match table is
> also enclosed with the same #ifdef CONFIG_OF/#endif block and the use of
> the match table forwarded by the of_match_ptr() macro.

No, what I asked is the opposite.
So, the most of this patch seems not needed (see below).

...

> +#ifdef CONFIG_OF
>  static const struct of_device_id rzn1_dmamux_match[] = {
>  	{ .compatible = "renesas,rzn1-dmamux" },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, rzn1_dmamux_match);
> +#endif
>  
>  static struct platform_driver rzn1_dmamux_driver = {
>  	.driver = {
>  		.name = "renesas,rzn1-dmamux",
> -		.of_match_table = rzn1_dmamux_match,
> +		.of_match_table = of_match_ptr(rzn1_dmamux_match),
>  	},
>  	.probe	= rzn1_dmamux_probe,
>  };

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-06-07 16:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 15:22 [PATCH v2 1/2] dmaengine: dw: dmamux: Export the module device table Miquel Raynal
2022-06-07 15:22 ` [PATCH v2 2/2] dmaengine: dw: dmamux: Fix build without CONFIG_OF Miquel Raynal
2022-06-07 16:32   ` Andy Shevchenko [this message]
2022-06-07 17:17     ` Miquel Raynal
2022-06-07 18:50       ` Andy Shevchenko
2022-06-07 22:01         ` Miquel Raynal
2022-06-07 16:33 ` [PATCH v2 1/2] dmaengine: dw: dmamux: Export the module device table Andy Shevchenko

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=Yp99r87N7uyQYvwz@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=clement.leger@bootlin.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=herve.codina@bootlin.com \
    --cc=jimmy.lalande@se.com \
    --cc=lkp@intel.com \
    --cc=milan.stevanovic@se.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=pascal.eberhard@se.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vkoul@kernel.org \
    /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