Fixes warning static analysis warning raised by sparse in drivers/staging/comedi/drivers/ni_stc.h warning: shift too big (4294967295) for type int Signed-off-by: Marcos A. Di Pietro <marcosadp@xxxxxxxxx> --- drivers/staging/comedi/drivers/ni_stc.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index f0630b78..8ef420c 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -716,8 +716,12 @@ enum AI_AO_Select_Bits { #define G0_G1_Select 0x0b static inline unsigned ni_stc_dma_channel_select_bitfield(unsigned channel) { - if (channel < 4) - return 1 << channel; + if (channel == 1) + return 1 << 0x1; + if (channel == 2) + return 1 << 0x2; + if (channel == 3 || channel == 4) + return 1 << 0x3; if (channel == 4) return 0x3; if (channel == 5) -- 1.8.3.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel