mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
Move the calls to memcpy_fromio() up into the loop in dmi_scan_machine(), and move the signature checks back down into dmi_decode(). We need to check at 16-byte intervals but keep a 32-byte buffer for an SMBIOS entry, so shift the buffer after each iteration. Merge smbios_present() into dmi_present(), so we look for an SMBIOS signature at the beginning of the given buffer and then for a DMI signature at an offset of 16 bytes. [[email protected]: use proper buf type in dmi_present()] Signed-off-by: Ben Hutchings <[email protected]> Reported-by: Tim McGrath <[email protected]> Tested-by: Tim Mcgrath <[email protected]> Cc: Zhenzhong Duan <[email protected]> Signed-off-by: Artem Savkov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>