All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Remove redundant NULL checks.
@ 2013-02-12  4:01 ` Cyril Roelandt
  0 siblings, 0 replies; 18+ messages in thread
From: Cyril Roelandt @ 2013-02-12  4:01 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors; +Cc: Cyril Roelandt

Remove redundant NULL checks before calls to functions that are equivalent to a
no-op when run on a NULL pointer.

These patches were generated by the following semantic patch, and manually
reviewed:

<smpl>
@r@
identifier noop_func;
identifier param;
type T;
@@
noop_func (T *param) {
	...
	if (!param) return;
	...
}

@@
identifier r.noop_func;
expression E;
statement S;
@@
(
- if (E) noop_func(E);
+ noop_func(E);
|
- if (E) { noop_func(E); E = NULL; }
+ noop_func(E);
+ E = NULL;
)
</smpl>

Regards,
Cyril Roelandt
---

Cyril Roelandt (5):
  radeon: Remove redundant NULL check before radeon_i2c_destroy().
  iommu: remove redundant NULL check before dma_ops_domain_free().
  staging: dgrp: remove redundant NULL check before
    unregister_dgrp_device().
  staging: tidspbridge: remove redundant NULL check before
    delete_msg_mgr().
  xen: remove redundant NULL check before unregister_and_remove_pcpu().

 drivers/gpu/drm/radeon/radeon_i2c.c       |    6 ++----
 drivers/iommu/amd_iommu.c                 |    3 +--
 drivers/staging/dgrp/dgrp_specproc.c      |    9 +++------
 drivers/staging/tidspbridge/core/msg_sm.c |    3 +--
 drivers/xen/pcpu.c                        |    3 +--
 5 files changed, 8 insertions(+), 16 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-02-17 19:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12  4:01 [PATCH 0/5] Remove redundant NULL checks Cyril Roelandt
2013-02-12  4:01 ` Cyril Roelandt
2013-02-12  4:01 ` [PATCH 1/5] radeon: Remove redundant NULL check before radeon_i2c_destroy() Cyril Roelandt
2013-02-12  4:01   ` Cyril Roelandt
2013-02-12  4:01 ` [PATCH 2/5] iommu: remove redundant NULL check before dma_ops_domain_free() Cyril Roelandt
2013-02-12  4:01   ` Cyril Roelandt
     [not found]   ` <1360641713-24895-3-git-send-email-tipecaml-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-13 11:13     ` Joerg Roedel
2013-02-13 11:13       ` Joerg Roedel
2013-02-13 11:13       ` Joerg Roedel
2013-02-12  4:01 ` [PATCH 3/5] staging: dgrp: remove redundant NULL check before unregister_dgrp_device() Cyril Roelandt
2013-02-12  4:01   ` Cyril Roelandt
2013-02-12  4:01 ` [PATCH 4/5] staging: tidspbridge: remove redundant NULL check before delete_msg_mgr() Cyril Roelandt
2013-02-12  4:01   ` Cyril Roelandt
2013-02-12  4:01 ` [PATCH 5/5] xen: remove redundant NULL check before unregister_and_remove_pcpu() Cyril Roelandt
2013-02-12  4:01 ` Cyril Roelandt
2013-02-12  4:01   ` Cyril Roelandt
     [not found] ` <alpine.DEB.2.02.1302120731570.2264@localhost6.localdomain6>
     [not found]   ` <511AB4C2.4010400@gmail.com>
     [not found]     ` <alpine.DEB.2.02.1302122313050.2232@localhost6.localdomain6>
     [not found]       ` <511D8A2C.3080204@gmail.com>
2013-02-15  6:53         ` [Cocci] [PATCH 0/5] Remove redundant NULL checks Julia Lawall
2013-02-17 19:56           ` Cyril Roelandt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.