netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qed: Delete redundant check on dcb_app priority
@ 2017-10-08 22:46 Christos Gkekas
  2017-10-09  1:38 ` Tayar, Tomer
  2017-10-09  4:21 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Christos Gkekas @ 2017-10-08 22:46 UTC (permalink / raw)
  To: Ariel Elior, everest-linux-l2, netdev, linux-kernel; +Cc: Christos Gkekas

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

Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index 8f6ccc0..6e15d3c 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -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;
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] qed: Delete redundant check on dcb_app priority
  2017-10-08 22:46 [PATCH] qed: Delete redundant check on dcb_app priority Christos Gkekas
@ 2017-10-09  1:38 ` Tayar, Tomer
  2017-10-09  4:21 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Tayar, Tomer @ 2017-10-09  1:38 UTC (permalink / raw)
  To: Christos Gkekas, Elior, Ariel, Dept-Eng Everest Linux L2,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org

> dcb_app priority is unsigned thus checking whether it is less than zero
> is redundant.
> 
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>

Thanks

Acked-By: Tomer Tayar <Tomer.Tayar@cavium.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] qed: Delete redundant check on dcb_app priority
  2017-10-08 22:46 [PATCH] qed: Delete redundant check on dcb_app priority Christos Gkekas
  2017-10-09  1:38 ` Tayar, Tomer
@ 2017-10-09  4:21 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-10-09  4:21 UTC (permalink / raw)
  To: chris.gekas; +Cc: Ariel.Elior, everest-linux-l2, netdev, linux-kernel

From: Christos Gkekas <chris.gekas@gmail.com>
Date: Sun,  8 Oct 2017 23:46:47 +0100

> dcb_app priority is unsigned thus checking whether it is less than zero
> is redundant.
> 
> Signed-off-by: Christos Gkekas <chris.gekas@gmail.com>

Applied to net-next.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-09  4:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-08 22:46 [PATCH] qed: Delete redundant check on dcb_app priority Christos Gkekas
2017-10-09  1:38 ` Tayar, Tomer
2017-10-09  4:21 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).