Loading drivers/soc/qcom/core_hang_detect.c +5 −6 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #define _WRITE(x, y, z) (((~(_VAL(z))) & y) | _VALUE(x, z)) #define MODULE_NAME "msm_hang_detect" #define MAX_SYSFS_LEN 12 struct hang_detect { phys_addr_t threshold[NR_CPUS]; Loading Loading @@ -108,8 +109,7 @@ static ssize_t show_threshold(struct kobject *kobj, struct attribute *attr, { struct hang_detect *device = to_core_hang_dev(kobj); return snprintf(buf, sizeof(device->threshold_val), "%u\n", device->threshold_val); return snprintf(buf, MAX_SYSFS_LEN, "0x%x\n", device->threshold_val); } static size_t store_threshold(struct kobject *kobj, struct attribute *attr, Loading Loading @@ -147,8 +147,8 @@ static ssize_t show_pmu_event_sel(struct kobject *kobj, struct attribute *attr, { struct hang_detect *hang_device = to_core_hang_dev(kobj); return snprintf(buf, sizeof(hang_device->pmu_event_sel), "%u\n", hang_device->pmu_event_sel); return snprintf(buf, MAX_SYSFS_LEN, "0x%x\n", hang_device->pmu_event_sel); } static size_t store_pmu_event_sel(struct kobject *kobj, struct attribute *attr, Loading Loading @@ -188,8 +188,7 @@ static ssize_t show_enable(struct kobject *kobj, struct attribute *attr, { struct hang_detect *hang_device = to_core_hang_dev(kobj); return snprintf(buf, sizeof(hang_device->enabled), "%u\n", hang_device->enabled); return snprintf(buf, MAX_SYSFS_LEN, "%u\n", hang_device->enabled); } static size_t store_enable(struct kobject *kobj, struct attribute *attr, Loading drivers/soc/qcom/gladiator_hang_detect.c +3 −5 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #define NR_GLA_REG 6 #define MODULE_NAME "gladiator_hang_detect" #define MAX_THRES 0xFFFFFFFF #define MAX_LEN_SYSFS 12 struct hang_detect { phys_addr_t threshold[NR_GLA_REG]; Loading Loading @@ -199,8 +200,7 @@ static inline ssize_t generic_enable_show(struct kobject *kobj, uint32_t reg_value; get_enable(offset, hang_dev, ®_value); return snprintf(buf, sizeof(hang_dev->ACE_enable), "%d\n", reg_value); return snprintf(buf, MAX_LEN_SYSFS, "%u\n", reg_value); } static inline ssize_t generic_threshold_show(struct kobject *kobj, Loading @@ -210,9 +210,7 @@ static inline ssize_t generic_threshold_show(struct kobject *kobj, uint32_t reg_value; get_threshold(offset, hang_dev, ®_value); return snprintf(buf, sizeof(hang_dev->ACE_threshold), "%u\n", reg_value); return snprintf(buf, MAX_LEN_SYSFS, "0x%x\n", reg_value); } static inline size_t generic_threshold_store(struct kobject *kobj, Loading Loading
drivers/soc/qcom/core_hang_detect.c +5 −6 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ #define _WRITE(x, y, z) (((~(_VAL(z))) & y) | _VALUE(x, z)) #define MODULE_NAME "msm_hang_detect" #define MAX_SYSFS_LEN 12 struct hang_detect { phys_addr_t threshold[NR_CPUS]; Loading Loading @@ -108,8 +109,7 @@ static ssize_t show_threshold(struct kobject *kobj, struct attribute *attr, { struct hang_detect *device = to_core_hang_dev(kobj); return snprintf(buf, sizeof(device->threshold_val), "%u\n", device->threshold_val); return snprintf(buf, MAX_SYSFS_LEN, "0x%x\n", device->threshold_val); } static size_t store_threshold(struct kobject *kobj, struct attribute *attr, Loading Loading @@ -147,8 +147,8 @@ static ssize_t show_pmu_event_sel(struct kobject *kobj, struct attribute *attr, { struct hang_detect *hang_device = to_core_hang_dev(kobj); return snprintf(buf, sizeof(hang_device->pmu_event_sel), "%u\n", hang_device->pmu_event_sel); return snprintf(buf, MAX_SYSFS_LEN, "0x%x\n", hang_device->pmu_event_sel); } static size_t store_pmu_event_sel(struct kobject *kobj, struct attribute *attr, Loading Loading @@ -188,8 +188,7 @@ static ssize_t show_enable(struct kobject *kobj, struct attribute *attr, { struct hang_detect *hang_device = to_core_hang_dev(kobj); return snprintf(buf, sizeof(hang_device->enabled), "%u\n", hang_device->enabled); return snprintf(buf, MAX_SYSFS_LEN, "%u\n", hang_device->enabled); } static size_t store_enable(struct kobject *kobj, struct attribute *attr, Loading
drivers/soc/qcom/gladiator_hang_detect.c +3 −5 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #define NR_GLA_REG 6 #define MODULE_NAME "gladiator_hang_detect" #define MAX_THRES 0xFFFFFFFF #define MAX_LEN_SYSFS 12 struct hang_detect { phys_addr_t threshold[NR_GLA_REG]; Loading Loading @@ -199,8 +200,7 @@ static inline ssize_t generic_enable_show(struct kobject *kobj, uint32_t reg_value; get_enable(offset, hang_dev, ®_value); return snprintf(buf, sizeof(hang_dev->ACE_enable), "%d\n", reg_value); return snprintf(buf, MAX_LEN_SYSFS, "%u\n", reg_value); } static inline ssize_t generic_threshold_show(struct kobject *kobj, Loading @@ -210,9 +210,7 @@ static inline ssize_t generic_threshold_show(struct kobject *kobj, uint32_t reg_value; get_threshold(offset, hang_dev, ®_value); return snprintf(buf, sizeof(hang_dev->ACE_threshold), "%u\n", reg_value); return snprintf(buf, MAX_LEN_SYSFS, "0x%x\n", reg_value); } static inline size_t generic_threshold_store(struct kobject *kobj, Loading