diff options
author | Jean Delvare <[email protected]> | 2018-02-03 11:25:20 +0100 |
---|---|---|
committer | Jean Delvare <[email protected]> | 2018-02-03 11:25:20 +0100 |
commit | 8cf4e6a04f734e831c2ac7f405071d1cde690ba8 (patch) | |
tree | 6ccfdf2f05682eaf5455bce675f92cb34176fe4d /net/unix/sysctl_net_unix.c | |
parent | d8a5b80568a9cb66810e75b182018e9edb68e8ff (diff) |
firmware: dmi: Optimize dmi_matches
Function dmi_matches can me made a bit faster:
* The documented purpose of dmi_initialized is to catch too early
calls to dmi_check_system(). I'm not fully convinced it justifies
slowing down the initialization of all systems out there, but at
least the check should not have been moved from dmi_check_system()
to dmi_matches(). dmi_matches() is being called for every entry of
the table passed to dmi_check_system(), causing the same redundant
check to be performed again and again. So move it back to
dmi_check_system(), reverting this specific portion of commit
d7b1956fed33 ("DMI: Introduce dmi_first_match to make the interface
more flexible").
* Don't check for the exact_match flag again when we already know its
value.
Signed-off-by: Jean Delvare <[email protected]>
Fixes: d7b1956fed33 ("DMI: Introduce dmi_first_match to make the interface more flexible")
Cc: Jani Nikula <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Jeff Garzik <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions