lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 3 Nov 2012 11:58:21 +0100 From: Julia Lawall <Julia.Lawall@...6.fr> To: linux-kernel@...r.kernel.org Cc: kernel-janitors@...r.kernel.org Subject: [PATCH 0/16] use WARN 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> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists