UPSTREAM: scsi: ilog2: create truly constant version for sparse
Sparse emits errors about ilog2() in array indices because of the use of __ilog2_32() and __ilog2_64(), rightly so (https://www.spinics.net/lists/linux-sparse/msg03471.html ). Create a const_ilog2() variant that works with sparse for this scenario. (Note: checkpatch.pl complains about missing parentheses, but that appears to be a false positive. I can get rid of the warning simply by inserting whitespace, making checkpatch "see" the whole macro). Signed-off-by:Martin Wilck <mwilck@suse.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit dbef91ec5482239055dd2db8ec656fc13d382add) Change-Id: Id6d53888e2e7fc44e7fa0e4be4f87327445a6444 Bug: 140252993 Signed-off-by:
Jeff Vander Stoep <jeffv@google.com>
Loading
Please register or sign in to comment