Loading drivers/hwtracing/coresight/coresight-etb10.c +1 −1 Original line number Diff line number Diff line Loading @@ -655,7 +655,7 @@ static ssize_t trigger_cntr_show(struct device *dev, struct etb_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->trigger_cntr; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t trigger_cntr_store(struct device *dev, Loading drivers/hwtracing/coresight/coresight-etm-perf.c +1 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,7 @@ int etm_perf_symlink(struct coresight_device *csdev, bool link) struct device *pmu_dev = etm_pmu.dev; struct device *cs_dev = &csdev->dev; sprintf(entry, "cpu%d", cpu); scnprintf(entry, PAGE_SIZE, "cpu%d", cpu); if (!etm_perf_up) return -EPROBE_DEFER; Loading drivers/hwtracing/coresight/coresight-etm3x-sysfs.c +34 −34 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ static ssize_t nr_addr_cmp_show(struct device *dev, struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent); val = drvdata->nr_addr_cmp; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(nr_addr_cmp); Loading @@ -27,7 +27,7 @@ static ssize_t nr_cntr_show(struct device *dev, struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent); val = drvdata->nr_cntr; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(nr_cntr); Loading @@ -38,7 +38,7 @@ static ssize_t nr_ctxid_cmp_show(struct device *dev, struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent); val = drvdata->nr_ctxid_cmp; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(nr_ctxid_cmp); Loading @@ -58,7 +58,7 @@ static ssize_t etmsr_show(struct device *dev, spin_unlock_irqrestore(&drvdata->spinlock, flags); pm_runtime_put(drvdata->dev); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(etmsr); Loading Loading @@ -100,7 +100,7 @@ static ssize_t mode_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->mode; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t mode_store(struct device *dev, Loading Loading @@ -185,7 +185,7 @@ static ssize_t trigger_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->trigger_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t trigger_event_store(struct device *dev, Loading Loading @@ -215,7 +215,7 @@ static ssize_t enable_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->enable_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t enable_event_store(struct device *dev, Loading Loading @@ -245,7 +245,7 @@ static ssize_t fifofull_level_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->fifofull_level; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t fifofull_level_store(struct device *dev, Loading Loading @@ -275,7 +275,7 @@ static ssize_t addr_idx_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->addr_idx; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_idx_store(struct device *dev, Loading Loading @@ -325,7 +325,7 @@ static ssize_t addr_single_show(struct device *dev, val = config->addr_val[idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_single_store(struct device *dev, Loading Loading @@ -384,7 +384,7 @@ static ssize_t addr_range_show(struct device *dev, val2 = config->addr_val[idx + 1]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx %#lx\n", val1, val2); return scnprintf(buf, PAGE_SIZE, "%#lx %#lx\n", val1, val2); } static ssize_t addr_range_store(struct device *dev, Loading Loading @@ -446,7 +446,7 @@ static ssize_t addr_start_show(struct device *dev, val = config->addr_val[idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_start_store(struct device *dev, Loading Loading @@ -500,7 +500,7 @@ static ssize_t addr_stop_show(struct device *dev, val = config->addr_val[idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_stop_store(struct device *dev, Loading Loading @@ -546,7 +546,7 @@ static ssize_t addr_acctype_show(struct device *dev, val = config->addr_acctype[config->addr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_acctype_store(struct device *dev, Loading Loading @@ -578,7 +578,7 @@ static ssize_t cntr_idx_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->cntr_idx; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_idx_store(struct device *dev, Loading Loading @@ -619,7 +619,7 @@ static ssize_t cntr_rld_val_show(struct device *dev, val = config->cntr_rld_val[config->cntr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_rld_val_store(struct device *dev, Loading Loading @@ -654,7 +654,7 @@ static ssize_t cntr_event_show(struct device *dev, val = config->cntr_event[config->cntr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_event_store(struct device *dev, Loading Loading @@ -689,7 +689,7 @@ static ssize_t cntr_rld_event_show(struct device *dev, val = config->cntr_rld_event[config->cntr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_rld_event_store(struct device *dev, Loading Loading @@ -724,7 +724,7 @@ static ssize_t cntr_val_show(struct device *dev, if (!local_read(&drvdata->mode)) { spin_lock(&drvdata->spinlock); for (i = 0; i < drvdata->nr_cntr; i++) ret += sprintf(buf, "counter %d: %x\n", ret += scnprintf(buf, PAGE_SIZE, "counter %d: %x\n", i, config->cntr_val[i]); spin_unlock(&drvdata->spinlock); return ret; Loading @@ -732,7 +732,7 @@ static ssize_t cntr_val_show(struct device *dev, for (i = 0; i < drvdata->nr_cntr; i++) { val = etm_readl(drvdata, ETMCNTVRn(i)); ret += sprintf(buf, "counter %d: %x\n", i, val); ret += scnprintf(buf, PAGE_SIZE, "counter %d: %x\n", i, val); } return ret; Loading Loading @@ -767,7 +767,7 @@ static ssize_t seq_12_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_12_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_12_event_store(struct device *dev, Loading Loading @@ -796,7 +796,7 @@ static ssize_t seq_21_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_21_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_21_event_store(struct device *dev, Loading Loading @@ -825,7 +825,7 @@ static ssize_t seq_23_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_23_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_23_event_store(struct device *dev, Loading Loading @@ -854,7 +854,7 @@ static ssize_t seq_31_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_31_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_31_event_store(struct device *dev, Loading Loading @@ -883,7 +883,7 @@ static ssize_t seq_32_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_32_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_32_event_store(struct device *dev, Loading Loading @@ -912,7 +912,7 @@ static ssize_t seq_13_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_13_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_13_event_store(struct device *dev, Loading Loading @@ -955,7 +955,7 @@ static ssize_t seq_curr_state_show(struct device *dev, spin_unlock_irqrestore(&drvdata->spinlock, flags); pm_runtime_put(drvdata->dev); out: return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_curr_state_store(struct device *dev, Loading Loading @@ -988,7 +988,7 @@ static ssize_t ctxid_idx_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->ctxid_idx; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t ctxid_idx_store(struct device *dev, Loading Loading @@ -1037,7 +1037,7 @@ static ssize_t ctxid_pid_show(struct device *dev, val = config->ctxid_pid[config->ctxid_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t ctxid_pid_store(struct device *dev, Loading Loading @@ -1088,7 +1088,7 @@ static ssize_t ctxid_mask_show(struct device *dev, return -EINVAL; val = config->ctxid_mask; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t ctxid_mask_store(struct device *dev, Loading Loading @@ -1124,7 +1124,7 @@ static ssize_t sync_freq_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->sync_freq; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t sync_freq_store(struct device *dev, Loading Loading @@ -1153,7 +1153,7 @@ static ssize_t timestamp_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->timestamp_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t timestamp_event_store(struct device *dev, Loading Loading @@ -1194,7 +1194,7 @@ static ssize_t traceid_show(struct device *dev, val = etm_get_trace_id(drvdata); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t traceid_store(struct device *dev, Loading drivers/hwtracing/coresight/coresight-funnel.c +2 −2 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ static ssize_t priority_show(struct device *dev, struct funnel_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->priority; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t priority_store(struct device *dev, Loading Loading @@ -192,7 +192,7 @@ static ssize_t funnel_ctrl_show(struct device *dev, pm_runtime_put(drvdata->dev); return sprintf(buf, "%#x\n", val); return scnprintf(buf, PAGE_SIZE, "%#x\n", val); } static DEVICE_ATTR_RO(funnel_ctrl); Loading drivers/hwtracing/coresight/coresight-tmc.c +2 −2 Original line number Diff line number Diff line Loading @@ -376,7 +376,7 @@ static ssize_t trigger_cntr_show(struct device *dev, struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->trigger_cntr; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t trigger_cntr_store(struct device *dev, Loading @@ -401,7 +401,7 @@ static ssize_t buffer_size_show(struct device *dev, { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); return sprintf(buf, "%#x\n", drvdata->size); return scnprintf(buf, PAGE_SIZE, "%#x\n", drvdata->size); } static ssize_t buffer_size_store(struct device *dev, Loading Loading
drivers/hwtracing/coresight/coresight-etb10.c +1 −1 Original line number Diff line number Diff line Loading @@ -655,7 +655,7 @@ static ssize_t trigger_cntr_show(struct device *dev, struct etb_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->trigger_cntr; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t trigger_cntr_store(struct device *dev, Loading
drivers/hwtracing/coresight/coresight-etm-perf.c +1 −1 Original line number Diff line number Diff line Loading @@ -492,7 +492,7 @@ int etm_perf_symlink(struct coresight_device *csdev, bool link) struct device *pmu_dev = etm_pmu.dev; struct device *cs_dev = &csdev->dev; sprintf(entry, "cpu%d", cpu); scnprintf(entry, PAGE_SIZE, "cpu%d", cpu); if (!etm_perf_up) return -EPROBE_DEFER; Loading
drivers/hwtracing/coresight/coresight-etm3x-sysfs.c +34 −34 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ static ssize_t nr_addr_cmp_show(struct device *dev, struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent); val = drvdata->nr_addr_cmp; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(nr_addr_cmp); Loading @@ -27,7 +27,7 @@ static ssize_t nr_cntr_show(struct device *dev, struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent); val = drvdata->nr_cntr; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(nr_cntr); Loading @@ -38,7 +38,7 @@ static ssize_t nr_ctxid_cmp_show(struct device *dev, struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent); val = drvdata->nr_ctxid_cmp; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(nr_ctxid_cmp); Loading @@ -58,7 +58,7 @@ static ssize_t etmsr_show(struct device *dev, spin_unlock_irqrestore(&drvdata->spinlock, flags); pm_runtime_put(drvdata->dev); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static DEVICE_ATTR_RO(etmsr); Loading Loading @@ -100,7 +100,7 @@ static ssize_t mode_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->mode; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t mode_store(struct device *dev, Loading Loading @@ -185,7 +185,7 @@ static ssize_t trigger_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->trigger_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t trigger_event_store(struct device *dev, Loading Loading @@ -215,7 +215,7 @@ static ssize_t enable_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->enable_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t enable_event_store(struct device *dev, Loading Loading @@ -245,7 +245,7 @@ static ssize_t fifofull_level_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->fifofull_level; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t fifofull_level_store(struct device *dev, Loading Loading @@ -275,7 +275,7 @@ static ssize_t addr_idx_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->addr_idx; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_idx_store(struct device *dev, Loading Loading @@ -325,7 +325,7 @@ static ssize_t addr_single_show(struct device *dev, val = config->addr_val[idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_single_store(struct device *dev, Loading Loading @@ -384,7 +384,7 @@ static ssize_t addr_range_show(struct device *dev, val2 = config->addr_val[idx + 1]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx %#lx\n", val1, val2); return scnprintf(buf, PAGE_SIZE, "%#lx %#lx\n", val1, val2); } static ssize_t addr_range_store(struct device *dev, Loading Loading @@ -446,7 +446,7 @@ static ssize_t addr_start_show(struct device *dev, val = config->addr_val[idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_start_store(struct device *dev, Loading Loading @@ -500,7 +500,7 @@ static ssize_t addr_stop_show(struct device *dev, val = config->addr_val[idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_stop_store(struct device *dev, Loading Loading @@ -546,7 +546,7 @@ static ssize_t addr_acctype_show(struct device *dev, val = config->addr_acctype[config->addr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t addr_acctype_store(struct device *dev, Loading Loading @@ -578,7 +578,7 @@ static ssize_t cntr_idx_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->cntr_idx; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_idx_store(struct device *dev, Loading Loading @@ -619,7 +619,7 @@ static ssize_t cntr_rld_val_show(struct device *dev, val = config->cntr_rld_val[config->cntr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_rld_val_store(struct device *dev, Loading Loading @@ -654,7 +654,7 @@ static ssize_t cntr_event_show(struct device *dev, val = config->cntr_event[config->cntr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_event_store(struct device *dev, Loading Loading @@ -689,7 +689,7 @@ static ssize_t cntr_rld_event_show(struct device *dev, val = config->cntr_rld_event[config->cntr_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t cntr_rld_event_store(struct device *dev, Loading Loading @@ -724,7 +724,7 @@ static ssize_t cntr_val_show(struct device *dev, if (!local_read(&drvdata->mode)) { spin_lock(&drvdata->spinlock); for (i = 0; i < drvdata->nr_cntr; i++) ret += sprintf(buf, "counter %d: %x\n", ret += scnprintf(buf, PAGE_SIZE, "counter %d: %x\n", i, config->cntr_val[i]); spin_unlock(&drvdata->spinlock); return ret; Loading @@ -732,7 +732,7 @@ static ssize_t cntr_val_show(struct device *dev, for (i = 0; i < drvdata->nr_cntr; i++) { val = etm_readl(drvdata, ETMCNTVRn(i)); ret += sprintf(buf, "counter %d: %x\n", i, val); ret += scnprintf(buf, PAGE_SIZE, "counter %d: %x\n", i, val); } return ret; Loading Loading @@ -767,7 +767,7 @@ static ssize_t seq_12_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_12_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_12_event_store(struct device *dev, Loading Loading @@ -796,7 +796,7 @@ static ssize_t seq_21_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_21_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_21_event_store(struct device *dev, Loading Loading @@ -825,7 +825,7 @@ static ssize_t seq_23_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_23_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_23_event_store(struct device *dev, Loading Loading @@ -854,7 +854,7 @@ static ssize_t seq_31_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_31_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_31_event_store(struct device *dev, Loading Loading @@ -883,7 +883,7 @@ static ssize_t seq_32_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_32_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_32_event_store(struct device *dev, Loading Loading @@ -912,7 +912,7 @@ static ssize_t seq_13_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->seq_13_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_13_event_store(struct device *dev, Loading Loading @@ -955,7 +955,7 @@ static ssize_t seq_curr_state_show(struct device *dev, spin_unlock_irqrestore(&drvdata->spinlock, flags); pm_runtime_put(drvdata->dev); out: return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t seq_curr_state_store(struct device *dev, Loading Loading @@ -988,7 +988,7 @@ static ssize_t ctxid_idx_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->ctxid_idx; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t ctxid_idx_store(struct device *dev, Loading Loading @@ -1037,7 +1037,7 @@ static ssize_t ctxid_pid_show(struct device *dev, val = config->ctxid_pid[config->ctxid_idx]; spin_unlock(&drvdata->spinlock); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t ctxid_pid_store(struct device *dev, Loading Loading @@ -1088,7 +1088,7 @@ static ssize_t ctxid_mask_show(struct device *dev, return -EINVAL; val = config->ctxid_mask; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t ctxid_mask_store(struct device *dev, Loading Loading @@ -1124,7 +1124,7 @@ static ssize_t sync_freq_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->sync_freq; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t sync_freq_store(struct device *dev, Loading Loading @@ -1153,7 +1153,7 @@ static ssize_t timestamp_event_show(struct device *dev, struct etm_config *config = &drvdata->config; val = config->timestamp_event; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t timestamp_event_store(struct device *dev, Loading Loading @@ -1194,7 +1194,7 @@ static ssize_t traceid_show(struct device *dev, val = etm_get_trace_id(drvdata); return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t traceid_store(struct device *dev, Loading
drivers/hwtracing/coresight/coresight-funnel.c +2 −2 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ static ssize_t priority_show(struct device *dev, struct funnel_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->priority; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t priority_store(struct device *dev, Loading Loading @@ -192,7 +192,7 @@ static ssize_t funnel_ctrl_show(struct device *dev, pm_runtime_put(drvdata->dev); return sprintf(buf, "%#x\n", val); return scnprintf(buf, PAGE_SIZE, "%#x\n", val); } static DEVICE_ATTR_RO(funnel_ctrl); Loading
drivers/hwtracing/coresight/coresight-tmc.c +2 −2 Original line number Diff line number Diff line Loading @@ -376,7 +376,7 @@ static ssize_t trigger_cntr_show(struct device *dev, struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); unsigned long val = drvdata->trigger_cntr; return sprintf(buf, "%#lx\n", val); return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); } static ssize_t trigger_cntr_store(struct device *dev, Loading @@ -401,7 +401,7 @@ static ssize_t buffer_size_show(struct device *dev, { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); return sprintf(buf, "%#x\n", drvdata->size); return scnprintf(buf, PAGE_SIZE, "%#x\n", drvdata->size); } static ssize_t buffer_size_store(struct device *dev, Loading