Skip to content

Commit

Permalink
x86, msr: Use seek definitions instead of hard-coded values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabian Frederick authored and H. Peter Anvin committed Oct 17, 2014
1 parent 951a18c commit 03452d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kernel/msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 03452d2

Please sign in to comment.