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

Commit 79211c8e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

remove abs64()



Switch everything to the new and more capable implementation of abs().
Mainly to give the new abs() a bit of a workout.

Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c8299cb6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -261,7 +261,7 @@ static void vblank_disable_and_save(struct drm_device *dev, unsigned int pipe)
	 * available. In that case we can't account for this and just
	 * hope for the best.
	 */
	if (vblrc && (abs64(diff_ns) > 1000000))
	if (vblrc && (abs(diff_ns) > 1000000))
		store_vblank(dev, pipe, 1, &tvblank);

	spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
@@ -1772,7 +1772,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
	 * e.g., due to spurious vblank interrupts. We need to
	 * ignore those for accounting.
	 */
	if (abs64(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS)
	if (abs(diff_ns) > DRM_REDUNDANT_VBLIRQ_THRESH_NS)
		store_vblank(dev, pipe, 1, &tvblank);
	else
		DRM_DEBUG("crtc %u: Redundant vblirq ignored. diff_ns = %d\n",
+2 −2
Original line number Diff line number Diff line
@@ -555,11 +555,11 @@ static int tegra_sor_compute_params(struct tegra_sor *sor,
	error = div_s64(active_sym - approx, tu_size);
	error *= params->num_clocks;

	if (error <= 0 && abs64(error) < params->error) {
	if (error <= 0 && abs(error) < params->error) {
		params->active_count = div_u64(active_count, f);
		params->active_polarity = active_polarity;
		params->active_frac = active_frac;
		params->error = abs64(error);
		params->error = abs(error);
		params->tu_size = tu_size;

		if (error == 0)
+2 −2
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ static void walkera0701_irq_handler(void *handler_data)
		if (w->counter == 24) {	/* full frame */
			walkera0701_parse_frame(w);
			w->counter = NO_SYNC;
			if (abs64(pulse_time - SYNC_PULSE) < RESERVE)	/* new frame sync */
			if (abs(pulse_time - SYNC_PULSE) < RESERVE)	/* new frame sync */
				w->counter = 0;
		} else {
			if ((pulse_time > (ANALOG_MIN_PULSE - RESERVE)
@@ -161,7 +161,7 @@ static void walkera0701_irq_handler(void *handler_data)
			} else
				w->counter = NO_SYNC;
		}
	} else if (abs64(pulse_time - SYNC_PULSE - BIN0_PULSE) <
	} else if (abs(pulse_time - SYNC_PULSE - BIN0_PULSE) <
				RESERVE + BIN1_PULSE - BIN0_PULSE)	/* frame sync .. */
		w->counter = 0;

+1 −1
Original line number Diff line number Diff line
@@ -1133,7 +1133,7 @@ static int __ov965x_set_frame_interval(struct ov965x *ov965x,
		if (mbus_fmt->width != iv->size.width ||
		    mbus_fmt->height != iv->size.height)
			continue;
		err = abs64((u64)(iv->interval.numerator * 10000) /
		err = abs((u64)(iv->interval.numerator * 10000) /
			    iv->interval.denominator - req_int);
		if (err < min_err) {
			fiv = iv;
+1 −1
Original line number Diff line number Diff line
@@ -787,7 +787,7 @@ static void mac80211_hwsim_set_tsf(struct ieee80211_hw *hw,
	struct mac80211_hwsim_data *data = hw->priv;
	u64 now = mac80211_hwsim_get_tsf(hw, vif);
	u32 bcn_int = data->beacon_int;
	u64 delta = abs64(tsf - now);
	u64 delta = abs(tsf - now);

	/* adjust after beaconing with new timestamp at old TBTT */
	if (tsf > now) {
Loading