UefiPayloadPkg: Simplify code logic

A little overdesign about VisitAllPciInstances function, since there are
two call back functions. Simplify the code logic by combining the two call
back functions, and unused parameters.
Change the PROTOCOL_INSTANCE_CALLBACK to SIMPLE_PROTOCOL_INSTANCE_CALLBACK
because the former is also defined in OvmfPkg. Rename it to avoid confusion.

Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Sean Rhodes <sean@starlabs.systems>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
This commit is contained in:
Liu, Zhiguang
2022-05-12 18:54:57 +08:00
committed by mergify[bot]
parent 17702186b5
commit d0efa681b6
2 changed files with 25 additions and 73 deletions

View File

@@ -37,10 +37,9 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *PROTOCOL_INSTANCE_CALLBACK)(
(EFIAPI *SIMPLE_PROTOCOL_INSTANCE_CALLBACK)(
IN EFI_HANDLE Handle,
IN VOID *Instance,
IN VOID *Context
IN VOID *Instance
);
/**