From c236d6474572391228a46177707ed8a6d1fb7f98 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 7 Aug 2014 21:56:46 +0000 Subject: Cast queue length because q_len isn't really an enum in the same sense that clang wants it to be (a value that can only have values inside the enum range), but rather an unsigned count of bytes. --- sys/dev/oce/oce_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c index f3f7723942bc..d3dab2fcace0 100644 --- a/sys/dev/oce/oce_mbox.c +++ b/sys/dev/oce/oce_mbox.c @@ -1876,7 +1876,7 @@ oce_mbox_cq_create(struct oce_cq *cq, uint32_t ncoalesce, uint32_t is_eventable) ctx->v2.armed = 0; ctx->v2.eq_id = cq->eq->eq_id; if (ctx->v2.count == 3) { - if (cq->cq_cfg.q_len > (4*1024)-1) + if ((u_int)cq->cq_cfg.q_len > (4*1024)-1) ctx->v2.cqe_count = (4*1024)-1; else ctx->v2.cqe_count = cq->cq_cfg.q_len; -- cgit v1.2.3