Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 517071d4 authored by Martin Wilck's avatar Martin Wilck Committed by Jeffrey Vander Stoep
Browse files

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: default avatarMartin Wilck <mwilck@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>

(cherry picked from commit dbef91ec5482239055dd2db8ec656fc13d382add)
Change-Id: Id6d53888e2e7fc44e7fa0e4be4f87327445a6444
Bug: 140252993
Signed-off-by: default avatarJeff Vander Stoep <jeffv@google.com>
parent b134d23d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment