linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, bp@suse.de, linux-kernel@vger.kernel.org,
	mingo@kernel.org, tglx@linutronix.de
Subject: [tip:x86/microcode] x86/microcode/intel: Get rid of DWSIZE
Date: Tue, 8 Mar 2016 00:12:59 -0800	[thread overview]
Message-ID: <tip-c0414622177ae4739a49ca7dad4306a681e2878b@git.kernel.org> (raw)
In-Reply-To: <1457345404-28884-3-git-send-email-bp@alien8.de>

Commit-ID:  c0414622177ae4739a49ca7dad4306a681e2878b
Gitweb:     http://git.kernel.org/tip/c0414622177ae4739a49ca7dad4306a681e2878b
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 7 Mar 2016 11:10:01 +0100
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 8 Mar 2016 09:08:44 +0100

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>
---
 arch/x86/include/asm/microcode_intel.h    | 1 -
 arch/x86/kernel/cpu/microcode/intel_lib.c | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h
index 8559b01..603417f 100644
--- a/arch/x86/include/asm/microcode_intel.h
+++ b/arch/x86/include/asm/microcode_intel.h
@@ -40,7 +40,6 @@ struct extended_sigtable {
 #define DEFAULT_UCODE_TOTALSIZE (DEFAULT_UCODE_DATASIZE + MC_HEADER_SIZE)
 #define EXT_HEADER_SIZE		(sizeof(struct extended_sigtable))
 #define EXT_SIGNATURE_SIZE	(sizeof(struct extended_signature))
-#define DWSIZE			(sizeof(u32))
 
 #define get_totalsize(mc) \
 	(((struct microcode_intel *)mc)->hdr.datasize ? \
diff --git a/arch/x86/kernel/cpu/microcode/intel_lib.c b/arch/x86/kernel/cpu/microcode/intel_lib.c
index 99ca2c9..2b2d135 100644
--- a/arch/x86/kernel/cpu/microcode/intel_lib.c
+++ b/arch/x86/kernel/cpu/microcode/intel_lib.c
@@ -88,7 +88,7 @@ int microcode_sanity_check(void *mc, int print_err)
 		u32 ext_table_sum = 0;
 		u32 *ext_tablep = (u32 *)ext_header;
 
-		i = ext_table_size / DWSIZE;
+		i = ext_table_size / sizeof(u32);
 		while (i--)
 			ext_table_sum += ext_tablep[i];
 		if (ext_table_sum) {
@@ -100,7 +100,7 @@ int microcode_sanity_check(void *mc, int print_err)
 
 	/* calculate the checksum */
 	orig_sum = 0;
-	i = (MC_HEADER_SIZE + data_size) / DWSIZE;
+	i = (MC_HEADER_SIZE + data_size) / sizeof(u32);
 	while (i--)
 		orig_sum += ((u32 *)mc)[i];
 	if (orig_sum) {

  reply	other threads:[~2016-03-08  8:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 10:09 [PATCH 0/5] x86/microcode/intel: Microcode verification cleanups Borislav Petkov
2016-03-07 10:10 ` [PATCH 1/5] x86/microcode/intel: Change checksum variables to u32 Borislav Petkov
2016-03-07 10:10 ` [PATCH 2/5] x86/microcode/intel: Get rid of DWSIZE Borislav Petkov
2016-03-08  8:12   ` tip-bot for Borislav Petkov [this message]
2016-03-07 10:10 ` [PATCH 3/5] x86/microcode/intel: Merge two consecutive if-statements Borislav Petkov
2016-03-08  8:13   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-03-07 10:10 ` [PATCH 4/5] x86/microcode/intel: Improve microcode sanity-checking error messages Borislav Petkov
2016-03-08  8:13   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-03-07 10:10 ` [PATCH 5/5] x86/microcode/intel: Drop orig_sum from ext signature checksum Borislav Petkov
2016-03-08  8:14   ` [tip:x86/microcode] " tip-bot for Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c0414622177ae4739a49ca7dad4306a681e2878b@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).