diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-04-24 11:57:43 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-25 12:01:31 +0200 |
commit | 3fcbb7d49cb7947711888a0e5905bc5cd90cab5d (patch) | |
tree | b7a1f9906dd25f693f6a2ae7a251ec298ab57de0 /drivers/clk/mxs/clk.h | |
parent | bf402c08ebc286f613501f4d2dc00304aed47ceb (diff) |
staging: kpc2000: Use memset to initialize resources
Clang warns:
drivers/staging/kpc2000/kpc2000/cell_probe.c:96:38: warning: suggest
braces around initialization of subobject [-Wmissing-braces]
struct resource resources[2] = {0};
^
{}
drivers/staging/kpc2000/kpc2000/cell_probe.c:314:38: warning: suggest
braces around initialization of subobject [-Wmissing-braces]
struct resource resources[2] = {0};
^
{}
2 warnings generated.
One way to fix these warnings is to add additional braces like Clang
suggests; however, there has been a bit of push back from some
maintainers, who just prefer memset as it is unambiguous, doesn't
depend on a particular compiler version, and properly initializes all
subobjects [1][2]. Do that here so there are no more warnings.
[1]: https://lore.kernel.org/lkml/022e41c0-8465-dc7a-a45c-64187ecd9684@amd.com/
[2]: https://lore.kernel.org/lkml/20181128.215241.702406654469517539.davem@davemloft.net/
Link: https://github.com/ClangBuiltLinux/linux/issues/455
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clk/mxs/clk.h')
0 files changed, 0 insertions, 0 deletions