ib_srpt: fix a WARN_ON() message
Subsystems (3)
PATCH 1/1 ib_srpt: fix a WARN_ON() message
The first argument of WARN_ON() is a condition, so it means the warning message here will just be the name without the ->qp_num information.
Signed-off-by Dan Carpenter <[email protected]>
drivers/infiniband/ulp/srpt/ib_srpt.c +1 -1
@@ -839,7 +839,7 @@ static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc)if (srpt_set_ch_state (ch,CH_DISCONNECTED ))schedule_work (&ch->release_work);else -WARN_ONCE ("%s-%d\n" , ch->sess_name, ch->qp->qp_num); +WARN_ONCE (1 ,"%s-%d\n" , ch->sess_name, ch->qp->qp_num); } }
Quoted 10 lines · Dan Carpenter
The first argument of
WARN_ON()is a condition, so it means the warning message here will just be the name without the ->qp_num information.Signed-off-by Dan Carpenter <[email protected]>drivers/infiniband/ulp/srpt/ib_srpt.c +0
-0
drivers/infiniband/ulp/srpt/ib_srpt.c static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc) · line 844
Quoted 7 lines
drivers/infiniband/ulp/srpt/ib_srpt.c +1
-1@@ -839,7 +839,7 @@ static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc)if (srpt_set_ch_state (ch,CH_DISCONNECTED ))schedule_work (&ch->release_work);else -WARN_ONCE ("%s-%d\n" , ch->sess_name, ch->qp->qp_num); +WARN_ONCE (1 ,"%s-%d\n" , ch->sess_name, ch->qp->qp_num); } }
Reviewed-by Bart Van Assche <[email protected]>
Doug Ledford
AppliedQuoted 6 lines · Bart Van Assche
Quoted 5 lines · Dan Carpenter
The first argument of
WARN_ON()is a condition, so it means the warning message here will just be the name without the ->qp_num information.Signed-off-by Dan Carpenter <[email protected]>
Quoted 16 lines
Quoted 6 lines
drivers/infiniband/ulp/srpt/ib_srpt.c +0
-0drivers/infiniband/ulp/srpt/ib_srpt.c static void srpt_zerolength_write_done(struct · line 845
Quoted 8 lines
drivers/infiniband/ulp/srpt/ib_srpt.c +1
-1@@ -839,7 +839,7 @@ static void srpt_zerolength_write_done(struct ib_cq *cq, struct ib_wc *wc) if (srpt_set_ch_state(ch, CH_DISCONNECTED)) schedule_work(&ch->release_work); else - WARN_ONCE("%s-%d\n", ch->sess_name, ch->qp->qp_num); + WARN_ONCE(1, "%s-%d\n", ch->sess_name, ch->qp->qp_num); } }Reviewed-by Bart Van Assche <[email protected]>
Thanks, applied.