linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/16] use WARN
@ 2012-11-03 10:58 Julia Lawall
  2012-11-03 10:58 ` [PATCH 1/16] drivers/gpu/drm/drm_cache.c: use WARN_ONCE Julia Lawall
                   ` (15 more replies)
  0 siblings, 16 replies; 36+ messages in thread
From: Julia Lawall @ 2012-11-03 10:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel-janitors

These patches use WARN, which combines printk and WARN_ON(1), or WARN_ONCE,
which combines printk and WARN_ON_ONCE(1).  This does not appear to affect
the behavior, but makes the code a little more concise.

The semantic patch that makes this transformation is as follows
(http://coccinelle.lip6.fr/).  In particular, it only transforms the case
where the WARN_ON or WARN_ON_ONCE is preceded by a single printk.

// <smpl>
@bad1@
position p;
@@

printk(...);
printk@p(...);
WARN_ON(1);

@ok1@
expression list es;
position p != bad1.p;
@@

-printk@p(
+WARN(1,
  es);
-WARN_ON(1);

@@
expression list ok1.es;
@@

if (...)
- {
  WARN(1,es);
- }

@bad2@
position p;
@@

printk(...);
printk@p(...);
WARN_ON_ONCE(1);

@ok2@
expression list es;
position p != bad2.p;
@@

-printk@p(
+WARN_ONCE(1,
  es);
-WARN_ON_ONCE(1);

@@
expression list ok2.es;
@@

if (...)
- {
  WARN_ONCE(1,es);
- }
// </smpl>


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

end of thread, other threads:[~2013-02-02  1:07 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-03 10:58 [PATCH 0/16] use WARN Julia Lawall
2012-11-03 10:58 ` [PATCH 1/16] drivers/gpu/drm/drm_cache.c: use WARN_ONCE Julia Lawall
2012-11-03 10:58 ` [PATCH 2/16] fs/hfsplus/bnode.c: use WARN Julia Lawall
2012-11-04 11:49   ` Vyacheslav Dubeyko
2012-11-03 10:58 ` [PATCH 3/16] drivers/md/raid5.c: " Julia Lawall
2012-11-03 10:58 ` [PATCH 4/16] drivers/usb/wusbcore: " Julia Lawall
2012-11-03 10:58 ` [PATCH 5/16] drivers/scsi: " Julia Lawall
2012-11-03 10:58 ` [PATCH 6/16] drivers/infiniband/hw/cxgb4/cm.c: " Julia Lawall
2012-11-03 12:40   ` Steve Wise
2012-11-03 10:58 ` [PATCH 7/16] drivers/scsi/gdth.c: " Julia Lawall
2012-11-03 10:58 ` [PATCH 8/16] drivers/infiniband/hw/cxgb3/iwch_cm.c: " Julia Lawall
2012-11-03 12:39   ` Steve Wise
2012-11-03 10:58 ` [PATCH 9/16] fs/ext4/indirect.c: " Julia Lawall
2013-02-02  1:07   ` Theodore Ts'o
2012-11-03 10:58 ` [PATCH 10/16] drivers/net/ethernet/ibm/emac/mal.c: " Julia Lawall
2012-11-03 11:30   ` walter harms
2012-11-03 14:14     ` Julia Lawall
2012-11-03 16:26       ` walter harms
2012-11-03 16:35         ` Julia Lawall
2012-11-03 19:43   ` David Miller
2012-11-03 10:58 ` [PATCH 11/16] drivers/misc/kgdbts.c: " Julia Lawall
2012-11-03 12:11   ` walter harms
2012-11-03 14:26     ` [PATCH] drivers/misc/kgdbts.c: remove eprintk Julia Lawall
2012-11-04 19:39       ` Arnd Bergmann
2012-11-04 19:58         ` Julia Lawall
2012-11-04 20:51           ` Arnd Bergmann
2012-11-04 21:04             ` Julia Lawall
2012-11-05 16:26               ` Arnd Bergmann
2012-11-05 16:57                 ` Julia Lawall
2012-11-05 20:01                   ` Arnd Bergmann
2012-11-03 10:58 ` [PATCH 12/16] fs/logfs/gc.c: use WARN Julia Lawall
2012-11-03 10:58 ` [PATCH 13/16] fs/btrfs: " Julia Lawall
2012-11-05 15:38   ` David Sterba
2012-11-03 10:58 ` [PATCH 14/16] drivers/ssb/main.c: " Julia Lawall
2012-11-03 10:58 ` [PATCH 15/16] drivers/parisc/pdc_stable.c: " Julia Lawall
2012-11-03 10:58 ` [PATCH 16/16] drivers/infiniband/hw/nes: " Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).