mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 10:19:47 +00:00
x86/microcode/intel: Get rid of DWSIZE
sizeof(u32) is perfectly clear as it is. Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/1457345404-28884-3-git-send-email-bp@alien8.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
bc864af13f
commit
c041462217
2 changed files with 2 additions and 3 deletions
|
@ -40,7 +40,6 @@ struct extended_sigtable {
|
||||||
#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
|
#define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
|
||||||
#define EXT_HEADER_SIZE (sizeof(struct extended_sigtable))
|
#define EXT_HEADER_SIZE (sizeof(struct extended_sigtable))
|
||||||
#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature))
|
#define EXT_SIGNATURE_SIZE (sizeof(struct extended_signature))
|
||||||
#define DWSIZE (sizeof(u32))
|
|
||||||
|
|
||||||
#define get_totalsize(mc) \
|
#define get_totalsize(mc) \
|
||||||
(((struct microcode_intel *)mc)->hdr.datasize ? \
|
(((struct microcode_intel *)mc)->hdr.datasize ? \
|
||||||
|
|
|
@ -88,7 +88,7 @@ int microcode_sanity_check(void *mc, int print_err)
|
||||||
u32 ext_table_sum = 0;
|
u32 ext_table_sum = 0;
|
||||||
u32 *ext_tablep = (u32 *)ext_header;
|
u32 *ext_tablep = (u32 *)ext_header;
|
||||||
|
|
||||||
i = ext_table_size / DWSIZE;
|
i = ext_table_size / sizeof(u32);
|
||||||
while (i--)
|
while (i--)
|
||||||
ext_table_sum += ext_tablep[i];
|
ext_table_sum += ext_tablep[i];
|
||||||
if (ext_table_sum) {
|
if (ext_table_sum) {
|
||||||
|
@ -100,7 +100,7 @@ int microcode_sanity_check(void *mc, int print_err)
|
||||||
|
|
||||||
/* calculate the checksum */
|
/* calculate the checksum */
|
||||||
orig_sum = 0;
|
orig_sum = 0;
|
||||||
i = (MC_HEADER_SIZE + data_size) / DWSIZE;
|
i = (MC_HEADER_SIZE + data_size) / sizeof(u32);
|
||||||
while (i--)
|
while (i--)
|
||||||
orig_sum += ((u32 *)mc)[i];
|
orig_sum += ((u32 *)mc)[i];
|
||||||
if (orig_sum) {
|
if (orig_sum) {
|
||||||
|
|
Loading…
Reference in a new issue