diff options
author | Arnd Bergmann <[email protected]> | 2020-12-03 23:31:26 +0100 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2020-12-07 20:29:55 -0500 |
commit | 4c60244dc37262023d24b167e245055c06bc0b77 (patch) | |
tree | 75d39dca5b2652cf338d8b912341c0ac3f0adf69 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | e7734ef14ead1fd78dc28be3de7ab13128b5c315 (diff) |
scsi: ufs: Fix -Wsometimes-uninitialized warning
clang complains about a possible code path in which a variable is used
without an initialization:
drivers/scsi/ufs/ufshcd.c:7690:3: error: variable 'sdp' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
BUG_ON(1);
^~~~~~~~~
include/asm-generic/bug.h:63:36: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~~~~~~~~~~~
Turn the BUG_ON(1) into an unconditional BUG() that makes it clear to clang
that this code path is never hit.
Link: https://lore.kernel.org/r/[email protected]
Fixes: 4f3e900b6282 ("scsi: ufs: Clear UAC for FFU and RPMB LUNs")
Reviewed-by: Avri Altman <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions