From 8266b809264caa23038ceab2811fc452cf936e84 Mon Sep 17 00:00:00 2001 From: Chunyan Zhang Date: Thu, 12 Nov 2020 15:04:10 +0800 Subject: hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' 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. Reviewed-by: Baolin Wang Reported-by: kernel test robot Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver") Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20201112070410.14810-1-zhang.lyra@gmail.com Signed-off-by: Bjorn Andersson --- drivers/hwspinlock/sprd_hwspinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hwspinlock') diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c index 95f680a4c028..d221fc9d756d 100644 --- a/drivers/hwspinlock/sprd_hwspinlock.c +++ b/drivers/hwspinlock/sprd_hwspinlock.c @@ -146,7 +146,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, }, }; module_platform_driver(sprd_hwspinlock_driver); -- cgit v1.2.3