mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 04:03:58 +08:00
x86, msr: Use seek definitions instead of hard-coded values
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>
This commit is contained in:
parent
951a18c6fe
commit
03452d27c6
@ -52,11 +52,11 @@ static loff_t msr_seek(struct file *file, loff_t offset, int orig)
|
|||||||
|
|
||||||
mutex_lock(&inode->i_mutex);
|
mutex_lock(&inode->i_mutex);
|
||||||
switch (orig) {
|
switch (orig) {
|
||||||
case 0:
|
case SEEK_SET:
|
||||||
file->f_pos = offset;
|
file->f_pos = offset;
|
||||||
ret = file->f_pos;
|
ret = file->f_pos;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case SEEK_CUR:
|
||||||
file->f_pos += offset;
|
file->f_pos += offset;
|
||||||
ret = file->f_pos;
|
ret = file->f_pos;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user