public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] x86/microcode: change type to unsigned int in few places
@ 2015-06-04  9:45 Andy Shevchenko
  2015-06-04 10:22 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2015-06-04  9:45 UTC (permalink / raw)
  To: Borislav Petkov, mingo @ kernel . org,
	linux-kernel @ vger . kernel . org
  Cc: Andy Shevchenko

The patch changes a type of variables and function prototypes to be in align
with what x86_*() / __x86_*() functions return.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 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 b843854..ac6d328 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 9243cd8..e8a215a 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 979ca78..8ebc421 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 b4858d8..8187b72 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.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] x86/microcode: change type to unsigned int in few places
  2015-06-04  9:45 [PATCH 1/1] x86/microcode: change type to unsigned int in few places Andy Shevchenko
@ 2015-06-04 10:22 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2015-06-04 10:22 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: mingo, linux-kernel

On Thu, Jun 04, 2015 at 12:45:47PM +0300, Andy Shevchenko wrote:
> The patch changes a type of variables and function prototypes to be in align
> with what x86_*() / __x86_*() functions return.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  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(-)

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-04 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04  9:45 [PATCH 1/1] x86/microcode: change type to unsigned int in few places Andy Shevchenko
2015-06-04 10:22 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox