diff options
author | Dean Luick <dean.luick@intel.com> | 2016-04-12 10:49:58 -0700 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-04-28 16:32:27 -0400 |
commit | 4ee1585972c0772a5126d7242a906b18acee7b0f (patch) | |
tree | 7d946426c195d61ba6961d67f1ec16ca95c6b60b /drivers/staging/rdma/hfi1 | |
parent | ea0e4ce3bcccef360e1aa69d17a210d1221ab80c (diff) |
IB/hfi1: Fix sysfs file offset usage
Two sysfs files do not pay attention to the file offset when
reading data. Fix that.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1')
-rw-r--r-- | drivers/staging/rdma/hfi1/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rdma/hfi1/sysfs.c b/drivers/staging/rdma/hfi1/sysfs.c index c7f1271190af..8cd6df8634ad 100644 --- 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; |