Skip to contentSkip to conversation

vop: Add missing __iomem annotation in vop_dc_to_vdev()

PATCH In review Ashutosh Dixit 3 participants 4 messages Aug 2, 2020 – Aug 3, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vop: Add missing __iomem annotation in vop_dc_to_vdev()

Fix the following sparse warnings in drivers/misc/mic/vop//vop_main.c:

551:58: warning: incorrect type in argument 1 (different address spaces)
551:58: expected void const volatile [noderef] __iomem *addr
551:58: got restricted __le64 *
560:49: warning: incorrect type in argument 1 (different address spaces)
560:49: expected struct mic_device_ctrl *dc
560:49: got struct mic_device_ctrl [noderef] __iomem *dc
579:49: warning: incorrect type in argument 1 (different address spaces)
579:49: expected struct mic_device_ctrl *dc
579:49: got struct mic_device_ctrl [noderef] __iomem *dc

Cc Michael S. Tsirkin <[email protected]>
Cc Sudeep Dutt <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Vincent Whitchurch <[email protected]>
Cc stable <[email protected]>
---
 drivers/misc/mic/vop/vop_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mic/vop/vop_main.c +1 -1
index 85942f6717c5..25ed7d731701 100644
@@ -546,7 +546,7 @@ static int vop_match_desc(struct device *dev, void *data)
 	return vdev->desc == (void __iomem *)data;
 }
 
-static struct _vop_vdev *vop_dc_to_vdev(struct mic_device_ctrl *dc)
+static struct _vop_vdev *vop_dc_to_vdev(struct mic_device_ctrl __iomem *dc)
 {
 	return (struct _vop_vdev *)(unsigned long)readq(&dc->vdev);
 }
Signature · 1 line
2.26.2.108.g048abe1751
#1 lore raw
Quoted 12 lines · Ashutosh Dixit

Fix the following sparse warnings in drivers/misc/mic/vop//vop_main.c:

551:58: warning: incorrect type in argument 1 (different address spaces)
551:58: expected void const volatile [noderef] __iomem *addr
551:58: got restricted __le64 *
560:49: warning: incorrect type in argument 1 (different address spaces)
560:49: expected struct mic_device_ctrl *dc
560:49: got struct mic_device_ctrl [noderef] __iomem *dc
579:49: warning: incorrect type in argument 1 (different address spaces)
579:49: expected struct mic_device_ctrl *dc
579:49: got struct mic_device_ctrl [noderef] __iomem *dc

Quoted 5 lines
Cc Michael S. Tsirkin <[email protected]>
Cc Sudeep Dutt <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Vincent Whitchurch <[email protected]>
Cc stable <[email protected]>

Why is this a stable thing? It doesn't fix a real bug, and sparse warnings are not needed for stable trees, unless this is the last sparse warning there.

thanks,

greg k-h

#2 lore raw
Quoted 20 lines · Greg Kroah-Hartman
Quoted 12 lines · Ashutosh Dixit

Fix the following sparse warnings in drivers/misc/mic/vop//vop_main.c:

551:58: warning: incorrect type in argument 1 (different address spaces)
551:58: expected void const volatile [noderef] __iomem *addr
551:58: got restricted __le64 *
560:49: warning: incorrect type in argument 1 (different address spaces)
560:49: expected struct mic_device_ctrl *dc
560:49: got struct mic_device_ctrl [noderef] __iomem *dc
579:49: warning: incorrect type in argument 1 (different address spaces)
579:49: expected struct mic_device_ctrl *dc
579:49: got struct mic_device_ctrl [noderef] __iomem *dc

Quoted 5 lines
Cc Michael S. Tsirkin <[email protected]>
Cc Sudeep Dutt <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Vincent Whitchurch <[email protected]>
Cc stable <[email protected]>
Quoted 3 lines

Why is this a stable thing? It doesn't fix a real bug, and sparse warnings are not needed for stable trees, unless this is the last sparse warning there.

It is the last sparse warning. Sorry I wasn't sure about stable so I thought might as well. Please ignore if it's not required. Thanks.

Acked-by on v1 1/1
#3 lore raw
In reply to Ashutosh Dixit
Quoted 12 lines · Ashutosh Dixit

Fix the following sparse warnings in drivers/misc/mic/vop//vop_main.c:

551:58: warning: incorrect type in argument 1 (different address spaces)
551:58: expected void const volatile [noderef] __iomem *addr
551:58: got restricted __le64 *
560:49: warning: incorrect type in argument 1 (different address spaces)
560:49: expected struct mic_device_ctrl *dc
560:49: got struct mic_device_ctrl [noderef] __iomem *dc
579:49: warning: incorrect type in argument 1 (different address spaces)
579:49: expected struct mic_device_ctrl *dc
579:49: got struct mic_device_ctrl [noderef] __iomem *dc

Quoted 6 lines
Cc Michael S. Tsirkin <[email protected]>
Cc Sudeep Dutt <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Vincent Whitchurch <[email protected]>
Cc stable <[email protected]>
Quoted 19 lines
---
 drivers/misc/mic/vop/vop_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/mic/vop/vop_main.c +1 -1
index 85942f6717c5..25ed7d731701 100644
@@ -546,7 +546,7 @@ static int vop_match_desc(struct device *dev, void *data)
 	return vdev->desc == (void __iomem *)data;
 }
 
-static struct _vop_vdev *vop_dc_to_vdev(struct mic_device_ctrl *dc)
+static struct _vop_vdev *vop_dc_to_vdev(struct mic_device_ctrl __iomem *dc)
 {
 	return (struct _vop_vdev *)(unsigned long)readq(&dc->vdev);
 }
Signature · 1 line
2.26.2.108.g048abe1751