From patchwork Sat Jul 7 22:16:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 1169101 X-Patchwork-Delegate: roland@digitalvampire.org Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6D1933FC36 for ; Sat, 7 Jul 2012 22:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751645Ab2GGWQO (ORCPT ); Sat, 7 Jul 2012 18:16:14 -0400 Received: from na3sys010aog102.obsmtp.com ([74.125.245.72]:52300 "HELO na3sys010aog102.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751603Ab2GGWQN (ORCPT ); Sat, 7 Jul 2012 18:16:13 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]) (using TLSv1) by na3sys010aob102.postini.com ([74.125.244.12]) with SMTP ID DSNKT/i1LHq4lRcNGUkVI1rS8YfyHRZv/DqK@postini.com; Sat, 07 Jul 2012 15:16:13 PDT Received: by pbbrq13 with SMTP id rq13so18895357pbb.36 for ; Sat, 07 Jul 2012 15:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=Xq5TlGmm/JnpQ1KTw8ivj/6mQKKxl6Yk8vKUuG+XLxc=; b=CqcOs69mVrrE32Z3xt/hF7+MOYCOwhnsHv2kYqZQX5QIOLo3W38dd+a5iAepqPAjzm w49len51IN1dfnlkWwtAaOcCr7L6GRq3HgbwbGQMcEUvFxjsGCQY8WAIEVRvfihTVvJC 1U2TrUdRmon1gn26xA0SE2r4pNcg36ATQQ6hI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=Xq5TlGmm/JnpQ1KTw8ivj/6mQKKxl6Yk8vKUuG+XLxc=; b=edd4vjzjv8zPqm2TetD8EXMUFT3EeS+SgljvZxNvI3MOsMgDPR2BBZV7J1taAryaXr YEcauWdE6YYmnRuo9xOr9Ex9c8WpeQGr4fs6/1TBUezQwgThDk1/N6Kj1W+iccBF2Y9F skquPAyUn6qqUDOI95UlOqXZ4KAdWJZdmpQZVhQKh/LTJOG9kv4/hCAkDvhkd46lnbCz yMt/8bW/TO+7wVz/tvzibN7VDdw8Ha/CSPSdvNH3YAQncZmiTIPSprcgHCXvQ1ZSStzd nkfS3vFzlloQV1DrBBz8wP0ylDrQTKMAXnAu15tfkjOAVAQp/uGz/uF39Nyn/0nXIUqt jeug== Received: by 10.68.136.229 with SMTP id qd5mr48224752pbb.2.1341699372145; Sat, 07 Jul 2012 15:16:12 -0700 (PDT) Received: from roland-t410s.home.digitalvampire.org (c-69-181-166-205.hsd1.ca.comcast.net. [69.181.166.205]) by mx.google.com with ESMTPS id wf7sm24537708pbc.34.2012.07.07.15.16.08 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 07 Jul 2012 15:16:10 -0700 (PDT) From: Roland Dreier To: Mahesh Vardhamanaiah , Parav Pandit Cc: linux-rdma@vger.kernel.org Subject: [PATCH] RDMA/ocrdma: Fix assignment of max_srq_sge in device query Date: Sat, 7 Jul 2012 15:16:03 -0700 Message-Id: <1341699363-16643-1-git-send-email-roland@kernel.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQkh47iOQDCje6zdliTrz0SGQHgPoVjlIsfff7MzgSFs/ajUmF0eOW7WOU219xj4iTRMxXP9 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Roland Dreier We want to set attr->max_srq_sge to dev->attr.max_srq_sge, not to itself. This was detected by Coverity (CID 709210). Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 2e2e7ae..b2f9784 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c @@ -97,7 +97,7 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr) min(dev->attr.max_ord_per_qp, dev->attr.max_ird_per_qp); attr->max_qp_init_rd_atom = dev->attr.max_ord_per_qp; attr->max_srq = (dev->attr.max_qp - 1); - attr->max_srq_sge = attr->max_srq_sge; + attr->max_srq_sge = dev->attr.max_srq_sge; attr->max_srq_wr = dev->attr.max_rqe; attr->local_ca_ack_delay = dev->attr.local_ca_ack_delay; attr->max_fast_reg_page_list_len = 0;