Skip to content

Commit

Permalink
ALSA: seq: Drop unused 64bit division macros
Browse files Browse the repository at this point in the history
The old ugly macros remained in the code without usage.
Rip them off.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Aug 1, 2018
1 parent 04702e8 commit 93ce1b1
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions sound/core/seq/seq_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,28 +109,4 @@ int snd_seq_queue_is_used(int queueid, int client);

int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop);

/*
* 64bit division - for sync stuff..
*/
#if defined(i386) || defined(i486)

#define udiv_qrnnd(q, r, n1, n0, d) \
__asm__ ("divl %4" \
: "=a" ((u32)(q)), \
"=d" ((u32)(r)) \
: "0" ((u32)(n0)), \
"1" ((u32)(n1)), \
"rm" ((u32)(d)))

#define u64_div(x,y,q) do {u32 __tmp; udiv_qrnnd(q, __tmp, (x)>>32, x, y);} while (0)
#define u64_mod(x,y,r) do {u32 __tmp; udiv_qrnnd(__tmp, q, (x)>>32, x, y);} while (0)
#define u64_divmod(x,y,q,r) udiv_qrnnd(q, r, (x)>>32, x, y)

#else
#define u64_div(x,y,q) ((q) = (u32)((u64)(x) / (u64)(y)))
#define u64_mod(x,y,r) ((r) = (u32)((u64)(x) % (u64)(y)))
#define u64_divmod(x,y,q,r) (u64_div(x,y,q), u64_mod(x,y,r))
#endif


#endif

0 comments on commit 93ce1b1

Please sign in to comment.