All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <5071FCC3.5070200@gmail.com>

diff --git a/a/1.txt b/N1/1.txt
index 5f61f5d..6bff99b 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -15,7 +15,8 @@ On 08/10/12 02:38, Julia Lawall wrote:
 > identifier x;
 > @@
 > 
-> struct i2c_msg x > - {.addr = a, .buf = b, .len = c, .flags = I2C_M_RD}
+> struct i2c_msg x =
+> - {.addr = a, .buf = b, .len = c, .flags = I2C_M_RD}
 > + I2C_MSG_READ(a,b,c)
 >  ;
 > 
@@ -24,7 +25,8 @@ On 08/10/12 02:38, Julia Lawall wrote:
 > identifier x;
 > @@
 > 
-> struct i2c_msg x > - {.addr = a, .buf = b, .len = c, .flags = 0}
+> struct i2c_msg x =
+> - {.addr = a, .buf = b, .len = c, .flags = 0}
 > + I2C_MSG_WRITE(a,b,c)
 >  ;
 > 
@@ -325,7 +327,7 @@ And again.
 > +	struct i2c_msg msg = I2C_MSG_WRITE(state->config->i2c_address, buf,
 > +					   sizeof(buf));
 >  
->  	if (latch = 0)
+>  	if (latch == 0)
 >  		msg.len = 2;
 > diff --git a/drivers/media/tuners/tda827x.c b/drivers/media/tuners/tda827x.c
 > index a0d1762..15a4802 100644
@@ -387,7 +389,7 @@ And again.
 > -	struct i2c_msg msg = { .flags = 0, .buf = buf, .len = sizeof(buf) };
 > +	struct i2c_msg msg = I2C_MSG_WRITE(0, buf, sizeof(buf));
 >  
