public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging/comedi: fix sparse warning: shift too big
@ 2014-05-02 14:57 Brilliantov Kirill Vladimirovich
  2014-05-02 16:49 ` Ian Abbott
  2014-05-03 23:58 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 6+ messages in thread
From: Brilliantov Kirill Vladimirovich @ 2014-05-02 14:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Ian Abbott, H Hartley Sweeten, linux-kernel,
	Brilliantov Kirill Vladimirovich

Signed-off-by: Brilliantov Kirill Vladimirovich <brilliantov@inbox.ru>
---
 drivers/staging/comedi/drivers/ni_stc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index f0630b78..197b568 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -717,7 +717,7 @@ enum AI_AO_Select_Bits {
 static inline unsigned ni_stc_dma_channel_select_bitfield(unsigned channel)
 {
 	if (channel < 4)
-		return 1 << channel;
+		return 1 << (channel & 0x3);
 	if (channel == 4)
 		return 0x3;
 	if (channel == 5)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-04  7:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-02 14:57 [PATCH] staging/comedi: fix sparse warning: shift too big Brilliantov Kirill Vladimirovich
2014-05-02 16:49 ` Ian Abbott
2014-05-02 18:28   ` Hartley Sweeten
2014-05-02 20:24     ` Ian Abbott
2014-05-03 23:58 ` Greg Kroah-Hartman
2014-05-04  7:46   ` Brilliantov Kirill Vladimirovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox