Skip to contentSkip to conversation

qed: Delete redundant check on dcb_app priority

PATCH Applied Christos Gkekas 3 participants 3 messages Oct 8, 2017 – Oct 9, 2017

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

PATCH 1/1 qed: Delete redundant check on dcb_app priority

dcb_app priority is unsigned thus checking whether it is less than zero is redundant.

---
 drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_dcbx.c +1 -1
index 8f6ccc0..6e15d3c 100644
@@ -2308,7 +2308,7 @@ static int qed_dcbnl_ieee_setapp(struct qed_dev *cdev, struct dcb_app *app)
 
 	DP_VERBOSE(hwfn, QED_MSG_DCB, "selector = %d protocol = %d pri = %d\n",
 		   app->selector, app->protocol, app->priority);
-	if (app->priority < 0 || app->priority >= QED_MAX_PFC_PRIORITIES) {
+	if (app->priority >= QED_MAX_PFC_PRIORITIES) {
 		DP_INFO(hwfn, "Invalid priority %d\n", app->priority);
 		return -EINVAL;
 	}
Signature · 1 line
2.7.4