->  	if (NULL = priv->cfg) {
+>  	if (NULL == priv->cfg) {
 >  		dprintk("tda827x_config not defined, cannot set LNA gain!\n");
 > @@ -518,8 +514,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
 >  	struct tda827xa_data *frequency_map = tda827xa_dvbt;
@@ -443,7 +445,7 @@ And again.
 > +	struct i2c_msg msg = I2C_MSG_WRITE(props->addr, buf, len);
 >  	int ret = i2c_transfer(props->adap, &msg, 1);
 >  
->  	return (ret = 1) ? len : ret;
+>  	return (ret == 1) ? len : ret;
 > @@ -44,8 +43,7 @@ static inline int tuner_i2c_xfer_send(struct tuner_i2c_props *props, char *buf,
 >  
 >  static inline int tuner_i2c_xfer_recv(struct tuner_i2c_props *props, char *buf, int len)
@@ -453,7 +455,7 @@ And again.
 > +	struct i2c_msg msg = I2C_MSG_READ(props->addr, buf, len);
 >  	int ret = i2c_transfer(props->adap, &msg, 1);
 >  
->  	return (ret = 1) ? len : ret;
+>  	return (ret == 1) ? len : ret;
 > @@ -55,10 +53,8 @@ static inline int tuner_i2c_xfer_send_recv(struct tuner_i2c_props *props,
 >  					   char *obuf, int olen,
 >  					   char *ibuf, int ilen)
@@ -474,7 +476,7 @@ Consistent coding style with other initialisers would be:
 
 >  	int ret = i2c_transfer(props->adap, msg, 2);
 >  
->  	return (ret = 2) ? ilen : ret;
+>  	return (ret == 2) ? ilen : ret;
 > diff --git a/drivers/media/tuners/tuner-simple.c b/drivers/media/tuners/tuner-simple.c
 > index 39e7e58..df5ba78 100644
 > --- a/drivers/media/tuners/tuner-simple.c
@@ -506,7 +508,7 @@ More silly "arrays" :-/. Can be fixed later.
 > -			       .flags = 0, .buf = buf, .len = len };
 > +	struct i2c_msg msg = I2C_MSG_WRITE(priv->i2c_props.addr, buf, len);
 >  	if (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) {
->  		if (priv->ignore_i2c_write_errors = 0) {
+>  		if (priv->ignore_i2c_write_errors == 0) {
 >  			printk(KERN_ERR "xc4000: I2C write failed (len=%i)\n",
 > @@ -550,10 +549,8 @@ static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val)
 >  	u8 buf[2] = { reg >> 8, reg & 0xff };
@@ -519,7 +521,7 @@ More silly "arrays" :-/. Can be fixed later.
 > +		I2C_MSG_WRITE(priv->i2c_props.addr, &buf[0], sizeof(buf)),
 > +		I2C_MSG_READ(priv->i2c_props.addr, &bval[0], sizeof(bval)),
 
-&buf[0] = buf. Might as well fix this now, the way it is written is
+&buf[0] == buf. Might as well fix this now, the way it is written is
 just silly.
 
 >  	};
diff --git a/a/content_digest b/N1/content_digest
index b6597a3..4682aa5 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -2,7 +2,7 @@
  "ref\01349624323-15584-7-git-send-email-Julia.Lawall@lip6.fr\0"
  "From\0Ryan Mallon <rmallon@gmail.com>\0"
  "Subject\0Re: [PATCH 5/13] drivers/media/tuners: use macros for i2c_msg initialization\0"
- "Date\0Sun, 07 Oct 2012 22:05:55 +0000\0"
+ "Date\0Mon, 08 Oct 2012 09:05:55 +1100\0"
  "To\0Julia Lawall <Julia.Lawall@lip6.fr>\0"
  "Cc\0Mauro Carvalho Chehab <mchehab@infradead.org>"
   kernel-janitors@vger.kernel.org
@@ -28,7 +28,8 @@
  "> identifier x;\n"
  "> @@\n"
  "> \n"
- "> struct i2c_msg x > - {.addr = a, .buf = b, .len = c, .flags = I2C_M_RD}\n"
+ "> struct i2c_msg x =\n"
+ "> - {.addr = a, .buf = b, .len = c, .flags = I2C_M_RD}\n"
  "> + I2C_MSG_READ(a,b,c)\n"
  ">  ;\n"
  "> \n"
@@ -37,7 +38,8 @@
  "> identifier x;\n"
  "> @@\n"
  "> \n"
- "> struct i2c_msg x > - {.addr = a, .buf = b, .len = c, .flags = 0}\n"
+ "> struct i2c_msg x =\n"
+ "> - {.addr = a, .buf = b, .len = c, .flags = 0}\n"
  "> + I2C_MSG_WRITE(a,b,c)\n"
  ">  ;\n"
  "> \n"
@@ -338,7 +340,7 @@
  "> +\tstruct i2c_msg msg = I2C_MSG_WRITE(state->config->i2c_address, buf,\n"
  "> +\t\t\t\t\t   sizeof(buf));\n"
  ">  \n"
- ">  \tif (latch = 0)\n"
+ ">  \tif (latch == 0)\n"
  ">  \t\tmsg.len = 2;\n"
  "> diff --git a/drivers/media/tuners/tda827x.c b/drivers/media/tuners/tda827x.c\n"
  "> index a0d1762..15a4802 100644\n"
@@ -400,7 +402,7 @@
  "> -\tstruct i2c_msg msg = { .flags = 0, .buf = buf, .len = sizeof(buf) };\n"
  "> +\tstruct i2c_msg msg = I2C_MSG_WRITE(0, buf, sizeof(buf));\n"
  ">  \n"
- ">  \tif (NULL = priv->cfg) {\n"
+ ">  \tif (NULL == priv->cfg) {\n"
  ">  \t\tdprintk(\"tda827x_config not defined, cannot set LNA gain!\\n\");\n"
  "> @@ -518,8 +514,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe)\n"
  ">  \tstruct tda827xa_data *frequency_map = tda827xa_dvbt;\n"
@@ -456,7 +458,7 @@
  "> +\tstruct i2c_msg msg = I2C_MSG_WRITE(props->addr, buf, len);\n"
  ">  \tint ret = i2c_transfer(props->adap, &msg, 1);\n"
  ">  \n"
- ">  \treturn (ret = 1) ? len : ret;\n"
+ ">  \treturn (ret == 1) ? len : ret;\n"
  "> @@ -44,8 +43,7 @@ static inline int tuner_i2c_xfer_send(struct tuner_i2c_props *props, char *buf,\n"
  ">  \n"
  ">  static inline int tuner_i2c_xfer_recv(struct tuner_i2c_props *props, char *buf, int len)\n"
@@ -466,7 +468,7 @@
  "> +\tstruct i2c_msg msg = I2C_MSG_READ(props->addr, buf, len);\n"
  ">  \tint ret = i2c_transfer(props->adap, &msg, 1);\n"
  ">  \n"
- ">  \treturn (ret = 1) ? len : ret;\n"
+ ">  \treturn (ret == 1) ? len : ret;\n"
  "> @@ -55,10 +53,8 @@ static inline int tuner_i2c_xfer_send_recv(struct tuner_i2c_props *props,\n"
  ">  \t\t\t\t\t   char *obuf, int olen,\n"
  ">  \t\t\t\t\t   char *ibuf, int ilen)\n"
@@ -487,7 +489,7 @@
  "\n"
  ">  \tint ret = i2c_transfer(props->adap, msg, 2);\n"
  ">  \n"
- ">  \treturn (ret = 2) ? ilen : ret;\n"
+ ">  \treturn (ret == 2) ? ilen : ret;\n"
  "> diff --git a/drivers/media/tuners/tuner-simple.c b/drivers/media/tuners/tuner-simple.c\n"
  "> index 39e7e58..df5ba78 100644\n"
  "> --- a/drivers/media/tuners/tuner-simple.c\n"
@@ -519,7 +521,7 @@
  "> -\t\t\t       .flags = 0, .buf = buf, .len = len };\n"
  "> +\tstruct i2c_msg msg = I2C_MSG_WRITE(priv->i2c_props.addr, buf, len);\n"
  ">  \tif (i2c_transfer(priv->i2c_props.adap, &msg, 1) != 1) {\n"
- ">  \t\tif (priv->ignore_i2c_write_errors = 0) {\n"
+ ">  \t\tif (priv->ignore_i2c_write_errors == 0) {\n"
  ">  \t\t\tprintk(KERN_ERR \"xc4000: I2C write failed (len=%i)\\n\",\n"
  "> @@ -550,10 +549,8 @@ static int xc4000_readreg(struct xc4000_priv *priv, u16 reg, u16 *val)\n"
  ">  \tu8 buf[2] = { reg >> 8, reg & 0xff };\n"
@@ -532,7 +534,7 @@
  "> +\t\tI2C_MSG_WRITE(priv->i2c_props.addr, &buf[0], sizeof(buf)),\n"
  "> +\t\tI2C_MSG_READ(priv->i2c_props.addr, &bval[0], sizeof(bval)),\n"
  "\n"
- "&buf[0] = buf. Might as well fix this now, the way it is written is\n"
+ "&buf[0] == buf. Might as well fix this now, the way it is written is\n"
  "just silly.\n"
  "\n"
  ">  \t};\n"
@@ -572,4 +574,4 @@
  "\n"
  ~Ryan
 
-dc483b358f381af3d5a876d988bf70a08b56b22a78b11029050dae31722f3ce0
+bc32d565a3d7c7347370c2f76d0fb54c3fe916f25bdf97271e60ad39997543c9

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.