2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00
linux-next/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 crypto: amcc - Add crypt4xx driver 2009-02-18 16:49:43 +08:00
crypto4xx_sa.c crypto: amcc - Add crypt4xx driver 2009-02-18 16:49:43 +08:00
crypto4xx_sa.h crypto: amcc - Add crypt4xx driver 2009-02-18 16:49:43 +08:00
Makefile crypto: amcc - Add crypt4xx driver 2009-02-18 16:49:43 +08:00