linux/drivers/crypto/amcc
Márton Németh 6c3f975a4c crypto: Make Open Firmware device id constant
From: Márton Németh <nm127@freemail.hu>

The match_table field of the struct of_device_id is constant in <linux/of_platform.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2010-01-17 21:54:01 +11:00
..
crypto4xx_alg.c crypto: crypto4xx - Use crypto_ahash_set_reqsize 2009-07-14 12:58:13 +08:00
crypto4xx_core.c crypto: Make Open Firmware device id constant 2010-01-17 21:54:01 +11:00
crypto4xx_core.h crypto: crypto4xx - Switch to new style ahash 2009-07-14 20:21:46 +08:00
crypto4xx_reg_def.h
crypto4xx_sa.c
crypto4xx_sa.h
Makefile