Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1352733
| From | tip-bot for Borislav Petkov <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:x86/microcode] x86/microcode/intel: Merge two consecutive if-statements |
| Date | 2016-03-08 09:20 +0100 |
| Message-ID | <ral23-6Ie-23@gated-at.bofh.it> (permalink) |
| References | <ra0qC-1wR-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 7d0161569a3b66aaa01520002c3e5fd7126d071f
Gitweb: http://git.kernel.org/tip/7d0161569a3b66aaa01520002c3e5fd7126d071f
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 7 Mar 2016 11:10:02 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 8 Mar 2016 09:08:45 +0100
x86/microcode/intel: Merge two consecutive if-statements
Merge the two consecutive "if (ext_table_size)". No functional change.
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1457345404-28884-4-git-send-email-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/microcode/intel_lib.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/intel_lib.c b/arch/x86/kernel/cpu/microcode/intel_lib.c
index 2b2d135..ffb1bbf 100644
--- a/arch/x86/kernel/cpu/microcode/intel_lib.c
+++ b/arch/x86/kernel/cpu/microcode/intel_lib.c
@@ -68,6 +68,9 @@ int microcode_sanity_check(void *mc, int print_err)
}
ext_table_size = total_size - (MC_HEADER_SIZE + data_size);
if (ext_table_size) {
+ u32 ext_table_sum = 0;
+ u32 *ext_tablep;
+
if ((ext_table_size < EXT_HEADER_SIZE)
|| ((ext_table_size - EXT_HEADER_SIZE) % EXT_SIGNATURE_SIZE)) {
if (print_err)
@@ -81,12 +84,9 @@ int microcode_sanity_check(void *mc, int print_err)
return -EFAULT;
}
ext_sigcount = ext_header->count;
- }
- /* check extended table checksum */
- if (ext_table_size) {
- u32 ext_table_sum = 0;
- u32 *ext_tablep = (u32 *)ext_header;
+ /* check extended table checksum */
+ ext_tablep = (u32 *)ext_header;
i = ext_table_size / sizeof(u32);
while (i--)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] x86/microcode/intel: Microcode verification cleanups Borislav Petkov <bp@alien8.de> - 2016-03-07 11:20 +0100
[PATCH 3/5] x86/microcode/intel: Merge two consecutive if-statements Borislav Petkov <bp@alien8.de> - 2016-03-07 11:20 +0100
[tip:x86/microcode] x86/microcode/intel: Merge two consecutive if-statements tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-03-08 09:20 +0100
[PATCH 4/5] x86/microcode/intel: Improve microcode sanity-checking error messages Borislav Petkov <bp@alien8.de> - 2016-03-07 11:20 +0100
[tip:x86/microcode] x86/microcode/intel: Improve microcode sanity-checking error messages tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-03-08 09:20 +0100
[PATCH 2/5] x86/microcode/intel: Get rid of DWSIZE Borislav Petkov <bp@alien8.de> - 2016-03-07 11:20 +0100
[tip:x86/microcode] x86/microcode/intel: Get rid of DWSIZE tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-03-08 09:20 +0100
[PATCH 1/5] x86/microcode/intel: Change checksum variables to u32 Borislav Petkov <bp@alien8.de> - 2016-03-07 11:20 +0100
csiph-web