Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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/[email protected]/ [2]: https://lore.kernel.org/lkml/[email protected]/ Link: ClangBuiltLinux#455 Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information