lkml.org 
[lkml]   [2008]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Remove unused variable "cpu" from arch/x86/xen/setup.c

* Manish Katiyar <mkatiyar@gmail.com> wrote:

> Remove unused variable "cpu" from arch/x86/xen/setup.c

it's not unused:

> void xen_enable_sysenter(void)
> {
> - int cpu = smp_processor_id();
> extern void xen_sysenter_target(void);
> /* Mask events on entry, even though they get enabled immediately */
> static struct callback_register sysenter = {

if (!boot_cpu_has(X86_FEATURE_SEP) ||
HYPERVISOR_callback_op(CALLBACKOP_register, &sysenter) != 0) {
clear_cpu_cap(&cpu_data(cpu), X86_FEATURE_SEP);
^^^^^^^^^^^^^^
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_SEP);
}

if it generates an unused variable warning on UP then per_cpu() needs to
be fixed to do a (void)(cpu) to indicate use of that variable.

Ingo


\
 
 \ /
  Last update: 2008-05-13 14:11    [W:0.037 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site