Thread (13 messages) 13 messages, 2 authors, 2017-07-12

Re: [PATCH v3] Input: mousedev - fix implicit conversion warning

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2017-05-30 02:44:18
Also in: lkml

On Mon, May 29, 2017 at 12:22:52PM -0700, Nick Desaulniers wrote:
On Fri, May 26, 2017 at 10:07:46AM -0700, Dmitry Torokhov wrote:
quoted
If you look at the code of this fucntion we really use ps2_data as
signed in calculations, and this change would break that. While making
ps2_data u8 might be beneficial we'd need to rework mousedev_packet() to
use signed temporaries for dx, dy and dz before stufifng them into
ps2_data.
Is your recommendation then to stick with the simple cast as in V1 of
this patch, or stick with u8 and rework mousedev_packet()?
I think casts are often mysterious, so, unless we'll end up with worse
object code, I'd switch to u8 and temps.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help