Skip to contentSkip to conversation

hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'

PATCH RESEND New Chunyan Zhang 1 participant 1 message Nov 12, 2020

Subsystems (2)

v1 of 2 New Latest is v2 →

lore
Share & tools
lore

Chunyan Zhang

author reviewer
#0 lore raw

PATCH RESEND 1/2 hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'

From: Chunyan Zhang <[email protected]>

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.

Fixes d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver")

---
* Resent this patch only since the 2nd patch in this patchset has been applied [1].

[1] https://www.spinics.net/lists/kernel/msg3720202.html

---
 drivers/hwspinlock/sprd_hwspinlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwspinlock/sprd_hwspinlock.c +1 -1
index 36dc8038bbb4..e7b55217293c 100644
@@ -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,
 	},
 };
 
Signature · 1 line
2.20.1