use less confusing names for iov_iter direction initializers
Bugzilla: https://bugzilla.redhat.com/1971938 Conflicts: limited to the scope of the backport commit de4eda9de2d957ef2d6a8365a01e26a435e958cb Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu Sep 15 20:25:47 2022 -0400 use less confusing names for iov_iter direction initializers READ/WRITE proved to be actively confusing - the meanings are "data destination, as used with read(2)" and "data source, as used with write(2)", but people keep interpreting those as "we read data from it" and "we write data to it", i.e. exactly the wrong way. Call them ITER_DEST and ITER_SOURCE - at least that is harder to misinterpret... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David Arcari <darcari@redhat.com>
This commit is contained in:
parent
8125ccb194
commit
0d33f8e1f3
|
@ -781,7 +781,7 @@ static enum ucode_state request_microcode_fw(int cpu, struct device *device)
|
|||
|
||||
kvec.iov_base = (void *)firmware->data;
|
||||
kvec.iov_len = firmware->size;
|
||||
iov_iter_kvec(&iter, WRITE, &kvec, 1, firmware->size);
|
||||
iov_iter_kvec(&iter, ITER_SOURCE, &kvec, 1, firmware->size);
|
||||
ret = generic_load_microcode(cpu, &iter);
|
||||
|
||||
release_firmware(firmware);
|
||||
|
|
|
@ -28,6 +28,9 @@ enum iter_type {
|
|||
ITER_DISCARD,
|
||||
};
|
||||
|
||||
#define ITER_SOURCE 1 // == WRITE
|
||||
#define ITER_DEST 0 // == READ
|
||||
|
||||
struct iov_iter_state {
|
||||
size_t iov_offset;
|
||||
size_t count;
|
||||
|
|
Loading…
Reference in New Issue