/* Returns a pointer to an SMBIOS structure or NULL if none found.  */
static void __iomem* get_subsequent_smbios_entry(void __iomem *smbios_start, void __iomem *smbios_table, void __iomem *curr)
/* Returns a pointer to an SMBIOS structure or NULL if none found.  */
static void __iomem* get_subsequent_smbios_entry(void __iomem *smbios_start, void __iomem *smbios_table, void __iomem *curr)
{
	u8 bail = 0;
	u8 previous_byte = 1;
	void __iomem *p_temp;
	void __iomem *p_max;
	if (!smbios_table || !curr)
		return NULL;
	p_max = smbios_start + readw(smbios_table + ST_LENGTH);
	p_temp = curr;
	p_temp += readb(curr + SMBIOS_GENERIC_LENGTH);
	while ((p_temp < p_max) && !bail) {
		if (!previous_byte && !(readb(p_temp)))
			bail = 1;
		previous_byte = readb(p_temp);
		p_temp++;
	}
	if (p_temp < p_max)
		return p_temp;
	else
		return NULL;
}