All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Yuval Shaia <yuval.shaia@oracle.com>
Subject: Re: [Qemu-devel] [PATCH PULL v2 08/10] hw/rdma: PVRDMA commands and data-path ops
Date: Fri, 27 Apr 2018 15:58:30 +0100	[thread overview]
Message-ID: <CAFEAcA_jBt9tUU1jgObPQCp=x0YOguRz8RX=TVHjONSFPjNveA@mail.gmail.com> (raw)
In-Reply-To: <20180219114332.70443-9-marcel@redhat.com>

On 19 February 2018 at 11:43, Marcel Apfelbaum <marcel@redhat.com> wrote:
> From: Yuval Shaia <yuval.shaia@oracle.com>
>
> First PVRDMA sub-module - implementation of the PVRDMA device.
> - PVRDMA commands such as create CQ and create MR.
> - Data path QP operations - post_send and post_recv.
> - Completion handler.

> +void pvrdma_cq_poll(RdmaDeviceResources *dev_res, uint32_t cq_handle)
> +{
> +    RdmaRmCQ *cq;
> +
> +    cq = rdma_rm_get_cq(dev_res, cq_handle);
> +    if (!cq) {
> +        pr_dbg("Invalid CQ# %d\n", cq_handle);
> +    }
> +
> +    rdma_backend_poll_cq(dev_res, &cq->backend_cq);
> +}

Coverity CID 1390586: we check for cq being NULL, but then
go ahead and use it anyway. If a NULL cq is a possible
situation we should handle it correctly (early return?
return an error value that the caller has to handle?
something else?); if it is not possible then we should
use assert rather than an if().

thanks
-- PMM

  parent reply	other threads:[~2018-04-27 14:58 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 11:43 [Qemu-devel] [PATCH PULL v2 00/10] RDMA patches Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 01/10] mem: add share parameter to memory-backend-ram Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 02/10] docs: add pvrdma device documentation Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 03/10] scripts/update-linux-headers: import pvrdma headers Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 04/10] include/standard-headers: add pvrdma related headers Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 05/10] hw/rdma: Add wrappers and macros Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 06/10] hw/rdma: Definitions for rdma device and rdma resource manager Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 07/10] hw/rdma: Implementation of generic rdma device layers Marcel Apfelbaum
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 08/10] hw/rdma: PVRDMA commands and data-path ops Marcel Apfelbaum
2018-04-27 14:31   ` Peter Maydell
2018-04-27 18:20     ` Marcel Apfelbaum
2018-04-29  7:42       ` Yuval Shaia
2018-04-27 14:43   ` Peter Maydell
2018-04-27 18:22     ` Marcel Apfelbaum
2018-04-27 14:58   ` Peter Maydell [this message]
2018-04-27 18:28     ` Marcel Apfelbaum
2018-04-27 15:01   ` Peter Maydell
2018-04-27 18:31     ` Marcel Apfelbaum
2023-06-20 12:35   ` Peter Maydell
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 09/10] hw/rdma: Implementation of PVRDMA device Marcel Apfelbaum
2018-04-27 14:49   ` Peter Maydell
2018-04-27 19:36     ` Marcel Apfelbaum
2018-04-29  9:38       ` Yuval Shaia
2018-04-27 14:55   ` Peter Maydell
2018-04-27 19:46     ` Marcel Apfelbaum
2018-04-29  7:18     ` Yuval Shaia
2018-02-19 11:43 ` [Qemu-devel] [PATCH PULL v2 10/10] MAINTAINERS: add entry for hw/rdma Marcel Apfelbaum
2018-02-19 16:43 ` [Qemu-devel] [PATCH PULL v2 00/10] RDMA patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA_jBt9tUU1jgObPQCp=x0YOguRz8RX=TVHjONSFPjNveA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yuval.shaia@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.