[LinuxBIOS] [PATCH] v3: duplicate less code