mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 09:34:51 +07:00
Staging: comedi: comedi_fops.c: Fixed coding style issue
Fixed following checkpatch.pl warnings WARNING: Prefer WRITE_ONCE(<FOO>, <BAR>) over ACCESS_ONCE(<FOO>) = <BAR> WARNING: Prefer READ_ONCE(<FOO>) over ACCESS_ONCE(<FOO>) Signed-off-by: Shyam Saini <mayhs11saini@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
277b861349
commit
34d3473263
@ -312,8 +312,8 @@ static void comedi_file_reset(struct file *file)
|
||||
}
|
||||
cfp->last_attached = dev->attached;
|
||||
cfp->last_detach_count = dev->detach_count;
|
||||
ACCESS_ONCE(cfp->read_subdev) = read_s;
|
||||
ACCESS_ONCE(cfp->write_subdev) = write_s;
|
||||
WRITE_ONCE(cfp->read_subdev, read_s);
|
||||
WRITE_ONCE(cfp->write_subdev, write_s);
|
||||
}
|
||||
|
||||
static void comedi_file_check(struct file *file)
|
||||
@ -331,7 +331,7 @@ static struct comedi_subdevice *comedi_file_read_subdevice(struct file *file)
|
||||
struct comedi_file *cfp = file->private_data;
|
||||
|
||||
comedi_file_check(file);
|
||||
return ACCESS_ONCE(cfp->read_subdev);
|
||||
return READ_ONCE(cfp->read_subdev);
|
||||
}
|
||||
|
||||
static struct comedi_subdevice *comedi_file_write_subdevice(struct file *file)
|
||||
@ -339,7 +339,7 @@ static struct comedi_subdevice *comedi_file_write_subdevice(struct file *file)
|
||||
struct comedi_file *cfp = file->private_data;
|
||||
|
||||
comedi_file_check(file);
|
||||
return ACCESS_ONCE(cfp->write_subdev);
|
||||
return READ_ONCE(cfp->write_subdev);
|
||||
}
|
||||
|
||||
static int resize_async_buffer(struct comedi_device *dev,
|
||||
@ -1992,7 +1992,7 @@ static int do_setrsubd_ioctl(struct comedi_device *dev, unsigned long arg,
|
||||
!(s_old->async->cmd.flags & CMDF_WRITE))
|
||||
return -EBUSY;
|
||||
|
||||
ACCESS_ONCE(cfp->read_subdev) = s_new;
|
||||
WRITE_ONCE(cfp->read_subdev, s_new);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2034,7 +2034,7 @@ static int do_setwsubd_ioctl(struct comedi_device *dev, unsigned long arg,
|
||||
(s_old->async->cmd.flags & CMDF_WRITE))
|
||||
return -EBUSY;
|
||||
|
||||
ACCESS_ONCE(cfp->write_subdev) = s_new;
|
||||
WRITE_ONCE(cfp->write_subdev, s_new);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user