OSDN Git Service

x86, msr: Use seek definitions instead of hard-coded values
authorFabian Frederick <fabf@skynet.be>
Fri, 17 Oct 2014 20:01:59 +0000 (22:01 +0200)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 17 Oct 2014 20:40:55 +0000 (13:40 -0700)
Replace 0/1 by SEEK_SET/SEEK_CUR.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Link: http://lkml.kernel.org/r/1413576120-27147-1-git-send-email-fabf@skynet.be
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/msr.c

index 826c8b0..113e707 100644 (file)
@@ -52,11 +52,11 @@ static loff_t msr_seek(struct file *file, loff_t offset, int orig)
 
        mutex_lock(&inode->i_mutex);
        switch (orig) {
-       case 0:
+       case SEEK_SET:
                file->f_pos = offset;
                ret = file->f_pos;
                break;
-       case 1:
+       case SEEK_CUR:
                file->f_pos += offset;
                ret = file->f_pos;
                break;