Commit 11743a1d authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanup patches from Ingo Molnar:
 "Misc smaller cleanups"

* 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: ptrace.c only needs export.h and not the full module.h
  x86, apb_timer: remove unused variable percpu_timer
  um: don't compare a pointer to 0
  arch/x86/platform/uv: use ARRAY_SIZE where possible
parents 121027a7 19348e74
...@@ -311,7 +311,6 @@ void __init apbt_time_init(void) ...@@ -311,7 +311,6 @@ void __init apbt_time_init(void)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
int i; int i;
struct sfi_timer_table_entry *p_mtmr; struct sfi_timer_table_entry *p_mtmr;
unsigned int percpu_timer;
struct apbt_dev *adev; struct apbt_dev *adev;
#endif #endif
...@@ -346,13 +345,10 @@ void __init apbt_time_init(void) ...@@ -346,13 +345,10 @@ void __init apbt_time_init(void)
return; return;
} }
pr_debug("%s: %d CPUs online\n", __func__, num_online_cpus()); pr_debug("%s: %d CPUs online\n", __func__, num_online_cpus());
if (num_possible_cpus() <= sfi_mtimer_num) { if (num_possible_cpus() <= sfi_mtimer_num)
percpu_timer = 1;
apbt_num_timers_used = num_possible_cpus(); apbt_num_timers_used = num_possible_cpus();
} else { else
percpu_timer = 0;
apbt_num_timers_used = 1; apbt_num_timers_used = 1;
}
pr_debug("%s: %d APB timers used\n", __func__, apbt_num_timers_used); pr_debug("%s: %d APB timers used\n", __func__, apbt_num_timers_used);
/* here we set up per CPU timer data structure */ /* here we set up per CPU timer data structure */
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/perf_event.h> #include <linux/perf_event.h>
#include <linux/hw_breakpoint.h> #include <linux/hw_breakpoint.h>
#include <linux/rcupdate.h> #include <linux/rcupdate.h>
#include <linux/module.h> #include <linux/export.h>
#include <linux/context_tracking.h> #include <linux/context_tracking.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -1467,7 +1467,7 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user, ...@@ -1467,7 +1467,7 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user,
} }
if (input_arg == 0) { if (input_arg == 0) {
elements = sizeof(stat_description)/sizeof(*stat_description); elements = ARRAY_SIZE(stat_description);
printk(KERN_DEBUG "# cpu: cpu number\n"); printk(KERN_DEBUG "# cpu: cpu number\n");
printk(KERN_DEBUG "Sender statistics:\n"); printk(KERN_DEBUG "Sender statistics:\n");
for (i = 0; i < elements; i++) for (i = 0; i < elements; i++)
...@@ -1508,7 +1508,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr, ...@@ -1508,7 +1508,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr,
char *q; char *q;
int cnt = 0; int cnt = 0;
int val; int val;
int e = sizeof(tunables) / sizeof(*tunables); int e = ARRAY_SIZE(tunables);
p = instr + strspn(instr, WHITESPACE); p = instr + strspn(instr, WHITESPACE);
q = p; q = p;
......
...@@ -20,7 +20,7 @@ int arch_fixup(unsigned long address, struct uml_pt_regs *regs) ...@@ -20,7 +20,7 @@ int arch_fixup(unsigned long address, struct uml_pt_regs *regs)
const struct exception_table_entry *fixup; const struct exception_table_entry *fixup;
fixup = search_exception_tables(address); fixup = search_exception_tables(address);
if (fixup != 0) { if (fixup) {
UPT_IP(regs) = fixup->fixup; UPT_IP(regs) = fixup->fixup;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment