/* Iterate over all IVHD entries in the ACPI table and find the highest device id which we need to handle. This is the first of three functions which parse the ACPI table. So we check the checksum here.  */
static int __init find_last_devid_acpi(struct acpi_table_header *table)
/* Iterate over all IVHD entries in the ACPI table and find the highest device id which we need to handle. This is the first of three functions which parse the ACPI table. So we check the checksum here.  */
static int __init find_last_devid_acpi(struct acpi_table_header *table)
{
	int i;
	u8 checksum = 0, *p = (u8 *)table, *end = (u8 *)table;
	struct ivhd_header *h;
	for (i = 0; i < table->length; ++i)
		checksum += p[i];
	if (checksum != 0)
		return -ENODEV;
	p += IVRS_HEADER_LENGTH;
	end += table->length;
	while (p < end) {
		h = (struct ivhd_header *)p;
		switch (h->type) {
		case ACPI_IVHD_TYPE:
			find_last_devid_from_ivhd(h);
			break;
		default:
			break;
		}
		p += h->length;
	}
	WARN_ON(p != end);
	return 0;
}