lkml.org 
[lkml]   [2014]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectadd sign-extend functions for 8 and 16 bit values
Date
In short: If you want the first 2 changes, please merge them and notify 
me.

This adds sign_extend8() and sign_extend16() for the quite many cases
where this is needed, like sign_extend32().

Sign-extending is done in a few different ways throughout the kernel
and most of them look not very beautiful, adding non-obvious constant
values. This would simplify things.

I append four example changes for existing drivers. I'm aware that you
are not resposible for these, but I'd post them to the relevant
maintainers only if you want to apply to bitops.h.

While I would definitely move on moving drivers over to this, when I find
them, I can't guarantee I'd change every sign-extension out there myself.


\
 
 \ /
  Last update: 2014-12-15 18:01    [W:0.535 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site