Re: [PATCH v2] bitops.h: add sign_extend8(), 16 and 64 functions

2015-01-12 Thread Guenter Roeck
On Mon, Jan 12, 2015 at 06:22:50PM +0100, Martin Kepplinger wrote: > This adds helper functions for sign-extending signed values of any lower > (hardware-)given size to s8, s16 or s64 respectively, just like > sign_extend32() > for s32. > > Signed-off-by: Martin Kepplinger > Suggested-by:

[PATCH v2] bitops.h: add sign_extend8(), 16 and 64 functions

2015-01-12 Thread Martin Kepplinger
This adds helper functions for sign-extending signed values of any lower (hardware-)given size to s8, s16 or s64 respectively, just like sign_extend32() for s32. Signed-off-by: Martin Kepplinger Suggested-by: Christoph Muellner --- include/linux/bitops.h | 33 +

Re: [PATCH v2] bitops.h: add sign_extend8(), 16 and 64 functions

2015-01-12 Thread Guenter Roeck
On Mon, Jan 12, 2015 at 06:22:50PM +0100, Martin Kepplinger wrote: This adds helper functions for sign-extending signed values of any lower (hardware-)given size to s8, s16 or s64 respectively, just like sign_extend32() for s32. Signed-off-by: Martin Kepplinger mart...@posteo.de

[PATCH v2] bitops.h: add sign_extend8(), 16 and 64 functions

2015-01-12 Thread Martin Kepplinger
This adds helper functions for sign-extending signed values of any lower (hardware-)given size to s8, s16 or s64 respectively, just like sign_extend32() for s32. Signed-off-by: Martin Kepplinger mart...@posteo.de Suggested-by: Christoph Muellner christoph.muell...@theobroma-systems.com ---