aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/pensando
diff options
context:
space:
mode:
authorShannon Nelson2020-07-21 13:34:07 -0700
committerDavid S. Miller2020-07-21 18:36:34 -0700
commit3fbc9bb6ca32d12d4d32a7ae32abef67ac95f889 (patch)
treef4c3ddb8ebeefb6f34e68f3f9fc75d056fd577e3 /drivers/net/ethernet/pensando
parent4471b1c13ae7e3c8be64a9e015c6bc31468e1b16 (diff)
ionic: update eid test for overflow
Fix up our comparison to better handle a potential (but largely unlikely) wrap around. Signed-off-by: Shannon Nelson <snelson@pensando.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/pensando')
-rw-r--r--drivers/net/ethernet/pensando/ionic/ionic_lif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index bbfa25cd3294..db60c5405a58 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -719,7 +719,7 @@ static bool ionic_notifyq_service(struct ionic_cq *cq,
eid = le64_to_cpu(comp->event.eid);
/* Have we run out of new completions to process? */
- if (eid <= lif->last_eid)
+ if ((s64)(eid - lif->last_eid) <= 0)
return false;
lif->last_eid = eid;