Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <baolin.wang7@gmail.com>
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>
Link: https://lore.kernel.org/r/20201112070410.14810-1-zhang.lyra@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

authored by

Chunyan Zhang and committed by
Bjorn Andersson
8266b809 8308678e

+1 -1
+1 -1
drivers/hwspinlock/sprd_hwspinlock.c
··· 146 146 .probe = sprd_hwspinlock_probe, 147 147 .driver = { 148 148 .name = "sprd_hwspinlock", 149 - .of_match_table = of_match_ptr(sprd_hwspinlock_of_match), 149 + .of_match_table = sprd_hwspinlock_of_match, 150 150 }, 151 151 }; 152 152 module_platform_driver(sprd_hwspinlock_driver);