Le Thursday 16 April 2015 Ã 16:46 +0800, Zhenzhong Duan a Ãcrit :
On 2015/4/16 15:09, Jean Delvare wrote:Why do you think this is "faulty"? The value in dmi_ver is correct
Le Thursday 16 April 2015 Ã 14:22 +0800, Zhenzhong Duan a Ãcrit :Same as above, future commit may not realize you bring this faulty when
The basic idea is right, but you ignore the case dmi_walk_early mayWhat is the value of this? dmi_ver will never be accessed after this
fail, though looks impossible when bootup.
Better to add below for robust.
@@ -521,6 +521,6 @@ static int __init dmi_present(const u8 *
return 0;
}
}
+ dmi_ver = 0;
return 1;
}
point anyway, as far as I can see.
they want to use dmi_ver.
whether dmi_walk_early() succeeded or not. There's no rationale for
resetting dmi_ver on error and not dmi_num, dmi_len and dmi_base. Note
that dmi_smbios3_present() doesn't reset any of these either. These
values are all correct.
If other modules need to check whether DMI was successfully initialized,
they must check dmi_available rather than any of the variables above
(which are all static anyway.)