Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wuninitialized in drivers/scsi/elx/efct/efct_lio.c #1397

Closed
nathanchance opened this issue Jun 17, 2021 · 1 comment
Closed

-Wuninitialized in drivers/scsi/elx/efct/efct_lio.c #1397

nathanchance opened this issue Jun 17, 2021 · 1 comment
Assignees
Labels
-Wuninitialized [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle

Comments

@nathanchance
Copy link
Member

drivers/scsi/elx/efct/efct_lio.c:1216:24: warning: variable 'id' is uninitialized when used here [-Wuninitialized]
                      se_sess, node, id);
                                     ^~
drivers/scsi/elx/efct/../libefc/../libefc_sli/../include/efc_common.h:35:38: note: expanded from macro 'efc_log_debug'
                dev_dbg(&((efc)->pci)->dev, fmt, ##args)
                                                   ^~~~
include/linux/dev_printk.h:123:39: note: expanded from macro 'dev_dbg'
        dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
                                             ^~~~~~~~~~~
include/linux/dynamic_debug.h:162:19: note: expanded from macro 'dynamic_dev_dbg'
                           dev, fmt, ##__VA_ARGS__)
                                       ^~~~~~~~~~~
include/linux/dynamic_debug.h:147:56: note: expanded from macro '_dynamic_func_call'
        __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
                                                              ^~~~~~~~~~~
include/linux/dynamic_debug.h:129:15: note: expanded from macro '__dynamic_func_call'
                func(&id, ##__VA_ARGS__);               \
                            ^~~~~~~~~~~
drivers/scsi/elx/efct/efct_lio.c:1183:8: note: initialize the variable 'id' to silence this warning
        u64 id;
              ^
               = 0
1 warning generated.

Patch submitted: https://lore.kernel.org/r/20210617061721.2405511-1-nathan@kernel.org/

@nathanchance nathanchance added [PATCH] Submitted A patch has been submitted for review -Wuninitialized [BUG] linux-next This is an issue only seen in linux-next labels Jun 17, 2021
@nathanchance nathanchance self-assigned this Jun 17, 2021
fengguang pushed a commit to 0day-ci/linux that referenced this issue Jun 17, 2021
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: 692e5d7 ("scsi: elx: efct: LIO backend interface routines")
Link: ClangBuiltLinux#1397
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
fengguang pushed a commit to 0day-ci/linux that referenced this issue Jun 19, 2021
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.

Link: ClangBuiltLinux#1397
Link: https://lore.kernel.org/r/20210617061721.2405511-1-nathan@kernel.org
Fixes: 692e5d7 ("scsi: elx: efct: LIO backend interface routines")
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle and removed [PATCH] Submitted A patch has been submitted for review labels Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wuninitialized [BUG] linux-next This is an issue only seen in linux-next [FIXED][LINUX] development cycle This bug was only present and fixed in a -next or -rc cycle
Projects
None yet
Development

No branches or pull requests

1 participant