mbox series

[0/8] Random static analysis fixes

Message ID 20181129042833.27376-1-stewart@linux.ibm.com
Headers show
Series Random static analysis fixes | expand

Message

Stewart Smith Nov. 29, 2018, 4:28 a.m. UTC
Peeking into a dusty static analysis tool I have running, there's a few
things we could easily clean up to get fewer random noisy warnings.
Probably worthwhile as this tool only spits out ~90 for skiboot, some of
which look possibly legit.

No functional change here, but there was some grumbling at static
analysis tools.

Stewart Smith (8):
  core/cpu.c: avoid container_of(NULL) in next_cpu()
  Change ifdef around dump_fdt() to shut up static analysis
  mem_region.c: Move ifdef for MEM_POISON to shut up static analysis
  opal_trace_entry: Move ifdef around to shut up static analysis
  opal_sync_host_reboot: clarify when we return OPAL_BUSY_EVENT
  vpd: Force static analysis to not think about NULL term strings
  hdata/iohub.c: remove condition that was always true
  hw/bt.c: Move some debug ifdef to make static analysis happy

 core/cpu.c        | 10 +++++-----
 core/fdt.c        |  4 ++--
 core/mem_region.c |  8 ++++++--
 core/opal.c       | 16 ++++++++--------
 core/vpd.c        |  2 +-
 hdata/iohub.c     |  3 +--
 hw/bt.c           |  6 ++++--
 7 files changed, 27 insertions(+), 22 deletions(-)

Comments

Stewart Smith Dec. 11, 2018, 6:24 a.m. UTC | #1
Stewart Smith <stewart@linux.ibm.com> writes:
> Peeking into a dusty static analysis tool I have running, there's a few
> things we could easily clean up to get fewer random noisy warnings.
> Probably worthwhile as this tool only spits out ~90 for skiboot, some of
> which look possibly legit.
>
> No functional change here, but there was some grumbling at static
> analysis tools.
>
> Stewart Smith (8):
>   core/cpu.c: avoid container_of(NULL) in next_cpu()
>   Change ifdef around dump_fdt() to shut up static analysis
>   mem_region.c: Move ifdef for MEM_POISON to shut up static analysis
>   opal_trace_entry: Move ifdef around to shut up static analysis
>   opal_sync_host_reboot: clarify when we return OPAL_BUSY_EVENT
>   vpd: Force static analysis to not think about NULL term strings
>   hdata/iohub.c: remove condition that was always true
>   hw/bt.c: Move some debug ifdef to make static analysis happy

Series merged to master as of e35f1cb63c1bedd3710a3a0fa7bea9f68910fb86