diff mbox series

remoteproc: virtio: Fix warning on bindings by removing the of_match_table

Message ID 20221004174018.3319712-1-arnaud.pouliquen@foss.st.com (mailing list archive)
State Superseded
Headers show
Series remoteproc: virtio: Fix warning on bindings by removing the of_match_table | expand

Commit Message

Arnaud POULIQUEN Oct. 4, 2022, 5:40 p.m. UTC
The checkpatch tool complains that "virtio,rproc" is not documented.
But it is not possible to probe the device "rproc-virtio" by declaring
it in the device tree. So documenting it in the bindings does not make
sense.
This commit solves the checkpatch warning by suppressing the useless
of_match_table.

Fix-suggested-by: Rob Herring <robh@kernel.org>
Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the remoteproc_virtio")

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
---
 drivers/remoteproc/remoteproc_virtio.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Mathieu Poirier Oct. 4, 2022, 7:51 p.m. UTC | #1
On Tue, 4 Oct 2022 at 11:40, Arnaud Pouliquen
<arnaud.pouliquen@foss.st.com> wrote:
>
> The checkpatch tool complains that "virtio,rproc" is not documented.
> But it is not possible to probe the device "rproc-virtio" by declaring
> it in the device tree. So documenting it in the bindings does not make
> sense.
> This commit solves the checkpatch warning by suppressing the useless
> of_match_table.
>
> Fix-suggested-by: Rob Herring <robh@kernel.org>

I'll change that for "Suggested-by:"

> Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the remoteproc_virtio")
>
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
>  drivers/remoteproc/remoteproc_virtio.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
> index a29e3b8ff69c..26a7d8c498bc 100644
> --- a/drivers/remoteproc/remoteproc_virtio.c
> +++ b/drivers/remoteproc/remoteproc_virtio.c
> @@ -593,17 +593,11 @@ static int rproc_virtio_remove(struct platform_device *pdev)
>  }
>
>  /* Platform driver */
> -static const struct of_device_id rproc_virtio_match[] = {
> -       { .compatible = "virtio,rproc" },
> -       {},
> -};
> -
>  static struct platform_driver rproc_virtio_driver = {
>         .probe          = rproc_virtio_probe,
>         .remove         = rproc_virtio_remove,
>         .driver         = {
>                 .name   = "rproc-virtio",
> -               .of_match_table = rproc_virtio_match,

Yes, this is quite simple and slick.  Rob - is this what you meant earlier on?

>         },
>  };
>  builtin_platform_driver(rproc_virtio_driver);
> --
> 2.24.3
>
Rob Herring Oct. 4, 2022, 8:25 p.m. UTC | #2
On Tue, Oct 4, 2022 at 12:40 PM Arnaud Pouliquen
<arnaud.pouliquen@foss.st.com> wrote:
>
> The checkpatch tool complains that "virtio,rproc" is not documented.
> But it is not possible to probe the device "rproc-virtio" by declaring
> it in the device tree. So documenting it in the bindings does not make
> sense.
> This commit solves the checkpatch warning by suppressing the useless
> of_match_table.
>
> Fix-suggested-by: Rob Herring <robh@kernel.org>
> Fixes: 1d7b61c06dc3 ("remoteproc: virtio: Create platform device for the remoteproc_virtio")
>
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
> ---
>  drivers/remoteproc/remoteproc_virtio.c | 6 ------
>  1 file changed, 6 deletions(-)

There might be an include you don't need anymore, but otherwise:

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
index a29e3b8ff69c..26a7d8c498bc 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -593,17 +593,11 @@  static int rproc_virtio_remove(struct platform_device *pdev)
 }
 
 /* Platform driver */
-static const struct of_device_id rproc_virtio_match[] = {
-	{ .compatible = "virtio,rproc" },
-	{},
-};
-
 static struct platform_driver rproc_virtio_driver = {
 	.probe		= rproc_virtio_probe,
 	.remove		= rproc_virtio_remove,
 	.driver		= {
 		.name	= "rproc-virtio",
-		.of_match_table	= rproc_virtio_match,
 	},
 };
 builtin_platform_driver(rproc_virtio_driver);