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

Skip to content
Commit 3ab1b9ce authored by David Howells's avatar David Howells Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible



If val is a u64, then following:

	val *= (u64)1 << 32;
	val /= (u64)1 << 32;

should surely be better represented as:

	val <<= 32;
	val >>= 32;

Especially as, for the division, the compiler might want to actually do a
division:

drivers/built-in.o: In function `lgs8gxx_get_afc_phase':
drivers/media/dvb/frontends/lgs8gxx.c:250: undefined reference to `__udivdi3'

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5bf58347
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment