Re: [PATCH] scsi: elx: efct: Do not use id uninitialized in efct_lio_setup_session()

From: James Smart
Date: Fri Jun 18 2021 - 18:52:31 EST


On 6/16/2021 11:17 PM, Nathan Chancellor wrote:
clang warns:

drivers/scsi/elx/efct/efct_lio.c:1216:24: warning: variable 'id' is
uninitialized when used here [-Wuninitialized]
se_sess, node, id);
^~

Shuffle the debug print after id's initialization so that the actual
value is printed.

Fixes: 692e5d73a811 ("scsi: elx: efct: LIO backend interface routines")
Link: https://github.com/ClangBuiltLinux/linux/issues/1397
Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
---
drivers/scsi/elx/efct/efct_lio.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)


Thanks

Reviewed-by: James Smart <jsmart2021@xxxxxxxxx>

-- james