All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20181204165105.GA16291@nishad>

diff --git a/a/1.txt b/N1/1.txt
index a5f0ffa..4433120 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -62,7 +62,7 @@ index f6f30f5bf15a..8f27bd8da17d 100644
  
  static void reset(struct fbtft_par *par)
  {
--	if (par->gpio.reset = -1)
+-	if (par->gpio.reset == -1)
 +	if (!par->gpio.reset)
  		return;
  
@@ -113,17 +113,17 @@ index f6f30f5bf15a..8f27bd8da17d 100644
  			"Missing info about 'rw' gpio. Aborting.\n");
  		return -EINVAL;
 @@ -139,22 +139,22 @@ request_gpios_match(struct fbtft_par *par, const struct fbtft_gpio *gpio)
- 	if (strcasecmp(gpio->name, "wr") = 0) {
+ 	if (strcasecmp(gpio->name, "wr") == 0) {
  		/* left ks0108 E pin */
  		par->EPIN = gpio->gpio;
 -		return GPIOF_OUT_INIT_LOW;
 +		return GPIOD_OUT_LOW;
- 	} else if (strcasecmp(gpio->name, "cs0") = 0) {
+ 	} else if (strcasecmp(gpio->name, "cs0") == 0) {
  		/* left ks0108 controller pin */
  		par->CS0 = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
 +		return GPIOD_OUT_HIGH;
- 	} else if (strcasecmp(gpio->name, "cs1") = 0) {
+ 	} else if (strcasecmp(gpio->name, "cs1") == 0) {
  		/* right ks0108 controller pin */
  		par->CS1 = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
@@ -132,7 +132,7 @@ index f6f30f5bf15a..8f27bd8da17d 100644
  
  	/* if write (rw = 0) e(1->0) perform write */
  	/* if read (rw = 1) e(0->1) set data on D0-7*/
- 	else if (strcasecmp(gpio->name, "rw") = 0) {
+ 	else if (strcasecmp(gpio->name, "rw") == 0) {
  		par->RW = gpio->gpio;
 -		return GPIOF_OUT_INIT_LOW;
 +		return GPIOD_OUT_LOW;
@@ -733,34 +733,34 @@ index a2df02d97a8e..de3f431abc15 100644
 -	fbtft_par_dbg(DEBUG_REQUEST_GPIOS_MATCH, par, "%s('%s')\n",
 -		      __func__, gpio->name);
 -
--	if (strcasecmp(gpio->name, "reset") = 0) {
+-	if (strcasecmp(gpio->name, "reset") == 0) {
 -		par->gpio.reset = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
--	} else if (strcasecmp(gpio->name, "dc") = 0) {
+-	} else if (strcasecmp(gpio->name, "dc") == 0) {
 -		par->gpio.dc = gpio->gpio;
 -		return GPIOF_OUT_INIT_LOW;
--	} else if (strcasecmp(gpio->name, "cs") = 0) {
+-	} else if (strcasecmp(gpio->name, "cs") == 0) {
 -		par->gpio.cs = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
--	} else if (strcasecmp(gpio->name, "wr") = 0) {
+-	} else if (strcasecmp(gpio->name, "wr") == 0) {
 -		par->gpio.wr = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
--	} else if (strcasecmp(gpio->name, "rd") = 0) {
+-	} else if (strcasecmp(gpio->name, "rd") == 0) {
 -		par->gpio.rd = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
--	} else if (strcasecmp(gpio->name, "latch") = 0) {
+-	} else if (strcasecmp(gpio->name, "latch") == 0) {
 -		par->gpio.latch = gpio->gpio;
 -		return GPIOF_OUT_INIT_LOW;
--	} else if (gpio->name[0] = 'd' && gpio->name[1] = 'b') {
+-	} else if (gpio->name[0] == 'd' && gpio->name[1] == 'b') {
 -		ret = kstrtouint(&gpio->name[2], 10, &val);
--		if (ret = 0 && val < 16) {
+-		if (ret == 0 && val < 16) {
 -			par->gpio.db[val] = gpio->gpio;
 -			return GPIOF_OUT_INIT_LOW;
 -		}
--	} else if (strcasecmp(gpio->name, "led") = 0) {
+-	} else if (strcasecmp(gpio->name, "led") == 0) {
 -		par->gpio.led[0] = gpio->gpio;
 -		return GPIOF_OUT_INIT_LOW;
--	} else if (strcasecmp(gpio->name, "led_") = 0) {
+-	} else if (strcasecmp(gpio->name, "led_") == 0) {
 -		par->gpio.led[0] = gpio->gpio;
 -		return GPIOF_OUT_INIT_HIGH;
 -	}
@@ -786,7 +786,7 @@ index a2df02d97a8e..de3f431abc15 100644
 -		 */
 -		if (par->fbtftops.request_gpios_match)
 -			flags = par->fbtftops.request_gpios_match(par, gpio);
--		if (flags = FBTFT_GPIO_NO_MATCH)
+-		if (flags == FBTFT_GPIO_NO_MATCH)
 -			flags = fbtft_request_gpios_match(par, gpio);
 -		if (flags != FBTFT_GPIO_NO_MATCH) {
 -			ret = devm_gpio_request_one(par->info->device,
@@ -823,9 +823,9 @@ index a2df02d97a8e..de3f431abc15 100644
  
  	if (of_find_property(node, name, NULL)) {
 -		gpio = of_get_named_gpio_flags(node, name, index, &of_flags);
--		if (gpio = -ENOENT)
+-		if (gpio == -ENOENT)
 -			return 0;
--		if (gpio = -EPROBE_DEFER)
+-		if (gpio == -EPROBE_DEFER)
 -			return gpio;
 -		if (gpio < 0) {
 +		*gpiop = devm_gpiod_get_index(dev, dev->driver->name, index,
@@ -861,8 +861,8 @@ index a2df02d97a8e..de3f431abc15 100644
  	return ret;
 @@ -254,9 +153,9 @@ static int fbtft_backlight_update_status(struct backlight_device *bd)
  
- 	if ((bd->props.power = FB_BLANK_UNBLANK) &&
- 	    (bd->props.fb_blank = FB_BLANK_UNBLANK))
+ 	if ((bd->props.power == FB_BLANK_UNBLANK) &&
+ 	    (bd->props.fb_blank == FB_BLANK_UNBLANK))
 -		gpio_set_value(par->gpio.led[0], polarity);
 +		gpiod_set_value(par->gpio.led[0], polarity);
  	else
@@ -875,7 +875,7 @@ index a2df02d97a8e..de3f431abc15 100644
  	struct backlight_device *bd;
  	struct backlight_properties bl_props = { 0, };
  
--	if (par->gpio.led[0] = -1) {
+-	if (par->gpio.led[0] == -1) {
 +	if (!par->gpio.led[0]) {
  		fbtft_par_dbg(DEBUG_BACKLIGHT, par,
  			      "%s(): led pin not set, exiting.\n", __func__);
@@ -893,7 +893,7 @@ index a2df02d97a8e..de3f431abc15 100644
  
  static void fbtft_reset(struct fbtft_par *par)
  {
--	if (par->gpio.reset = -1)
+-	if (par->gpio.reset == -1)
 +	if (!par->gpio.reset)
  		return;
  	fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
@@ -967,7 +967,7 @@ index a2df02d97a8e..de3f431abc15 100644
 @@ -1227,7 +1112,7 @@ static int fbtft_verify_gpios(struct fbtft_par *par)
  	fbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, "%s()\n", __func__);
  
- 	if (pdata->display.buswidth != 9 &&  par->startbyte = 0 &&
+ 	if (pdata->display.buswidth != 9 &&  par->startbyte == 0 &&
 -	    par->gpio.dc < 0) {
 +	    !par->gpio.dc) {
  		dev_err(par->info->device,
@@ -1010,7 +1010,7 @@ index b5051d3d46a6..38cdad6203ea 100644
  
  		/* Set data */
  #ifndef DO_NOT_OPTIMIZE_FBTFT_WRITE_GPIO
- 		if (data = prev_data) {
+ 		if (data == prev_data) {
 -			gpio_set_value(par->gpio.wr, 0); /* used as delay */
 +			gpiod_set_value(par->gpio.wr, 0); /* used as delay */
  		} else {
@@ -1047,7 +1047,7 @@ index b5051d3d46a6..38cdad6203ea 100644
  
  		/* Set data */
  #ifndef DO_NOT_OPTIMIZE_FBTFT_WRITE_GPIO
- 		if (data = prev_data) {
+ 		if (data == prev_data) {
 -			gpio_set_value(par->gpio.wr, 0); /* used as delay */
 +			gpiod_set_value(par->gpio.wr, 0); /* used as delay */
  		} else {
@@ -1784,7 +1784,7 @@ index 50e97da993e7..1917712cda90 100644
  
  		/* Set data */
  #ifndef DO_NOT_OPTIMIZE_FBTFT_WRITE_GPIO
- 		if (data = prev_data) {
+ 		if (data == prev_data) {
 -			gpio_set_value(par->gpio.wr, 0); /* used as delay */
 +			gpiod_set_value(par->gpio.wr, 0); /* used as delay */
  		} else {
@@ -1861,7 +1861,7 @@ index 50e97da993e7..1917712cda90 100644
 -		strncpy(fbtft_device_param_gpios[i].name, p_name,
 -			FBTFT_GPIO_NAME_SIZE - 1);
 -		fbtft_device_param_gpios[i++].gpio = (int)val;
--		if (i = MAX_GPIOS) {
+-		if (i == MAX_GPIOS) {
 -			pr_err("gpios parameter: exceeded max array size: %d\n",
 -			       MAX_GPIOS);
 -			return -EINVAL;
diff --git a/a/content_digest b/N1/content_digest
index e8dbef6..623dafe 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,6 +1,6 @@
  "From\0Nishad Kamdar <nishadkamdar@gmail.com>\0"
  "Subject\0[PATCH v2] Staging: fbtft: Switch to the gpio descriptor interface\0"
- "Date\0Tue, 04 Dec 2018 16:51:30 +0000\0"
+ "Date\0Tue, 4 Dec 2018 22:21:12 +0530\0"
  "To\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
  " Dan Carpenter <dan.carpenter@oracle.com>\0"
  "Cc\0devel@driverdev.osuosl.org"
@@ -73,7 +73,7 @@
  " \n"
  " static void reset(struct fbtft_par *par)\n"
  " {\n"
- "-\tif (par->gpio.reset = -1)\n"
+ "-\tif (par->gpio.reset == -1)\n"
  "+\tif (!par->gpio.reset)\n"
  " \t\treturn;\n"
  " \n"
@@ -124,17 +124,17 @@
  " \t\t\t\"Missing info about 'rw' gpio. Aborting.\\n\");\n"
  " \t\treturn -EINVAL;\n"
  "@@ -139,22 +139,22 @@ request_gpios_match(struct fbtft_par *par, const struct fbtft_gpio *gpio)\n"
- " \tif (strcasecmp(gpio->name, \"wr\") = 0) {\n"
+ " \tif (strcasecmp(gpio->name, \"wr\") == 0) {\n"
  " \t\t/* left ks0108 E pin */\n"
  " \t\tpar->EPIN = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_LOW;\n"
  "+\t\treturn GPIOD_OUT_LOW;\n"
- " \t} else if (strcasecmp(gpio->name, \"cs0\") = 0) {\n"
+ " \t} else if (strcasecmp(gpio->name, \"cs0\") == 0) {\n"
  " \t\t/* left ks0108 controller pin */\n"
  " \t\tpar->CS0 = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
  "+\t\treturn GPIOD_OUT_HIGH;\n"
- " \t} else if (strcasecmp(gpio->name, \"cs1\") = 0) {\n"
+ " \t} else if (strcasecmp(gpio->name, \"cs1\") == 0) {\n"
  " \t\t/* right ks0108 controller pin */\n"
  " \t\tpar->CS1 = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
@@ -143,7 +143,7 @@
  " \n"
  " \t/* if write (rw = 0) e(1->0) perform write */\n"
  " \t/* if read (rw = 1) e(0->1) set data on D0-7*/\n"
- " \telse if (strcasecmp(gpio->name, \"rw\") = 0) {\n"
+ " \telse if (strcasecmp(gpio->name, \"rw\") == 0) {\n"
  " \t\tpar->RW = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_LOW;\n"
  "+\t\treturn GPIOD_OUT_LOW;\n"
@@ -744,34 +744,34 @@
  "-\tfbtft_par_dbg(DEBUG_REQUEST_GPIOS_MATCH, par, \"%s('%s')\\n\",\n"
  "-\t\t      __func__, gpio->name);\n"
  "-\n"
- "-\tif (strcasecmp(gpio->name, \"reset\") = 0) {\n"
+ "-\tif (strcasecmp(gpio->name, \"reset\") == 0) {\n"
  "-\t\tpar->gpio.reset = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
- "-\t} else if (strcasecmp(gpio->name, \"dc\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"dc\") == 0) {\n"
  "-\t\tpar->gpio.dc = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_LOW;\n"
- "-\t} else if (strcasecmp(gpio->name, \"cs\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"cs\") == 0) {\n"
  "-\t\tpar->gpio.cs = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
- "-\t} else if (strcasecmp(gpio->name, \"wr\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"wr\") == 0) {\n"
  "-\t\tpar->gpio.wr = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
- "-\t} else if (strcasecmp(gpio->name, \"rd\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"rd\") == 0) {\n"
  "-\t\tpar->gpio.rd = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
- "-\t} else if (strcasecmp(gpio->name, \"latch\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"latch\") == 0) {\n"
  "-\t\tpar->gpio.latch = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_LOW;\n"
- "-\t} else if (gpio->name[0] = 'd' && gpio->name[1] = 'b') {\n"
+ "-\t} else if (gpio->name[0] == 'd' && gpio->name[1] == 'b') {\n"
  "-\t\tret = kstrtouint(&gpio->name[2], 10, &val);\n"
- "-\t\tif (ret = 0 && val < 16) {\n"
+ "-\t\tif (ret == 0 && val < 16) {\n"
  "-\t\t\tpar->gpio.db[val] = gpio->gpio;\n"
  "-\t\t\treturn GPIOF_OUT_INIT_LOW;\n"
  "-\t\t}\n"
- "-\t} else if (strcasecmp(gpio->name, \"led\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"led\") == 0) {\n"
  "-\t\tpar->gpio.led[0] = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_LOW;\n"
- "-\t} else if (strcasecmp(gpio->name, \"led_\") = 0) {\n"
+ "-\t} else if (strcasecmp(gpio->name, \"led_\") == 0) {\n"
  "-\t\tpar->gpio.led[0] = gpio->gpio;\n"
  "-\t\treturn GPIOF_OUT_INIT_HIGH;\n"
  "-\t}\n"
@@ -797,7 +797,7 @@
  "-\t\t */\n"
  "-\t\tif (par->fbtftops.request_gpios_match)\n"
  "-\t\t\tflags = par->fbtftops.request_gpios_match(par, gpio);\n"
- "-\t\tif (flags = FBTFT_GPIO_NO_MATCH)\n"
+ "-\t\tif (flags == FBTFT_GPIO_NO_MATCH)\n"
  "-\t\t\tflags = fbtft_request_gpios_match(par, gpio);\n"
  "-\t\tif (flags != FBTFT_GPIO_NO_MATCH) {\n"
  "-\t\t\tret = devm_gpio_request_one(par->info->device,\n"
@@ -834,9 +834,9 @@
  " \n"
  " \tif (of_find_property(node, name, NULL)) {\n"
  "-\t\tgpio = of_get_named_gpio_flags(node, name, index, &of_flags);\n"
- "-\t\tif (gpio = -ENOENT)\n"
+ "-\t\tif (gpio == -ENOENT)\n"
  "-\t\t\treturn 0;\n"
- "-\t\tif (gpio = -EPROBE_DEFER)\n"
+ "-\t\tif (gpio == -EPROBE_DEFER)\n"
  "-\t\t\treturn gpio;\n"
  "-\t\tif (gpio < 0) {\n"
  "+\t\t*gpiop = devm_gpiod_get_index(dev, dev->driver->name, index,\n"
@@ -872,8 +872,8 @@
  " \treturn ret;\n"
  "@@ -254,9 +153,9 @@ static int fbtft_backlight_update_status(struct backlight_device *bd)\n"
  " \n"
- " \tif ((bd->props.power = FB_BLANK_UNBLANK) &&\n"
- " \t    (bd->props.fb_blank = FB_BLANK_UNBLANK))\n"
+ " \tif ((bd->props.power == FB_BLANK_UNBLANK) &&\n"
+ " \t    (bd->props.fb_blank == FB_BLANK_UNBLANK))\n"
  "-\t\tgpio_set_value(par->gpio.led[0], polarity);\n"
  "+\t\tgpiod_set_value(par->gpio.led[0], polarity);\n"
  " \telse\n"
@@ -886,7 +886,7 @@
  " \tstruct backlight_device *bd;\n"
  " \tstruct backlight_properties bl_props = { 0, };\n"
  " \n"
- "-\tif (par->gpio.led[0] = -1) {\n"
+ "-\tif (par->gpio.led[0] == -1) {\n"
  "+\tif (!par->gpio.led[0]) {\n"
  " \t\tfbtft_par_dbg(DEBUG_BACKLIGHT, par,\n"
  " \t\t\t      \"%s(): led pin not set, exiting.\\n\", __func__);\n"
@@ -904,7 +904,7 @@
  " \n"
  " static void fbtft_reset(struct fbtft_par *par)\n"
  " {\n"
- "-\tif (par->gpio.reset = -1)\n"
+ "-\tif (par->gpio.reset == -1)\n"
  "+\tif (!par->gpio.reset)\n"
  " \t\treturn;\n"
  " \tfbtft_par_dbg(DEBUG_RESET, par, \"%s()\\n\", __func__);\n"
@@ -978,7 +978,7 @@
  "@@ -1227,7 +1112,7 @@ static int fbtft_verify_gpios(struct fbtft_par *par)\n"
  " \tfbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, \"%s()\\n\", __func__);\n"
  " \n"
- " \tif (pdata->display.buswidth != 9 &&  par->startbyte = 0 &&\n"
+ " \tif (pdata->display.buswidth != 9 &&  par->startbyte == 0 &&\n"
  "-\t    par->gpio.dc < 0) {\n"
  "+\t    !par->gpio.dc) {\n"
  " \t\tdev_err(par->info->device,\n"
@@ -1021,7 +1021,7 @@
  " \n"
  " \t\t/* Set data */\n"
  " #ifndef DO_NOT_OPTIMIZE_FBTFT_WRITE_GPIO\n"
- " \t\tif (data = prev_data) {\n"
+ " \t\tif (data == prev_data) {\n"
  "-\t\t\tgpio_set_value(par->gpio.wr, 0); /* used as delay */\n"
  "+\t\t\tgpiod_set_value(par->gpio.wr, 0); /* used as delay */\n"
  " \t\t} else {\n"
@@ -1058,7 +1058,7 @@
  " \n"
  " \t\t/* Set data */\n"
  " #ifndef DO_NOT_OPTIMIZE_FBTFT_WRITE_GPIO\n"
- " \t\tif (data = prev_data) {\n"
+ " \t\tif (data == prev_data) {\n"
  "-\t\t\tgpio_set_value(par->gpio.wr, 0); /* used as delay */\n"
  "+\t\t\tgpiod_set_value(par->gpio.wr, 0); /* used as delay */\n"
  " \t\t} else {\n"
@@ -1795,7 +1795,7 @@
  " \n"
  " \t\t/* Set data */\n"
  " #ifndef DO_NOT_OPTIMIZE_FBTFT_WRITE_GPIO\n"
- " \t\tif (data = prev_data) {\n"
+ " \t\tif (data == prev_data) {\n"
  "-\t\t\tgpio_set_value(par->gpio.wr, 0); /* used as delay */\n"
  "+\t\t\tgpiod_set_value(par->gpio.wr, 0); /* used as delay */\n"
  " \t\t} else {\n"
@@ -1872,7 +1872,7 @@
  "-\t\tstrncpy(fbtft_device_param_gpios[i].name, p_name,\n"
  "-\t\t\tFBTFT_GPIO_NAME_SIZE - 1);\n"
  "-\t\tfbtft_device_param_gpios[i++].gpio = (int)val;\n"
- "-\t\tif (i = MAX_GPIOS) {\n"
+ "-\t\tif (i == MAX_GPIOS) {\n"
  "-\t\t\tpr_err(\"gpios parameter: exceeded max array size: %d\\n\",\n"
  "-\t\t\t       MAX_GPIOS);\n"
  "-\t\t\treturn -EINVAL;\n"
@@ -1965,4 +1965,4 @@
  "-- \n"
  2.17.1
 
-f09c201d91201825b07d531a93038f9f074fefdb703ec10fd0d249494f7a2867
+2802d723e3cf5fbeff2e2c2d397d77ad079c2c7ca56ef17b2b9dbbd00bae02df

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.