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

-Wtentative-definition-incomplete-type in drivers/regulator/max77650-regulator.c #491

Closed
nathanchance opened this issue May 23, 2019 · 2 comments

Comments

@nathanchance
Copy link
Member

@nathanchance nathanchance commented May 23, 2019

drivers/regulator/max77650-regulator.c:32:39: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct max77650_regulator_desc' [-Wtentative-definition-incomplete-type]
static struct max77650_regulator_desc max77651_SBB1_desc;
                                      ^
drivers/regulator/max77650-regulator.c:32:15: note: forward declaration of 'struct max77650_regulator_desc'
static struct max77650_regulator_desc max77651_SBB1_desc;
              ^
1 warning generated.

Patch sent: https://lore.kernel.org/lkml/20190523012629.7707-1-natechancellor@gmail.com/

@nathanchance nathanchance self-assigned this May 23, 2019
broonie added a commit to broonie/regulator that referenced this issue May 23, 2019
Clang warns:

drivers/regulator/max77650-regulator.c:32:39: warning: tentative
definition of variable with internal linkage has incomplete non-array
type 'struct max77650_regulator_desc'
[-Wtentative-definition-incomplete-type]
static struct max77650_regulator_desc max77651_SBB1_desc;
                                      ^
drivers/regulator/max77650-regulator.c:32:15: note: forward declaration
of 'struct max77650_regulator_desc'
static struct max77650_regulator_desc max77651_SBB1_desc;
              ^
1 warning generated.

Move max77651_SBB1_desc's declaration below max77650_regulator_desc's
definition so this warning does not happen.

Fixes: 3df4235 ("regulator: max77650: Convert MAX77651 SBB1 to pickable linear range")
Link: ClangBuiltLinux/linux#491
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
@nathanchance

This comment has been minimized.

@nathanchance

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.