lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 17 Dec 2019 20:30:58 +0800
From:   Yunfeng Ye <yeyunfeng@...wei.com>
To:     Borislav Petkov <bp@...en8.de>
CC:     <tglx@...utronix.de>, <mingo@...hat.com>, <hpa@...or.com>,
        <x86@...nel.org>, <luto@...nel.org>, <riel@...riel.com>,
        <dave.hansen@...el.com>, <longman@...hat.com>,
        <mtosatti@...hat.com>, <linux-kernel@...r.kernel.org>,
        "hushiyuan@...wei.com" <hushiyuan@...wei.com>,
        "linfeilong@...wei.com" <linfeilong@...wei.com>
Subject: Re: [PATCH] x86/process: remove unused variable in __switch_to_xtra()



On 2019/12/17 20:29, Borislav Petkov wrote:
> On Tue, Dec 17, 2019 at 08:09:08PM +0800, Yunfeng Ye wrote:
>> After the commit ecc7e37d4dad ("x86/io: Speedup schedule out of I/O
>> bitmap user") and commit 22fe5b0439dd ("x86/ioperm: Move TSS bitmap
>> update to exit to user work"), warning is found:
>>
>> arch/x86/kernel/process.c: In function ‘__switch_to_xtra’:
>> arch/x86/kernel/process.c:618:31: warning: variable ‘next’ set but not
>> used [-Wunused-but-set-variable]
>>   struct thread_struct *prev, *next;
>>                                ^~~~
>> arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set but not
>> used [-Wunused-but-set-variable]
>>   struct thread_struct *prev, *next;
>>                         ^~~~
>> Fix this by removing the unused variable @prev and @next;
>>
>> Signed-off-by: Yunfeng Ye <yeyunfeng@...wei.com>
>> ---
>>  arch/x86/kernel/process.c | 4 ----
>>  1 file changed, 4 deletions(-)
>>
>> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
>> index 61e93a318983..839b5244e3b7 100644
>> --- a/arch/x86/kernel/process.c
>> +++ b/arch/x86/kernel/process.c
>> @@ -615,12 +615,8 @@ void speculation_ctrl_update_current(void)
>>
>>  void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)
>>  {
>> -	struct thread_struct *prev, *next;
>>  	unsigned long tifp, tifn;
>>
>> -	prev = &prev_p->thread;
>> -	next = &next_p->thread;
>> -
>>  	tifn = READ_ONCE(task_thread_info(next_p)->flags);
>>  	tifp = READ_ONCE(task_thread_info(prev_p)->flags);
>>
>> -- 
> 
> Let me introduce you to your colleague yu kuai:
> 
ok, thanks.

> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/cleanups&id=27353d5785bca61bb49cfd7c78e14f1d21e66ec5
> 
> :-)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