linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Ingo Molnar <mingo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 20/20] x86/microcode: Correct variables type
Date: Thu,  4 Jun 2015 18:55:28 +0200	[thread overview]
Message-ID: <1433436928-31903-21-git-send-email-bp@alien8.de> (raw)
In-Reply-To: <1433436928-31903-1-git-send-email-bp@alien8.de>

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Change the type of variables and function prototypes to be in alignment
with what the x86_*() / __x86_*() family/model functions return.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <x86@kernel.org>
Link: http://lkml.kernel.org/r/1433411147-22803-1-git-send-email-andriy.shevchenko@linux.intel.com
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/include/asm/microcode_amd.h        | 4 ++--
 arch/x86/kernel/cpu/microcode/amd_early.c   | 5 +++--
 arch/x86/kernel/cpu/microcode/core_early.c  | 3 ++-
 arch/x86/kernel/cpu/microcode/intel_early.c | 4 ++--
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/microcode_amd.h b/arch/x86/include/asm/microcode_amd.h
index b8438543f340..ac6d328977a6 100644
--- a/arch/x86/include/asm/microcode_amd.h
+++ b/arch/x86/include/asm/microcode_amd.h
@@ -65,12 +65,12 @@ extern enum ucode_state load_microcode_amd(int cpu, u8 family, const u8 *data, s
 extern u8 amd_ucode_patch[PATCH_MAX_SIZE];
 
 #ifdef CONFIG_MICROCODE_AMD_EARLY
-extern void __init load_ucode_amd_bsp(int family);
+extern void __init load_ucode_amd_bsp(unsigned int family);
 extern void load_ucode_amd_ap(void);
 extern int __init save_microcode_in_initrd_amd(void);
 void reload_ucode_amd(void);
 #else
-static inline void __init load_ucode_amd_bsp(int family) {}
+static inline void __init load_ucode_amd_bsp(unsigned int family) {}
 static inline void load_ucode_amd_ap(void) {}
 static inline int __init save_microcode_in_initrd_amd(void) { return -EINVAL; }
 void reload_ucode_amd(void) {}
diff --git a/arch/x86/kernel/cpu/microcode/amd_early.c b/arch/x86/kernel/cpu/microcode/amd_early.c
index 9243cd839829..e8a215a9a345 100644
--- a/arch/x86/kernel/cpu/microcode/amd_early.c
+++ b/arch/x86/kernel/cpu/microcode/amd_early.c
@@ -228,7 +228,8 @@ static void apply_ucode_in_initrd(void *ucode, size_t size, bool save_patch)
 	}
 }
 
-static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
+static bool __init load_builtin_amd_microcode(struct cpio_data *cp,
+					      unsigned int family)
 {
 #ifdef CONFIG_X86_64
 	char fw_name[36] = "amd-ucode/microcode_amd.bin";
@@ -243,7 +244,7 @@ static bool __init load_builtin_amd_microcode(struct cpio_data *cp, int family)
 #endif
 }
 
