@@ -940,18 +940,18 @@ static u32 __iomem *event_hdr_addr(struct switchtec_dev *stdev,
940
940
size_t off ;
941
941
942
942
if (event_id < 0 || event_id >= SWITCHTEC_IOCTL_MAX_EVENTS )
943
- return ERR_PTR (- EINVAL );
943
+ return ( u32 __iomem * ) ERR_PTR (- EINVAL );
944
944
945
945
off = event_regs [event_id ].offset ;
946
946
947
947
if (event_regs [event_id ].map_reg == part_ev_reg ) {
948
948
if (index == SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX )
949
949
index = stdev -> partition ;
950
950
else if (index < 0 || index >= stdev -> partition_count )
951
- return ERR_PTR (- EINVAL );
951
+ return ( u32 __iomem * ) ERR_PTR (- EINVAL );
952
952
} else if (event_regs [event_id ].map_reg == pff_ev_reg ) {
953
953
if (index < 0 || index >= stdev -> pff_csr_count )
954
- return ERR_PTR (- EINVAL );
954
+ return ( u32 __iomem * ) ERR_PTR (- EINVAL );
955
955
}
956
956
957
957
return event_regs [event_id ].map_reg (stdev , off , index );
@@ -1057,11 +1057,11 @@ static int ioctl_event_ctl(struct switchtec_dev *stdev,
1057
1057
}
1058
1058
1059
1059
static int ioctl_pff_to_port (struct switchtec_dev * stdev ,
1060
- struct switchtec_ioctl_pff_port * up )
1060
+ struct switchtec_ioctl_pff_port __user * up )
1061
1061
{
1062
1062
int i , part ;
1063
1063
u32 reg ;
1064
- struct part_cfg_regs * pcfg ;
1064
+ struct part_cfg_regs __iomem * pcfg ;
1065
1065
struct switchtec_ioctl_pff_port p ;
1066
1066
1067
1067
if (copy_from_user (& p , up , sizeof (p )))
@@ -1104,10 +1104,10 @@ static int ioctl_pff_to_port(struct switchtec_dev *stdev,
1104
1104
}
1105
1105
1106
1106
static int ioctl_port_to_pff (struct switchtec_dev * stdev ,
1107
- struct switchtec_ioctl_pff_port * up )
1107
+ struct switchtec_ioctl_pff_port __user * up )
1108
1108
{
1109
1109
struct switchtec_ioctl_pff_port p ;
1110
- struct part_cfg_regs * pcfg ;
1110
+ struct part_cfg_regs __iomem * pcfg ;
1111
1111
1112
1112
if (copy_from_user (& p , up , sizeof (p )))
1113
1113
return - EFAULT ;
@@ -1484,7 +1484,7 @@ static void init_pff(struct switchtec_dev *stdev)
1484
1484
{
1485
1485
int i ;
1486
1486
u32 reg ;
1487
- struct part_cfg_regs * pcfg = stdev -> mmio_part_cfg ;
1487
+ struct part_cfg_regs __iomem * pcfg = stdev -> mmio_part_cfg ;
1488
1488
1489
1489
for (i = 0 ; i < SWITCHTEC_MAX_PFF_CSR ; i ++ ) {
1490
1490
reg = ioread16 (& stdev -> mmio_pff_csr [i ].vendor_id );
0 commit comments