https://github.com/torvalds/linux
Revision 75cdf416b32293dfc348d4c06fcc775ba4dacff6 authored by Linus Torvalds on 02 August 2019, 15:53:34 UTC, committed by Linus Torvalds on 02 August 2019, 15:53:34 UTC
Pull sound fixes from Takashi Iwai:

 - A further fix for syzcaller issues with USB-audio, addressing NULL
   dereference that was introduced by the recent fix

 - Avoid a long delay at boot with HD-audio when i915 module was built
   but not installed, found on some Debian systems

 - A fix of small race window at PCM draining

* tag 'sound-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Fix gpf in snd_usb_pipe_sanity_check
  ALSA: pcm: fix lost wakeup event scenarios in snd_pcm_drain
  ALSA: hda: Fix 1-minute detection delay when i915 module is not available
2 parent s f26dbb2 + 5d78e1c
Raw File
Tip revision: 75cdf416b32293dfc348d4c06fcc775ba4dacff6 authored by Linus Torvalds on 02 August 2019, 15:53:34 UTC
Merge tag 'sound-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Tip revision: 75cdf41
ashrdi3.c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 */

#include <linux/export.h>

#include <linux/libgcc.h>

long long notrace __ashrdi3(long long u, word_type b)
{
	DWunion uu, w;
	word_type bm;

	if (b == 0)
		return u;

	uu.ll = u;
	bm = 32 - b;

	if (bm <= 0) {
		/* w.s.high = 1..1 or 0..0 */
		w.s.high =
		    uu.s.high >> 31;
		w.s.low = uu.s.high >> -bm;
	} else {
		const unsigned int carries = (unsigned int) uu.s.high << bm;

		w.s.high = uu.s.high >> b;
		w.s.low = ((unsigned int) uu.s.low >> b) | carries;
	}

	return w.ll;
}
EXPORT_SYMBOL(__ashrdi3);
back to top