Messages in this thread | | | From | Martin Kepplinger <> | Subject | add sign-extend functions for 8 and 16 bit values | Date | Mon, 15 Dec 2014 17:18:31 +0100 |
| |
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.
| |