Re: Question about the function,ni_stc_dma_channel_select_bitfield

2015-05-06 Thread Greg KH
On Wed, May 06, 2015 at 10:05:55AM -0400, nick wrote: > On 2015-05-06 05:10 AM, Ian Abbott wrote: > > On 06/05/15 01:22, nick wrote: > >> Greetings All, > >> I am wondering if in the function,ni_stc_dma_channel_select_bitfield the > >> line: > >> return 1 << channel; > >> is guaranteed to be below

RE: Question about the function,ni_stc_dma_channel_select_bitfield

2015-05-06 Thread Hartley Sweeten
On Wednesday, May 06, 2015 7:06 AM, nick wrote: > On 2015-05-06 05:10 AM, Ian Abbott wrote: >> On 06/05/15 01:22, nick wrote: >>> Greetings All, >>> I am wondering if in the function,ni_stc_dma_channel_select_bitfield the >>> line: >>> return 1 << channel; >>> is guaranteed to be below the thresho

Re: Question about the function,ni_stc_dma_channel_select_bitfield

2015-05-06 Thread Ian Abbott
On 06/05/15 01:22, nick wrote: Greetings All, I am wondering if in the function,ni_stc_dma_channel_select_bitfield the line: return 1 << channel; is guaranteed to be below the threshold that guarantees us to not overflow on a unsigned 32 integer due to bit wise shifting to the left. Thanks Nick