/* Get form-set private instance by the given HII handle. */
REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE* GetFormsetPrivateByHiiHandle(IN EFI_HII_HANDLE HiiHandle, IN LIST_ENTRY *FormsetList)
/* Get form-set private instance by the given HII handle. */
REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE* GetFormsetPrivateByHiiHandle(IN EFI_HII_HANDLE HiiHandle, IN LIST_ENTRY *FormsetList)
{
  LIST_ENTRY                                *HiiFormsetLink;
  LIST_ENTRY                                *HiiFormsetNextLink;
  REDFISH_PLATFORM_CONFIG_FORM_SET_PRIVATE  *HiiFormsetPrivate;
  if ((HiiHandle == NULL) || (FormsetList == NULL)) {
    return NULL;
  }
  if (IsListEmpty (FormsetList)) {
    return NULL;
  }
  HiiFormsetLink = GetFirstNode (FormsetList);
  while (!IsNull (FormsetList, HiiFormsetLink)) {
    HiiFormsetNextLink = GetNextNode (FormsetList, HiiFormsetLink);
    HiiFormsetPrivate  = REDFISH_PLATFORM_CONFIG_FORMSET_FROM_LINK (HiiFormsetLink);
    if (HiiFormsetPrivate->HiiHandle == HiiHandle) {
      return HiiFormsetPrivate;
    }
    HiiFormsetLink = HiiFormsetNextLink;
  }
  return NULL;
}