lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] x86/iopl: Remove unused local variable, update comments in ksys_ioperm()

* Thomas Gleixner <tglx@linutronix.de> wrote:

> The series is also available from git:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/iopl

Very nice series - I fully agree with this simplification of ioperm
legacies.


On x86-64 defconfig new warning in ioport.c:

arch/x86/kernel/ioport.c:184:18: warning: unused variable ‘regs’ [-Wunused-variable]

This local variable can simply be removed, now that we don't rely on
regs->flags anymore. See the patch below.

I also removed the now stale comment about the Xen PV
quirk/incompatibility.

Thanks,

Ingo

---
arch/x86/kernel/ioport.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
index aad296a23170..78127087b1ed 100644
--- a/arch/x86/kernel/ioport.c
+++ b/arch/x86/kernel/ioport.c
@@ -181,15 +181,10 @@ SYSCALL_DEFINE3(ioperm, unsigned long, from, unsigned long, num, int, turn_on)
SYSCALL_DEFINE1(iopl, unsigned int, level)
{
struct thread_struct *t = &current->thread;
- struct pt_regs *regs = current_pt_regs();
struct tss_struct *tss;
unsigned int tss_base;
unsigned int old;

- /*
- * Careful: the IOPL bits in regs->flags are undefined under Xen PV
- * and changing them has no effect.
- */
if (IS_ENABLED(CONFIG_X86_IOPL_NONE))
return -ENOSYS;

\
 
 \ /
  Last update: 2019-11-07 08:28    [W:0.478 / U:1.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site