From: Marcel Apfelbaum <marcel@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5 10/11] pci core: assert ENOSPC when add capability
Date: Sun, 15 May 2016 16:10:01 +0300 [thread overview]
Message-ID: <57387529.5060203@redhat.com> (raw)
In-Reply-To: <1462508442-9407-11-git-send-email-caoj.fnst@cn.fujitsu.com>
On 05/06/2016 07:20 AM, Cao jin wrote:
> ENOSPC is programming error, assert it for debugging.
>
> cc: Michael S. Tsirkin <mst@redhat.com>
> cc: Marcel Apfelbaum <marcel@redhat.com>
> cc: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
> hw/pci/pci.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index f0f41dc..fc8b377 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -2151,10 +2151,8 @@ int pci_add_capability2(PCIDevice *pdev, uint8_t cap_id,
>
> if (!offset) {
> offset = pci_find_space(pdev, size);
> - if (!offset) {
> - error_setg(errp, "out of PCI config space");
> - return -ENOSPC;
> - }
> + /* out of PCI config space should be programming error */
'is', not 'should be'
> + assert(offset);
> } else {
> /* Verify that capabilities don't overlap. Note: device assignment
> * depends on this check to verify that the device is not broken.
>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Thanks,
Marcel
next prev parent reply other threads:[~2016-05-15 13:10 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-06 4:20 [Qemu-devel] [PATCH v5 00/11] Add param Error ** for msi_init() Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 01/11] fix some coding style problems Cao jin
2016-05-15 12:36 ` Marcel Apfelbaum
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 02/11] change pvscsi_init_msi() type to void Cao jin
2016-05-06 5:48 ` Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 03/11] megasas: Fix Cao jin
2016-05-06 5:43 ` Cao jin
2016-05-15 12:37 ` Marcel Apfelbaum
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 04/11] mptsas: change .realize function name Cao jin
2016-05-06 5:53 ` Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 05/11] usb xhci: change msi/msix property type Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 06/11] intel-hda: change msi " Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 07/11] mptsas: " Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 08/11] megasas: change msi/msix " Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 09/11] pci bridge dev: change msi " Cao jin
2016-05-15 13:25 ` Marcel Apfelbaum
2016-05-17 7:39 ` Cao jin
2016-05-17 7:38 ` Michael S. Tsirkin
2016-05-23 2:22 ` Cao jin
2016-05-23 9:55 ` Marcel Apfelbaum
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 10/11] pci core: assert ENOSPC when add capability Cao jin
2016-05-15 13:10 ` Marcel Apfelbaum [this message]
2016-05-17 3:00 ` Cao jin
2016-05-06 4:20 ` [Qemu-devel] [PATCH v5 11/11] pci: Convert msi_init() to Error and fix callers to check it Cao jin
2016-05-15 13:41 ` Marcel Apfelbaum
2016-05-17 10:08 ` Cao jin
2016-05-23 10:06 ` Marcel Apfelbaum
2016-05-23 12:51 ` Cao jin
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=57387529.5060203@redhat.com \
--to=marcel@redhat.com \
--cc=armbru@redhat.com \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.