projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea0e4ce
)
IB/hfi1: Fix sysfs file offset usage
author
Dean Luick
<
[email protected]
>
Tue, 12 Apr 2016 17:49:58 +0000
(10:49 -0700)
committer
Doug Ledford
<
[email protected]
>
Thu, 28 Apr 2016 20:32:27 +0000
(16:32 -0400)
Two sysfs files do not pay attention to the file offset when
reading data. Fix that.
Reviewed-by: Dennis Dalessandro <
[email protected]
>
Signed-off-by: Dean Luick <
[email protected]
>
Signed-off-by: Jubin John <
[email protected]
>
Signed-off-by: Doug Ledford <
[email protected]
>
drivers/staging/rdma/hfi1/sysfs.c
patch
|
blob
|
history
diff --git
a/drivers/staging/rdma/hfi1/sysfs.c
b/drivers/staging/rdma/hfi1/sysfs.c
index c7f1271190af1c4636e68678c59c94b13c4c3a5c..8cd6df8634ad2c056ba56542a2ec99180e05717b 100644
(file)
--- a/
drivers/staging/rdma/hfi1/sysfs.c
+++ b/
drivers/staging/rdma/hfi1/sysfs.c
@@
-84,7
+84,7
@@
static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj,
rcu_read_unlock();
return -EINVAL;
}
- memcpy(buf,
&cc_state->cct
, count);
+ memcpy(buf,
(void *)&cc_state->cct + pos
, count);
rcu_read_unlock();
return count;
@@
-131,7
+131,7
@@
static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj,
rcu_read_unlock();
return -EINVAL;
}
- memcpy(buf,
&cc_state->cong_setting
, count);
+ memcpy(buf,
(void *)&cc_state->cong_setting + pos
, count);
rcu_read_unlock();
return count;