public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'
@ 2020-10-26  7:30 Chunyan Zhang
  2020-10-26  7:30 ` [PATCH 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall Chunyan Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Chunyan Zhang @ 2020-10-26  7:30 UTC (permalink / raw)
  To: Ohad Ben-Cohen, Bjorn Andersson, Baolin Wang
  Cc: linux-remoteproc, linux-kernel, Orson Zhai, Chunyan Zhang,
	Chunyan Zhang

From: Chunyan Zhang <chunyan.zhang@unisoc.com>

The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this
case Clang compiler would complain the of_device_id variable is unused.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver")
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
---
 drivers/hwspinlock/sprd_hwspinlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c
index 36dc8038bbb4..e7b55217293c 100644
--- a/drivers/hwspinlock/sprd_hwspinlock.c
+++ b/drivers/hwspinlock/sprd_hwspinlock.c
@@ -148,7 +148,7 @@ static struct platform_driver sprd_hwspinlock_driver = {
 	.probe = sprd_hwspinlock_probe,
 	.driver = {
 		.name = "sprd_hwspinlock",
-		.of_match_table = of_match_ptr(sprd_hwspinlock_of_match),
+		.of_match_table = sprd_hwspinlock_of_match,
 	},
 };
 
-- 
2.20.1


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

end of thread, other threads:[~2020-10-26  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-26  7:30 [PATCH 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' Chunyan Zhang
2020-10-26  7:30 ` [PATCH 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall Chunyan Zhang
2020-10-26  7:35   ` Chunyan Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox