Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-09 Thread Jean Delvare
On Sun, 7 Oct 2012 18:50:31 +0200 (CEST), Julia Lawall wrote: > On Sun, 7 Oct 2012, walter harms wrote: > > Am 07.10.2012 17:38, schrieb Julia Lawall: > >> @@ -97,10 +96,8 @@ static int fc0011_readreg(struct fc0011_priv *priv, u8 > >> reg, u8 *val) > >> { > >>u8 dummy; > >>struct i2c_msg

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread Michael Büsch
On Sun, 7 Oct 2012 18:50:31 +0200 (CEST) Julia Lawall wrote: > >> @@ -97,10 +96,8 @@ static int fc0011_readreg(struct fc0011_priv *priv, u8 > >> reg, u8 *val) > >> { > >>u8 dummy; > >>struct i2c_msg msg[2] = { > >> - { .addr = priv->addr, > >> -.flags = 0, .buf = ®,

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread walter harms
Am 07.10.2012 18:50, schrieb Julia Lawall: > On Sun, 7 Oct 2012, walter harms wrote: > >> >> >> Am 07.10.2012 17:38, schrieb Julia Lawall: >>> From: Julia Lawall >>> >>> Introduce use of I2c_MSG_READ/WRITE/OP, for readability. >>> >>> A length expressed as an explicit constant is also re-expres

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread Julia Lawall
On Sun, 7 Oct 2012, walter harms wrote: Am 07.10.2012 17:38, schrieb Julia Lawall: From: Julia Lawall Introduce use of I2c_MSG_READ/WRITE/OP, for readability. A length expressed as an explicit constant is also re-expressed as the size of the buffer in each case. A simplified version of th

Re: [PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread walter harms
Am 07.10.2012 17:38, schrieb Julia Lawall: > From: Julia Lawall > > Introduce use of I2c_MSG_READ/WRITE/OP, for readability. > > A length expressed as an explicit constant is also re-expressed as the size > of the buffer in each case. > > A simplified version of the semantic patch that makes

[PATCH 9/13] drivers/media/tuners/fc0011.c: use macros for i2c_msg initialization

2012-10-07 Thread Julia Lawall
From: Julia Lawall Introduce use of I2c_MSG_READ/WRITE/OP, for readability. A length expressed as an explicit constant is also re-expressed as the size of the buffer in each case. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) //