All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] remoteproc: virtio: Fix warning on bindings by removing the of_match_table
@ 2022-10-05  8:13 Arnaud Pouliquen
  2022-10-05 15:26 ` Mathieu Poirier
  2022-12-28  7:11 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Arnaud Pouliquen @ 2022-10-05  8:13 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring
  Cc: linux-remoteproc, linux-kernel, linux-stm32, arnaud.pouliquen

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.

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>
Reviewed-by: Rob Herring <robh@kernel.org>

---
Updates vs previous revision:
- replace the "of_platform.h" include by "platform_device.h",
- replace "Fix-suggested-by" by "Suggested-by",
- add Rob's Reviewed-by.
---
 drivers/remoteproc/remoteproc_virtio.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
index a29e3b8ff69c..0e95525c1158 100644
--- a/drivers/remoteproc/remoteproc_virtio.c
+++ b/drivers/remoteproc/remoteproc_virtio.c
@@ -13,8 +13,8 @@
 #include <linux/dma-map-ops.h>
 #include <linux/dma-mapping.h>
 #include <linux/export.h>
-#include <linux/of_platform.h>
 #include <linux/of_reserved_mem.h>
+#include <linux/platform_device.h>
 #include <linux/remoteproc.h>
 #include <linux/virtio.h>
 #include <linux/virtio_config.h>
@@ -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);
-- 
2.24.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] remoteproc: virtio: Fix warning on bindings by removing the of_match_table
  2022-10-05  8:13 [PATCH v2] remoteproc: virtio: Fix warning on bindings by removing the of_match_table Arnaud Pouliquen
@ 2022-10-05 15:26 ` Mathieu Poirier
  2022-12-28  7:11 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Poirier @ 2022-10-05 15:26 UTC (permalink / raw)
  To: Arnaud Pouliquen
  Cc: Bjorn Andersson, Rob Herring, linux-remoteproc, linux-kernel,
	linux-stm32

On Wed, Oct 05, 2022 at 10:13:17AM +0200, Arnaud Pouliquen 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.
> 
> 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>
> Reviewed-by: Rob Herring <robh@kernel.org>
> 
> ---
> Updates vs previous revision:
> - replace the "of_platform.h" include by "platform_device.h",
> - replace "Fix-suggested-by" by "Suggested-by",
> - add Rob's Reviewed-by.
> ---
>  drivers/remoteproc/remoteproc_virtio.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c
> index a29e3b8ff69c..0e95525c1158 100644
> --- a/drivers/remoteproc/remoteproc_virtio.c
> +++ b/drivers/remoteproc/remoteproc_virtio.c
> @@ -13,8 +13,8 @@
>  #include <linux/dma-map-ops.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/export.h>
> -#include <linux/of_platform.h>
>  #include <linux/of_reserved_mem.h>
> +#include <linux/platform_device.h>
>  #include <linux/remoteproc.h>
>  #include <linux/virtio.h>
>  #include <linux/virtio_config.h>
> @@ -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,

Applied.

Thanks,
Mathieu

>  	},
>  };
>  builtin_platform_driver(rproc_virtio_driver);
> -- 
> 2.24.3
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] remoteproc: virtio: Fix warning on bindings by removing the of_match_table
  2022-10-05  8:13 [PATCH v2] remoteproc: virtio: Fix warning on bindings by removing the of_match_table Arnaud Pouliquen
  2022-10-05 15:26 ` Mathieu Poirier
@ 2022-12-28  7:11 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-12-28  7:11 UTC (permalink / raw)
  To: Arnaud Pouliquen, Bjorn Andersson, Mathieu Poirier, Rob Herring
  Cc: linux-remoteproc, linux-kernel, linux-stm32

On 5/10/22 10:13, Arnaud Pouliquen 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.

Perhaps reworded a bit as:

   "Since it is not possible to probe the device "rproc-virtio" by
   declaring it in the device tree, documenting it in the bindings
   does not make sense."

Otherwise:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> This commit solves the checkpatch warning by suppressing the useless
> of_match_table.
> 
> 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>
> Reviewed-by: Rob Herring <robh@kernel.org>
> 
> ---
> Updates vs previous revision:
> - replace the "of_platform.h" include by "platform_device.h",
> - replace "Fix-suggested-by" by "Suggested-by",
> - add Rob's Reviewed-by.
> ---
>   drivers/remoteproc/remoteproc_virtio.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-28  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05  8:13 [PATCH v2] remoteproc: virtio: Fix warning on bindings by removing the of_match_table Arnaud Pouliquen
2022-10-05 15:26 ` Mathieu Poirier
2022-12-28  7:11 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.