Skip to content

Commit 308319e

Browse files
committed
Merge tag 'x86_cleanups_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Borislav Petkov: "The mandatory set of random minor cleanups all over tip" * tag 'x86_cleanups_for_v5.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/events/amd/iommu: Remove redundant assignment to variable shift x86/boot/string: Add missing function prototypes x86/fpu: Remove duplicate copy_fpstate_to_sigframe() prototype x86/uaccess: Move variable into switch case statement
2 parents 2e97a0c + 0be4838 commit 308319e

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

arch/x86/boot/string.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
#undef memcmp
99

1010
void *memcpy(void *dst, const void *src, size_t len);
11+
void *memmove(void *dst, const void *src, size_t len);
1112
void *memset(void *dst, int c, size_t len);
1213
int memcmp(const void *s1, const void *s2, size_t len);
14+
int bcmp(const void *s1, const void *s2, size_t len);
1315

1416
/* Access builtin version by default. */
1517
#define memcpy(d,s,l) __builtin_memcpy(d,s,l)
@@ -25,6 +27,7 @@ extern size_t strnlen(const char *s, size_t maxlen);
2527
extern unsigned int atou(const char *s);
2628
extern unsigned long long simple_strtoull(const char *cp, char **endp,
2729
unsigned int base);
30+
long simple_strtol(const char *cp, char **endp, unsigned int base);
2831

2932
int kstrtoull(const char *s, unsigned int base, unsigned long long *res);
3033
int boot_kstrtoul(const char *s, unsigned int base, unsigned long *res);

arch/x86/events/amd/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int get_next_avail_iommu_bnk_cntr(struct perf_event *event)
161161

162162
raw_spin_lock_irqsave(&piommu->lock, flags);
163163

164-
for (bank = 0, shift = 0; bank < max_banks; bank++) {
164+
for (bank = 0; bank < max_banks; bank++) {
165165
for (cntr = 0; cntr < max_cntrs; cntr++) {
166166
shift = bank + (bank*3) + cntr;
167167
if (piommu->cntr_assign_mask & BIT_ULL(shift)) {

arch/x86/include/asm/fpu/signal.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,4 @@ extern void fpu__clear_user_states(struct fpu *fpu);
4141
extern bool fpu__restore_sig(void __user *buf, int ia32_frame);
4242

4343
extern void restore_fpregs_from_fpstate(struct fpstate *fpstate, u64 mask);
44-
45-
extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size);
46-
4744
#endif /* _ASM_X86_FPU_SIGNAL_H */

arch/x86/include/asm/uaccess.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,12 @@ do { \
314314
do { \
315315
__chk_user_ptr(ptr); \
316316
switch (size) { \
317-
unsigned char x_u8__; \
318-
case 1: \
317+
case 1: { \
318+
unsigned char x_u8__; \
319319
__get_user_asm(x_u8__, ptr, "b", "=q", label); \
320320
(x) = x_u8__; \
321321
break; \
322+
} \
322323
case 2: \
323324
__get_user_asm(x, ptr, "w", "=r", label); \
324325
break; \

0 commit comments

Comments
 (0)