Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 177466fc authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "PM / devfreq: bw_hwmon: remove unused variable"

parents 756620e2 1f8896a3
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -409,7 +409,6 @@ static unsigned long get_bw_and_set_irq(struct hwmon_node *node,
		hw->up_wake_mbps = (max(MIN_MBPS, req_mbps)
					* (100 + node->up_thres)) / 100;
		hw->down_wake_mbps = 0;
		hw->undo_over_req_mbps = 0;
		thres = mbps_to_bytes(max(MIN_MBPS, req_mbps / 2),
					node->sample_ms);
	} else {
@@ -422,10 +421,6 @@ static unsigned long get_bw_and_set_irq(struct hwmon_node *node,
		 */
		hw->up_wake_mbps = (req_mbps * (100 + node->up_thres)) / 100;
		hw->down_wake_mbps = (meas_mbps * node->down_thres) / 100;
		if (node->wake == UP_WAKE)
			hw->undo_over_req_mbps = min(req_mbps, meas_mbps_zone);
		else
			hw->undo_over_req_mbps = 0;
		thres = mbps_to_bytes(meas_mbps, node->sample_ms);
	}

@@ -462,6 +457,14 @@ static unsigned long get_bw_and_set_irq(struct hwmon_node *node,
				*freq,
				hw->up_wake_mbps,
				hw->down_wake_mbps);

	trace_bw_hwmon_debug(dev_name(node->hw->df->dev.parent),
				req_mbps,
				meas_mbps_zone,
				node->hist_max_mbps,
				node->hist_mem,
				node->hyst_mbps,
				node->hyst_en);
	return req_mbps;
}

@@ -537,7 +540,6 @@ static int start_monitor(struct devfreq *df, bool init)
		mbps = (df->previous_freq * node->io_percent) / 100;
		hw->up_wake_mbps = mbps;
		hw->down_wake_mbps = MIN_MBPS;
		hw->undo_over_req_mbps = 0;
		ret = hw->start_hwmon(hw, mbps);
	} else {
		ret = hw->resume_hwmon(hw);
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ struct bw_hwmon {
	struct device_node	*of_node;
	struct devfreq_governor	*gov;
	unsigned long		up_wake_mbps;
	unsigned long		undo_over_req_mbps;
	unsigned long		down_wake_mbps;
	unsigned int		down_cnt;
	struct devfreq		*df;
+38 −0
Original line number Diff line number Diff line
@@ -585,6 +585,44 @@ TRACE_EVENT(bw_hwmon_update,
		__entry->down_thres)
);

TRACE_EVENT(bw_hwmon_debug,

	TP_PROTO(const char *name, unsigned long mbps, unsigned long zone,
		 unsigned long hist_max, unsigned long hist_mem,
		 unsigned long hyst_mbps, unsigned long hyst_len),

	TP_ARGS(name, mbps, zone, hist_max, hist_mem, hyst_mbps, hyst_len),

	TP_STRUCT__entry(
		__string(name,			name)
		__field(unsigned long,		mbps)
		__field(unsigned long,		zone)
		__field(unsigned long,		hist_max)
		__field(unsigned long,		hist_mem)
		__field(unsigned long,		hyst_mbps)
		__field(unsigned long,		hyst_len)
	),

	TP_fast_assign(
		__assign_str(name, name);
		__entry->mbps = mbps;
		__entry->zone = zone;
		__entry->hist_max = hist_max;
		__entry->hist_mem = hist_mem;
		__entry->hyst_mbps = hyst_mbps;
		__entry->hyst_len = hyst_len;
	),

	TP_printk("dev=%s mbps=%lu zone=%lu hist_max=%lu hist_mem=%lu hyst_mbps=%lu hyst_len=%lu",
		__get_str(name),
		__entry->mbps,
		__entry->zone,
		__entry->hist_max,
		__entry->hist_mem,
		__entry->hyst_mbps,
		__entry->hyst_len)
);

TRACE_EVENT(cache_hwmon_meas,
	TP_PROTO(const char *name, unsigned long high_mrps,
		 unsigned long med_mrps, unsigned long low_mrps,
+1 −0
Original line number Diff line number Diff line
@@ -25,3 +25,4 @@ EXPORT_TRACEPOINT_SYMBOL(cache_hwmon_update);
EXPORT_TRACEPOINT_SYMBOL(cache_hwmon_meas);
EXPORT_TRACEPOINT_SYMBOL(bw_hwmon_update);
EXPORT_TRACEPOINT_SYMBOL(bw_hwmon_meas);
EXPORT_TRACEPOINT_SYMBOL(bw_hwmon_debug);