public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel-01 <edk2-devel@lists.01.org>,
	Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH v2 1/7] OvmfPkg: introduce PciCapLib
Date: Thu, 24 May 2018 19:25:56 +0200	[thread overview]
Message-ID: <dc2f8bdd-e0b7-fcee-1730-0d348f51d1ac@redhat.com> (raw)
In-Reply-To: <CAKv+Gu982zzm4YSaEkLT0CPb9x0OMh+PUqTE3QVjFLGQeon9hg@mail.gmail.com>

On 05/24/18 16:41, Ard Biesheuvel wrote:
> On 24 May 2018 at 16:39, Laszlo Ersek <lersek@redhat.com> wrote:
>> On 05/24/18 09:53, Ard Biesheuvel wrote:

>>>> +RETURN_STATUS
>>>> +EFIAPI
>>>> +PciCapGetInfo (
>>>> +  IN  PCI_CAP      *Cap,
>>>> +  OUT PCI_CAP_INFO *Info
>>>> +  )
>>>> +{
>>>> +  PCI_CAP *InstanceZero;
>>>> +
>>>
>>> Nit: add
>>>
>>> ASSERT (Info != NULL);
>>>
>>> here?
>>>
>>> I know it seems rather arbitrary to add it here and not anywhere else,
>>> but PciCapGetInfo() is part of the API, and dereferencing Info [which
>>> may be the result of e.g., a pool allocation] for writing is
>>> particularly bad.
>>
>>
>> I will add the ASSERT().
>>
>> (I hope I didn't miss any of your comments!)
>>
> 
> It's just a nit, feel free to ignore.
> 
> In any case,
> 
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> 

Thanks! I'll add the ASSERT.
Laszlo


  reply	other threads:[~2018-05-24 17:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 20:21 [PATCH v2 0/7] OvmfPkg, ArmVirtPkg: add and use PCI(E) Capabilities Library Laszlo Ersek
2018-05-23 20:21 ` [PATCH v2 1/7] OvmfPkg: introduce PciCapLib Laszlo Ersek
2018-05-24  7:53   ` Ard Biesheuvel
2018-05-24 14:39     ` Laszlo Ersek
2018-05-24 14:41       ` Ard Biesheuvel
2018-05-24 17:25         ` Laszlo Ersek [this message]
2018-05-23 20:21 ` [PATCH v2 2/7] OvmfPkg: introduce PciCapPciSegmentLib Laszlo Ersek
2018-05-24  8:08   ` Ard Biesheuvel
2018-05-24 14:43     ` Laszlo Ersek
2018-05-24 14:55       ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 3/7] OvmfPkg: introduce PciCapPciIoLib Laszlo Ersek
2018-05-24  8:13   ` Ard Biesheuvel
2018-05-24 14:50     ` Laszlo Ersek
2018-05-24 14:54       ` Ard Biesheuvel
2018-05-24 14:54         ` Ard Biesheuvel
2018-05-24 17:22         ` Laszlo Ersek
2018-05-23 20:21 ` [PATCH v2 4/7] OvmfPkg: resolve PciCapLib, PciCapPciSegmentLib, PciCapPciIoLib Laszlo Ersek
2018-05-24  8:14   ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 5/7] ArmVirtPkg: " Laszlo Ersek
2018-05-24  8:14   ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 6/7] OvmfPkg/PciHotPlugInitDxe: convert to PciCapLib Laszlo Ersek
2018-05-24  8:15   ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 7/7] OvmfPkg/Virtio10Dxe: " Laszlo Ersek
2018-05-24  8:16   ` Ard Biesheuvel
2018-05-24 14:55     ` Laszlo Ersek
2018-05-24 20:04 ` [PATCH v2 0/7] OvmfPkg, ArmVirtPkg: add and use PCI(E) Capabilities Library Laszlo Ersek

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-list 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=dc2f8bdd-e0b7-fcee-1730-0d348f51d1ac@redhat.com \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox