Skip to content

yet more unnecessary NULL checks

Stephen Hemminger dpdk-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 8 repliesIn review
  2. v27 patches 0 repliesSuperseded
  3. v13 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8cocci/nullfree: add more functionsdevtools/cocci/nullfree.cocci+102 -60 replies
2/8acl: remove unnecessary null checksapp/test/test_acl.c lib/acl/rte_acl.h lib/table/rte_swx_table_wm.c +1 more+11 -200 replies
3/8lpm: remove unnecessary NULL checksapp/test/test_func_reentrancy.c lib/lpm/rte_lpm.h lib/lpm/rte_lpm6.h+3 -22 replies
4/8lib: document existing free functionslib/bitratestats/rte_bitrate.h lib/compressdev/rte_comp.h lib/cryptodev/rte_crypto.h +12 more+17 -25 replies
5/8test: remove unnecessary NULL checks before freeapp/test/test_cmdline_lib.c app/test/test_cryptodev.c app/test/test_cryptodev_asym.c +3 more+17 -340 replies
6/8fips_validation: remove unnecessary NULL checkexamples/fips_validation/fips_dev_self_test.c+1 -20 replies
7/8event/sw: remove unnecessary NULL checkdrivers/event/sw/sw_evdev.c+2 -40 replies
8/8pipeline: remove unnecessary checks for NULL pointer before freelib/pipeline/rte_port_in_action.h lib/pipeline/rte_swx_ctl.c lib/pipeline/rte_swx_ctl.h +2 more+9 -80 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRuifeng WangVladimir MedvedkinChengwen Feng
SeriesA-b
1/8
2/8
3/8R-b A-b
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/8] yet more unnecessary NULL checks

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(-)
Signature · 1 line
2.34.1