summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-04-01 20:10:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-02 17:02:39 +0200
commitd7aa44f5a1f86cb40659eef06035d8d92604b9d5 (patch)
tree8dc75a9fb7c32a47c8967450dcbbb2c1a30a72f3 /drivers/base
parent1768289b44bae847612751d418fc5c5e680b5e5c (diff)
downloadlwn-d7aa44f5a1f86cb40659eef06035d8d92604b9d5.tar.gz
lwn-d7aa44f5a1f86cb40659eef06035d8d92604b9d5.zip
driver core: Cast to (void *) with __force for __percpu pointer
Sparse is not happy: drivers/base/devres.c:1230:9: warning: cast removes address space '__percpu' of expression Use __force attribute to make it happy. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210401171030.60527-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/devres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index fb9d5289a620..7ce57e88cf4b 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -1228,6 +1228,6 @@ EXPORT_SYMBOL_GPL(__devm_alloc_percpu);
void devm_free_percpu(struct device *dev, void __percpu *pdata)
{
WARN_ON(devres_destroy(dev, devm_percpu_release, devm_percpu_match,
- (void *)pdata));
+ (__force void *)pdata));
}
EXPORT_SYMBOL_GPL(devm_free_percpu);