On Fri, Jul 17, 2020 at 07:01:03AM +0000, Vabhav Sharma (OSS) wrote: > Hello Greg, Bhuvanchandra DV, > Static analysis tool is run against upstream kernel tree and found medium priority coverity issue against changes: commit 5887ad43ee02a00f17a6132b7fb256dc6865474c > > Below are details > sport->rx_dma_rng_buf_len = (1 << (fls(sport->rx_dma_rng_buf_len) - 1)); > > Bad bit shift operation, The operation may have an undefined behavior or yield an unexpected result. > A bit shift operation has a shift amount which is too large or has a negative value. > > zero_return: Function call fls(sport->rx_dma_rng_buf_len) returns 0 > CID 9000793 (#5 of 5): > Bad bit shift operation (BAD_SHIFT)4. negative_shift: In expression 1 << fls(sport->rx_dma_rng_buf_len) - 1, shifting by a negative amount has undefined behavior. The shift amount, fls(sport->rx_dma_rng_buf_len) - 1, is -1. > > Would you like to push changes for fixing the coverity issue. Can you submit a patch for this, no need to make someone else do it :) And note, html email is rejected by the mailing lists. thanks, greg k-h