Re: [PATCH] x86/apic: fix integer overflow on 10 bit right shift of cpu_khz

2019-06-19 Thread Colin Ian King
On 19/06/2019 19:13, Colin King wrote: > From: Colin Ian King > > The right shift of unsigned int cpu_khz will overflow for large values > of cpu_khz, so cast it to a long long before shifting it to avoid > overvlow. For example, this can happen when cpu_khz is 4194305 (just > less than 4.2 GHz)

[PATCH] x86/apic: fix integer overflow on 10 bit right shift of cpu_khz

2019-06-19 Thread Colin King
From: Colin Ian King The right shift of unsigned int cpu_khz will overflow for large values of cpu_khz, so cast it to a long long before shifting it to avoid overvlow. For example, this can happen when cpu_khz is 4194305 (just less than 4.2 GHz). Also wrap line to avoid checkpatch wide line war