/* Calculate the flat array subscript of a (Channel, Device) pair. */
STATIC UINTN FlatDeviceIndex(IN CONST EFI_SATA_CONTROLLER_PRIVATE_DATA *Private, IN UINTN Channel, IN UINTN Device)
/* Calculate the flat array subscript of a (Channel, Device) pair. */
STATIC UINTN FlatDeviceIndex(IN CONST EFI_SATA_CONTROLLER_PRIVATE_DATA *Private, IN UINTN Channel, IN UINTN Device)
{
  ASSERT (Private != NULL);
  ASSERT (Channel < Private->IdeInit.ChannelCount);
  ASSERT (Device < Private->DeviceCount);
  return Channel * Private->DeviceCount + Device;
}