Skip to contentSkip to conversation

ib_srpt: fix a WARN_ON() message

PATCH Applied Dan Carpenter 3 participants 3 messages Mar 18, 2016 – Mar 21, 2016

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

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.

drivers/infiniband/ulp/srpt/ib_srpt.c +1 -1
index 1d13090..0bd3cb2 100644
@@ -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 on v1 1/1
#1 lore raw
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.

drivers/infiniband/ulp/srpt/ib_srpt.c +0 -0
index 1d13090..0bd3cb2 100644

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);
  	}
  }
Applied
#2 lore raw
Quoted 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.

Quoted 16 lines
Quoted 6 lines
drivers/infiniband/ulp/srpt/ib_srpt.c +0 -0
index 1d13090..0bd3cb2 100644

drivers/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);
      }
  }

Thanks, applied.