Skip to contentSkip to conversation

remoteproc/mediatek: Fix kernel test robot warning

PATCH Applied Souptick Joarder 2 participants 2 messages Nov 27, 2020 – Nov 28, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc/mediatek: Fix kernel test robot warning

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

drivers/remoteproc/mtk_scp.c:755:37: warning: unused variable 'mt8183_of_data' [-Wunused-const-variable]

   static const struct mtk_scp_of_data mt8183_of_data = {
                                       ^
Quoted 2 lines
Quoted 2 lines

drivers/remoteproc/mtk_scp.c:765:37: warning: unused variable 'mt8192_of_data' [-Wunused-const-variable]

   static const struct mtk_scp_of_data mt8192_of_data = {
                                       ^

As suggested by Bjorn, there's no harm in just dropping the of_match_ptr() wrapping of mtk_scp_of_match in the definition of mtk_scp_driver and we avoid this whole problem.

---
 drivers/remoteproc/mtk_scp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/remoteproc/mtk_scp.c +1 -3
index 7e0f1e1..5f42b9c 100644
@@ -772,21 +772,19 @@ static int scp_remove(struct platform_device *pdev)
 	.host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT,
 };
 
-#if defined(CONFIG_OF)
 static const struct of_device_id mtk_scp_of_match[] = {
 	{ .compatible = "mediatek,mt8183-scp", .data = &mt8183_of_data },
 	{ .compatible = "mediatek,mt8192-scp", .data = &mt8192_of_data },
 	{},
 };
 MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
-#endif
 
 static struct platform_driver mtk_scp_driver = {
 	.probe = scp_probe,
 	.remove = scp_remove,
 	.driver = {
 		.name = "mtk-scp",
-		.of_match_table = of_match_ptr(mtk_scp_of_match),
+		.of_match_table = mtk_scp_of_match,
 	},
 };
 
Signature · 7 lines
1.9.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#1 lore raw
This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Hello:

This patch was applied to andersson/remoteproc.git (refs/heads/for-next):

Quoted 8 lines · On Sat, 28 Nov 2020 03:20:55 +0530 you wrote:

Kernel test robot throws below warning ->

Quoted 2 lines
Quoted 2 lines

drivers/remoteproc/mtk_scp.c:755:37: warning: unused variable 'mt8183_of_data' [-Wunused-const-variable]

   static const struct mtk_scp_of_data mt8183_of_data = {
                                       ^
Quoted 2 lines
Quoted 2 lines

drivers/remoteproc/mtk_scp.c:765:37: warning: unused variable 'mt8192_of_data' [-Wunused-const-variable]

Quoted 7 lines
   static const struct mtk_scp_of_data mt8192_of_data = {
                                       ^

As suggested by Bjorn, there's no harm in just dropping the of_match_ptr() wrapping of mtk_scp_of_match in the definition of mtk_scp_driver and we avoid this whole problem.

[...]

Here is the summary with links:
- remoteproc/mediatek: Fix kernel test robot warning

    https://git.kernel.org/andersson/remoteproc/c/8c09e5fdf31b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html