Skip to content
Commit 7ebfe10e authored by Linus Walleij's avatar Linus Walleij
Browse files

pinctrl: loongson2: Fix some const correctness



The kernel robot using sparse is complaining like this:

drivers/pinctrl/pinctrl-loongson2.c:212:21: sparse:
 sparse: incorrect type in argument 1 (different address spaces) @@
 expected void const volatile [noderef] __iomem *addr @@
 got void *[noderef] __iomem reg @@
(...)

I think the problem is simply that the register base is defined
as void * __iomem instead of void __iomem * and this is because
of the way const correctness works with pointer infix order.

Fix it up. I think.

Reported-by: default avatarkernel test robot <lkp@intel.com>
Cc: zhanghongchen <zhanghongchen@loongson.cn>
Cc: Yinbo Zhu <zhuyinbo@loongson.cn>
Fixes: f73f88ac ("pinctrl: pinctrl-loongson2: add pinctrl driver support")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5ead9328
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment