[PATCH] x86/amd: Fix warnings in hw_breakpoint.c

From: shijie001
Date: Tue Jul 11 2023 - 04:02:00 EST


The following checkpatch warnings are removed:
WARNING: Use #include <linux/processor.h> instead of <asm/processor.h>
WARNING: Use #include <linux/user.h> instead of <asm/user.h>
WARNING: Prefer 'unsigned int *' to bare use of 'unsigned *'
WARNING: Prefer 'unsigned int *' to bare use of 'unsigned *'

Signed-off-by: Jie Shi <shijie001@xxxxxxxxxx>
---
arch/x86/kernel/hw_breakpoint.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/hw_breakpoint.c b/arch/x86/kernel/hw_breakpoint.c
index b01644c949b2..2a6b5427575e 100644
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -29,9 +29,9 @@
#include <linux/smp.h>

#include <asm/hw_breakpoint.h>
-#include <asm/processor.h>
+#include <linux/processor.h>
#include <asm/debugreg.h>
-#include <asm/user.h>
+#include <linux/user.h>
#include <asm/desc.h>
#include <asm/tlbflush.h>

@@ -74,7 +74,7 @@ unsigned long encode_dr7(int drnum, unsigned int len, unsigned int type)
* Decode the length and type bits for a particular breakpoint as
* stored in debug register 7. Return the "enabled" status.
*/
-int decode_dr7(unsigned long dr7, int bpnum, unsigned *len, unsigned *type)
+int decode_dr7(unsigned long dr7, int bpnum, unsigned int *len, unsigned int *type)
{
int bp_info = dr7 >> (DR_CONTROL_SHIFT + bpnum * DR_CONTROL_SIZE);