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

* Thomas Gleixner <> wrote:

> The series is also available from git:
> git:// WIP.x86/iopl

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

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



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.
- */
return -ENOSYS;

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