From 348224a8080a37965b95844eba9acf44b82ccd30 Mon Sep 17 00:00:00 2001 From: Yan Burman Date: Sun, 16 Nov 2014 13:23:09 +0000 Subject: [PATCH] isert: Warn user of potential compilation issue Signed-off-by: Yan Burman git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5861 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/isert-scst/iser_rdma.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 1d39b8f7a..8218a87ab 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -810,6 +810,11 @@ static struct isert_device *isert_device_create(struct ib_device *ib_dev) cqe_num = min(isert_dev->device_attr.max_cqe, ISER_CQ_ENTRIES); cqe_num = cqe_num / isert_dev->num_cqs; +#ifdef CONFIG_SCST_EXTRACHECKS + if (isert_dev->device_attr.max_cqe == 0) + pr_err("Zero max_cqe encountered: you may have a compilation problem\n"); +#endif + for (i = 0; i < isert_dev->num_cqs; ++i) { struct isert_cq *cq_desc = &isert_dev->cq_desc[i];