mbox series

[v3,0/8] yet more unnecessary NULL checks

Message ID 20220220182147.9750-1-stephen@networkplumber.org (mailing list archive)
Headers
Series yet more unnecessary NULL checks |

Message

Stephen Hemminger Feb. 20, 2022, 6:21 p.m. UTC
  Thomas suggested there are some other functions that could
use the nullfree cleanup; this covers the rest of the story.

Note: this does not change existing API/ABI, there are still
some outliers that don't use the convention but fixing these
will have to wait until next LTS.

v3 - fix another typo and add more functions

v2 - fix spelling typo and add functions

Stephen Hemminger (8):
  cocci/nullfree: add more functions
  acl: remove unnecessary null checks
  lpm: remove unnecessary NULL checks
  lib: document existing free functions
  test: remove unnecessary NULL checks before free
  fips_validation: remove unnecessary NULL check
  event/sw: remove unnecessary NULL check
  pipeline: remove unnecessary checks for NULL pointer before free

 app/test/test_acl.c                           |  12 +-
 app/test/test_cmdline_lib.c                   |   3 +-
 app/test/test_cryptodev.c                     |   9 +-
 app/test/test_cryptodev_asym.c                |  30 ++---
 app/test/test_cryptodev_blockcipher.c         |   3 +-
 app/test/test_func_reentrancy.c               |   6 +-
 app/test/test_hash.c                          |   3 +-
 devtools/cocci/nullfree.cocci                 | 108 +++++++++++++++++-
 drivers/event/sw/sw_evdev.c                   |   6 +-
 examples/fips_validation/fips_dev_self_test.c |   3 +-
 lib/acl/rte_acl.h                             |   1 +
 lib/bitratestats/rte_bitrate.h                |   1 +
 lib/compressdev/rte_comp.h                    |   1 +
 lib/cryptodev/rte_crypto.h                    |   1 +
 lib/eal/include/rte_interrupts.h              |   4 +-
 lib/efd/rte_efd.h                             |   1 +
 lib/eventdev/rte_event_ring.h                 |   1 +
 lib/fib/rte_fib.h                             |   1 +
 lib/fib/rte_fib6.h                            |   1 +
 lib/lpm/rte_lpm.h                             |   1 +
 lib/lpm/rte_lpm6.h                            |   1 +
 lib/member/rte_member.h                       |   1 +
 lib/pipeline/rte_port_in_action.h             |   6 +-
 lib/pipeline/rte_swx_ctl.c                    |   3 +-
 lib/pipeline/rte_swx_ctl.h                    |   1 +
 lib/pipeline/rte_swx_pipeline.c               |   6 +-
 lib/pipeline/rte_swx_pipeline.h               |   1 +
 lib/reorder/rte_reorder.h                     |   1 +
 lib/rib/rte_rib.h                             |   1 +
 lib/rib/rte_rib6.h                            |   1 +
 lib/sched/rte_sched.h                         |   1 +
 lib/stack/rte_stack.h                         |   1 +
 lib/table/rte_swx_table_wm.c                  |   3 +-
 lib/table/rte_table_acl.c                     |  15 +--
 lib/telemetry/rte_telemetry.h                 |   2 +-
 35 files changed, 162 insertions(+), 78 deletions(-)
  

Comments

David Marchand June 24, 2022, 12:41 p.m. UTC | #1
On Sun, Feb 20, 2022 at 7:22 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Thomas suggested there are some other functions that could
> use the nullfree cleanup; this covers the rest of the story.
>
> Note: this does not change existing API/ABI, there are still
> some outliers that don't use the convention but fixing these
> will have to wait until next LTS.
>
> v3 - fix another typo and add more functions
>
> v2 - fix spelling typo and add functions
>
> Stephen Hemminger (8):
>   cocci/nullfree: add more functions
>   acl: remove unnecessary null checks
>   lpm: remove unnecessary NULL checks
>   lib: document existing free functions
>   test: remove unnecessary NULL checks before free
>   fips_validation: remove unnecessary NULL check
>   event/sw: remove unnecessary NULL check
>   pipeline: remove unnecessary checks for NULL pointer before free

Series applied.
I reran the script and fixed two more instances.

Thanks for the cleanup Stephen.