From: "Laszlo Ersek" <lersek@redhat.com>
To: Liran Alon <liran.alon@oracle.com>,
devel@edk2.groups.io, nikita.leshchenko@oracle.com
Cc: aaron.young@oracle.com, Jordan Justen <jordan.l.justen@intel.com>,
Ard Biesheuvel <ard.biesheuvel@arm.com>
Subject: Re: [edk2-devel] [PATCH v5 06/12] OvmfPkg/MptScsiDxe: Report targets and one LUN
Date: Wed, 29 Apr 2020 20:10:59 +0200 [thread overview]
Message-ID: <2666e264-2638-359b-ed59-60d19ecdcd61@redhat.com> (raw)
In-Reply-To: <b50dccf8-7019-53fd-afc7-50c53ec1bcb8@oracle.com>
On 04/29/20 16:45, Liran Alon wrote:
>
> On 29/04/2020 16:39, Laszlo Ersek wrote:
>> On 04/29/20 15:38, Laszlo Ersek wrote:
>>> On 04/24/20 19:59, Nikita Leshenko wrote:
>>>> diff --git a/OvmfPkg/MptScsiDxe/MptScsiDxe.inf
>>>> b/OvmfPkg/MptScsiDxe/MptScsiDxe.inf
>>>> index 9f7c98829ee1..4862ff9dd497 100644
>>>> --- a/OvmfPkg/MptScsiDxe/MptScsiDxe.inf
>>>> +++ b/OvmfPkg/MptScsiDxe/MptScsiDxe.inf
>>>> @@ -24,6 +24,7 @@ [Packages]
>>>> OvmfPkg/OvmfPkg.dec
>>>> [LibraryClasses]
>>>> + BaseMemoryLib
>>>> DebugLib
>>>> MemoryAllocationLib
>>>> UefiBootServicesTableLib
>>>> @@ -33,3 +34,6 @@ [LibraryClasses]
>>>> [Protocols]
>>>> gEfiExtScsiPassThruProtocolGuid ## BY_START
>>>> gEfiPciIoProtocolGuid ## TO_START
>>>> +
>>>> +[FixedPcd]
>>>> + gUefiOvmfPkgTokenSpaceGuid.PcdMptScsiMaxTargetLimit ## CONSUMES
>>>> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
>>>> index 28030391cff2..2d09444bbb16 100644
>>>> --- a/OvmfPkg/OvmfPkg.dec
>>>> +++ b/OvmfPkg/OvmfPkg.dec
>>>> @@ -163,6 +163,10 @@ [PcdsFixedAtBuild]
>>>> # polling loop iteration.
>>>>
>>>> gUefiOvmfPkgTokenSpaceGuid.PcdPvScsiWaitForCmpStallInUsecs|5|UINT32|0x38
>>>>
>>>> + ## Set the *inclusive* number of targets that MptScsi exposes
>>>> for scan
>>>> + # by ScsiBusDxe.
>>>> + gUefiOvmfPkgTokenSpaceGuid.PcdMptScsiMaxTargetLimit|7|UINT8|0x39
>>>> +
>>>>
>>>> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase|0x0|UINT32|0x8
>>>>
>>>>
>>>> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize|0x0|UINT32|0x9
>>>>
>>>> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize|0x0|UINT32|0xa
>>>>
>>> (1) <PcdLib.h> should be #include'd in this patch, and PcdLib should be
>>> listed under [LibraryClasses].
>>>
>>> On one hand, that's a minor wart. The driver (and the OVMF platform(s))
>>> build OK at this stage, in practice. (I tested that.) So this, per se,
>>> does not justify a v6.
>>>
>>> On the other hand, even at the end of the series, the module does not
>>> spell out the PcdLib dependency (neither #include nor [LibraryClasses]).
>>> That's not so nice.
>>>
>>> But, I'll fix that up for you, if there's not going to be another reason
>>> for a v6.
>>>
>>> With (1) addressed (by you, or by me):
>>>
>>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>>>
>>> Thanks,
>>> Laszlo
>>>
>> ... BTW I missed the same in the PvScsiDxe driver :/
>>
>> Liran, can you post a patch for that, please?
>>
>> Thanks,
>> Laszlo
>
>
> Sure. Will do. Quite surprised it builds successfully without it.
> BTW, VirtioScsi DXE driver also seems to be missing PcdLib dependency
> both in #include and [LibraryClasses] as-well.
> I can submit a patch for that as-well if you like.
Yes please!
Such dependencies are easy to miss, on commonly used / low-level lib
classes. Usually one of the higher-level lib class headers pulls in the
lib class header in question. And the [LibraryClasses] part remains
hidden because a lib instance already (explicitly or imlicitly) consumed
makes the consumer module inherit the [LibraryClasses] dependency too.
Thanks
Laszlo
next prev parent reply other threads:[~2020-04-29 18:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 17:59 [PATCH v5 00/12] OvmfPkg: Support booting from Fusion-MPT SCSI controllers Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 01/12] OvmfPkg/MptScsiDxe: Create empty driver Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 02/12] OvmfPkg/MptScsiDxe: Install DriverBinding Protocol Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 03/12] OvmfPkg/MptScsiDxe: Report name of driver Nikita Leshenko
2020-04-24 18:02 ` [edk2-devel] " Carsey, Jaben
2020-04-25 10:44 ` Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 04/12] OvmfPkg/MptScsiDxe: Probe PCI devices and look for MptScsi Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 05/12] OvmfPkg/MptScsiDxe: Install stubbed EXT_SCSI_PASS_THRU Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 06/12] OvmfPkg/MptScsiDxe: Report targets and one LUN Nikita Leshenko
2020-04-29 13:38 ` [edk2-devel] " Laszlo Ersek
2020-04-29 13:39 ` Laszlo Ersek
2020-04-29 14:45 ` Liran Alon
2020-04-29 18:10 ` Laszlo Ersek [this message]
2020-04-24 17:59 ` [PATCH v5 07/12] OvmfPkg/MptScsiDxe: Build and decode DevicePath Nikita Leshenko
2020-04-29 13:44 ` [edk2-devel] " Laszlo Ersek
2020-04-24 17:59 ` [PATCH v5 08/12] OvmfPkg/MptScsiDxe: Open PciIo protocol for later use Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 09/12] OvmfPkg/MptScsiDxe: Set and restore PCI attributes Nikita Leshenko
2020-04-29 13:50 ` [edk2-devel] " Laszlo Ersek
2020-04-24 17:59 ` [PATCH v5 10/12] OvmfPkg/MptScsiDxe: Initialize hardware Nikita Leshenko
2020-04-29 14:55 ` [edk2-devel] " Laszlo Ersek
2020-05-04 19:35 ` Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 11/12] OvmfPkg/MptScsiDxe: Implement the PassThru method Nikita Leshenko
2020-04-30 9:47 ` [edk2-devel] " Laszlo Ersek
2020-05-04 20:08 ` Nikita Leshenko
2020-04-24 17:59 ` [PATCH v5 12/12] OvmfPkg/MptScsiDxe: Reset device on ExitBootServices() Nikita Leshenko
2020-04-30 9:48 ` [edk2-devel] " 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=2666e264-2638-359b-ed59-60d19ecdcd61@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