Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/core/ib_sysfs.c
| Show First 20 Lines • Show All 868 Lines • ▼ Show 20 Lines | |||||
| static ssize_t set_stats_lifespan(struct kobject *kobj, | static ssize_t set_stats_lifespan(struct kobject *kobj, | ||||
| struct attribute *attr, | struct attribute *attr, | ||||
| const char *buf, size_t count) | const char *buf, size_t count) | ||||
| { | { | ||||
| struct hw_stats_attribute *hsa; | struct hw_stats_attribute *hsa; | ||||
| struct rdma_hw_stats *stats; | struct rdma_hw_stats *stats; | ||||
| int msecs; | int msecs; | ||||
| int jiffies; | unsigned long jiffies; | ||||
| int ret; | int ret; | ||||
| ret = kstrtoint(buf, 10, &msecs); | ret = kstrtoint(buf, 10, &msecs); | ||||
| if (ret) | if (ret) | ||||
| return ret; | return ret; | ||||
| if (msecs < 0 || msecs > 10000) | if (msecs < 0 || msecs > 10000) | ||||
| return -EINVAL; | return -EINVAL; | ||||
| jiffies = msecs_to_jiffies(msecs); | jiffies = msecs_to_jiffies(msecs); | ||||
| ▲ Show 20 Lines • Show All 551 Lines • Show Last 20 Lines | |||||