mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
[media] mceusb: Optimize DIV_ROUND_CLOSEST call
DIV_ROUND_CLOSEST is faster if the compiler knows it will only be dealing with unsigned dividends. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
8b03663644
commit
ed7dd24007
1 changed files with 1 additions and 1 deletions
|
@ -627,7 +627,7 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
|
|||
break;
|
||||
case MCE_RSP_EQIRCFS:
|
||||
period = DIV_ROUND_CLOSEST(
|
||||
(1 << data1 * 2) * (data2 + 1), 10);
|
||||
(1U << data1 * 2) * (data2 + 1), 10);
|
||||
if (!period)
|
||||
break;
|
||||
carrier = (1000 * 1000) / period;
|
||||
|
|
Loading…
Reference in a new issue