-void __init load_ucode_amd_bsp(int family)
+void __init load_ucode_amd_bsp(unsigned int family)
 {
 	struct cpio_data cp;
 	void **data;
diff --git a/arch/x86/kernel/cpu/microcode/core_early.c b/arch/x86/kernel/cpu/microcode/core_early.c
index 979ca78b1561..8ebc421d6299 100644
--- a/arch/x86/kernel/cpu/microcode/core_early.c
+++ b/arch/x86/kernel/cpu/microcode/core_early.c
@@ -66,7 +66,8 @@ bool get_builtin_firmware(struct cpio_data *cd, const char *name)
 
 void __init load_ucode_bsp(void)
 {
-	int vendor, family;
+	int vendor;
+	unsigned int family;
 
 	if (check_loader_disabled_bsp())
 		return;
diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c
index b4858d892592..8187b7247d1c 100644
--- a/arch/x86/kernel/cpu/microcode/intel_early.c
+++ b/arch/x86/kernel/cpu/microcode/intel_early.c
@@ -524,8 +524,8 @@ EXPORT_SYMBOL_GPL(save_mc_for_early);
 static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
 {
 #ifdef CONFIG_X86_64
-	u32 eax = 0x00000001, ebx, ecx = 0, edx;
-	int family, model, stepping;
+	unsigned int eax = 0x00000001, ebx, ecx = 0, edx;
+	unsigned int family, model, stepping;
 	char name[30];
 
 	native_cpuid(&eax, &ebx, &ecx, &edx);
-- 
2.3.5


  parent reply	other threads:[~2015-06-04 17:00 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 16:55 [PATCH 00/20] tip queue 2015-06-04 Borislav Petkov
2015-06-04 16:55 ` [PATCH 01/20] x86/mm/pat: Untangle pat_init() Borislav Petkov
2015-06-07 17:39   ` [tip:x86/mm] " tip-bot for Borislav Petkov
2015-06-04 16:55 ` [PATCH 02/20] x86/mm/pat: Emulate PAT when it is disabled Borislav Petkov
2015-06-07 17:39   ` [tip:x86/mm] " tip-bot for Borislav Petkov
2015-06-04 16:55 ` [PATCH 03/20] x86/mm/pat: Remove pat_enabled() checks Borislav Petkov
2015-06-07 17:40   ` [tip:x86/mm] " tip-bot for Borislav Petkov
2015-06-04 16:55 ` [PATCH 04/20] x86/mm/pat: Use 7th PAT MSR slot for Write-Through PAT type Borislav Petkov
2015-06-04 16:55 ` [PATCH 05/20] x86/mm/pat: Change reserve_memtype() for Write-Through type Borislav Petkov
2015-06-07 17:40   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 06/20] x86/mm: Teach is_new_memtype_allowed() about " Borislav Petkov
2015-06-07 17:41   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 07/20] x86/mm, asm-generic: Add ioremap_wt() for creating Write-Through mappings Borislav Petkov
2015-06-07 17:41   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 08/20] arch/*/io.h: Add ioremap_wt() to all architectures Borislav Petkov
2015-06-07 17:41   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 09/20] video/fbdev, asm/io.h: Remove ioremap_writethrough() Borislav Petkov
2015-06-07 17:41   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 10/20] x86/mm/pat: Add pgprot_writethrough() Borislav Petkov
2015-06-07 17:42   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 11/20] x86/mm/pat: Extend set_page_memtype() to support Write-Through type Borislav Petkov
2015-06-07 17:42   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 12/20] x86/mm: Add set_memory_wt() for " Borislav Petkov
2015-06-07 17:42   ` [tip:x86/mm] x86/mm/pat: " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 13/20] drivers/block/pmem: Map NVDIMM in Write-Through mode Borislav Petkov
2015-06-07 17:43   ` [tip:x86/mm] " tip-bot for Toshi Kani
2015-06-04 16:55 ` [PATCH 14/20] x86/mce: Add Local MCE definitions Borislav Petkov
2015-06-07 17:43   ` [tip:x86/core] " tip-bot for Ashok Raj
2015-06-04 16:55 ` [PATCH 15/20] x86/mce: Add infrastructure to support Local MCE Borislav Petkov
2015-06-07 17:43   ` [tip:x86/core] " tip-bot for Ashok Raj
2015-06-04 16:55 ` [PATCH 16/20] x86/mce: Handle Local MCE events Borislav Petkov
2015-06-07 17:44   ` [tip:x86/core] " tip-bot for Ashok Raj
2015-06-04 16:55 ` [PATCH 17/20] x86: Kill CONFIG_X86_HT Borislav Petkov
2015-06-07 17:44   ` [tip:x86/core] " tip-bot for Borislav Petkov
2015-06-04 16:55 ` [PATCH 18/20] x86/uapi: Do not export <asm/msr-index.h> as part of the user API headers Borislav Petkov
2015-06-07 17:44   ` [tip:x86/core] " tip-bot for Borislav Petkov
2015-06-04 16:55 ` [PATCH 19/20] x86/microcode: Disable builtin microcode loading on 32-bit for now Borislav Petkov
2015-06-07 17:45   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2015-06-04 16:55 ` Borislav Petkov [this message]
2015-06-07 17:45   ` [tip:x86/microcode] x86/microcode: Correct CPU family related variable types tip-bot for Andy Shevchenko

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=1433436928-31903-21-git-send-email-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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).