@@ -501,7 +501,7 @@ static void iser_connect_error(struct rdma_cm_id *cma_id)
501
501
{
502
502
struct iser_conn * iser_conn ;
503
503
504
- iser_conn = ( struct iser_conn * ) cma_id -> context ;
504
+ iser_conn = cma_id -> context ;
505
505
iser_conn -> state = ISER_CONN_TERMINATING ;
506
506
}
507
507
@@ -549,7 +549,7 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id)
549
549
struct ib_conn * ib_conn ;
550
550
int ret ;
551
551
552
- iser_conn = ( struct iser_conn * ) cma_id -> context ;
552
+ iser_conn = cma_id -> context ;
553
553
if (iser_conn -> state != ISER_CONN_PENDING )
554
554
/* bailout */
555
555
return ;
@@ -595,7 +595,7 @@ static void iser_route_handler(struct rdma_cm_id *cma_id)
595
595
struct rdma_conn_param conn_param ;
596
596
int ret ;
597
597
struct iser_cm_hdr req_hdr ;
598
- struct iser_conn * iser_conn = ( struct iser_conn * ) cma_id -> context ;
598
+ struct iser_conn * iser_conn = cma_id -> context ;
599
599
struct ib_conn * ib_conn = & iser_conn -> ib_conn ;
600
600
struct ib_device * ib_dev = ib_conn -> device -> ib_device ;
601
601
@@ -638,7 +638,7 @@ static void iser_connected_handler(struct rdma_cm_id *cma_id,
638
638
struct ib_qp_attr attr ;
639
639
struct ib_qp_init_attr init_attr ;
640
640
641
- iser_conn = ( struct iser_conn * ) cma_id -> context ;
641
+ iser_conn = cma_id -> context ;
642
642
if (iser_conn -> state != ISER_CONN_PENDING )
643
643
/* bailout */
644
644
return ;
@@ -661,7 +661,7 @@ static void iser_connected_handler(struct rdma_cm_id *cma_id,
661
661
662
662
static void iser_disconnected_handler (struct rdma_cm_id * cma_id )
663
663
{
664
- struct iser_conn * iser_conn = ( struct iser_conn * ) cma_id -> context ;
664
+ struct iser_conn * iser_conn = cma_id -> context ;
665
665
666
666
if (iser_conn_terminate (iser_conn )) {
667
667
if (iser_conn -> iscsi_conn )
@@ -675,7 +675,7 @@ static void iser_disconnected_handler(struct rdma_cm_id *cma_id)
675
675
static void iser_cleanup_handler (struct rdma_cm_id * cma_id ,
676
676
bool destroy )
677
677
{
678
- struct iser_conn * iser_conn = ( struct iser_conn * ) cma_id -> context ;
678
+ struct iser_conn * iser_conn = cma_id -> context ;
679
679
680
680
/*
681
681
* We are not guaranteed that we visited disconnected_handler
@@ -692,7 +692,7 @@ static int iser_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *eve
692
692
struct iser_conn * iser_conn ;
693
693
int ret = 0 ;
694
694
695
- iser_conn = ( struct iser_conn * ) cma_id -> context ;
695
+ iser_conn = cma_id -> context ;
696
696
iser_info ("%s (%d): status %d conn %p id %p\n" ,
697
697
rdma_event_msg (event -> event ), event -> event ,
698
698
event -> status , cma_id -> context , cma_id );
@@ -784,8 +784,7 @@ int iser_connect(struct iser_conn *iser_conn,
784
784
iser_conn -> state = ISER_CONN_PENDING ;
785
785
786
786
ib_conn -> cma_id = rdma_create_id (& init_net , iser_cma_handler ,
787
- (void * )iser_conn ,
788
- RDMA_PS_TCP , IB_QPT_RC );
787
+ iser_conn , RDMA_PS_TCP , IB_QPT_RC );
789
788
if (IS_ERR (ib_conn -> cma_id )) {
790
789
err = PTR_ERR (ib_conn -> cma_id );
791
790
iser_err ("rdma_create_id failed: %d\n" , err );
0 commit comments