]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: s626: remove the uint16_t casts of the bit values
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 26 Mar 2013 22:42:58 +0000 (15:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 23:12:55 +0000 (16:12 -0700)
commit64a2b033e8061494ab7b11d3b3dc9c7f40db8040
tree56db57237d105053f9d5b0d26a1e9dbfbe78cf0a
parent76edfa533e386be4d68202c9ffa507e44408b3ee
staging: comedi: s626: remove the uint16_t casts of the bit values

There are a number of uint16_t casts used in the #define's of the
constant bit field values as well as the calls to DEBIreplace().
These cause a number of sparse warnings of the type:

warning: cast truncates bits from constant value (ffff1cff becomes 1cff)

Remove all of the casts and change the types of the parameters to
DEBIreplace from uin16_t to unsigned int. This fixes all the warnings.

Mask the addr that is or'ed with DEBI_CMD_RDWORD then written to the
P_DEBICMD register as well as the val written to the P_DEBIAD register
with 0xffff. The addr and val are only 16-bits but the registers are
32-bits.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/s626.c
drivers/staging/comedi/drivers/s626.h