mbox series

[0/3] more unnecessary null checks

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

Message

Stephen Hemminger Feb. 19, 2022, 11:43 p.m. UTC
  Thomas suggested there are some other functions that could
use the nullfree cleanup. And ACL and LPM are both candidates.

Stephen Hemminger (3):
  cocci/nullfree: add more functions
  acl: remove unncessary null checks in calls to rte_acl_free()
  lpm: remove unnecessary NULL checks

 app/test/test_acl.c             | 12 ++++--------
 app/test/test_func_reentrancy.c |  3 +--
 devtools/cocci/nullfree.cocci   |  9 +++++++++
 lib/acl/rte_acl.h               |  1 +
 lib/lpm/rte_lpm.h               |  1 +
 lib/lpm/rte_lpm6.h              |  1 +
 lib/table/rte_swx_table_wm.c    |  3 +--
 lib/table/rte_table_acl.c       | 15 +++++----------
 8 files changed, 23 insertions(+), 22 deletions(-)
  

Comments

Jerin Jacob Feb. 20, 2022, 5:18 a.m. UTC | #1
On Sun, Feb 20, 2022 at 5:13 AM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> Thomas suggested there are some other functions that could
> use the nullfree cleanup. And ACL and LPM are both candidates.
>
> Stephen Hemminger (3):
>   cocci/nullfree: add more functions

Can ./devtools/cocci.sh to integrated to devtools/checkpatches.sh to
detect the issues  before
the code gets into DPDK?


>   acl: remove unncessary null checks in calls to rte_acl_free()
>   lpm: remove unnecessary NULL checks
>
>  app/test/test_acl.c             | 12 ++++--------
>  app/test/test_func_reentrancy.c |  3 +--
>  devtools/cocci/nullfree.cocci   |  9 +++++++++
>  lib/acl/rte_acl.h               |  1 +
>  lib/lpm/rte_lpm.h               |  1 +
>  lib/lpm/rte_lpm6.h              |  1 +
>  lib/table/rte_swx_table_wm.c    |  3 +--
>  lib/table/rte_table_acl.c       | 15 +++++----------
>  8 files changed, 23 insertions(+), 22 deletions(-)
>
> --
> 2.34.1
>