All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20191003092913.10731-2-brgl@bgdev.pl>

diff --git a/a/1.txt b/N1/1.txt
index e587f08..ec4afa8 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -91,7 +91,7 @@ index 000000000000..3dfe9f3541bb
 +		  struct platform_device *pdev)
 +{
 +	while (id->name[0]) {
-+		if (strcmp(pdev->name, id->name) = 0) {
++		if (strcmp(pdev->name, id->name) == 0) {
 +			pdev->id_entry = id;
 +			return id;
 +		}
@@ -114,7 +114,7 @@ index 000000000000..3dfe9f3541bb
 +		return platform_match_id(pdrv->id_table, pdev) != NULL;
 +
 +	/* fall-back to driver name match */
-+	return (strcmp(pdev->name, drv->name) = 0);
++	return (strcmp(pdev->name, drv->name) == 0);
 +}
 +
 +#ifdef CONFIG_PM
@@ -166,20 +166,20 @@ index 000000000000..3dfe9f3541bb
 +		list_move(&epdrv->list, &early_platform_driver_list);
 +
 +		/* Allow passing parameters after device name */
-+		if (buf[n] = '\0' || buf[n] = ',')
++		if (buf[n] == '\0' || buf[n] == ',')
 +			epdrv->requested_id = -1;
 +		else {
 +			epdrv->requested_id = simple_strtoul(&buf[n + 1],
 +							     &tmp, 10);
 +
-+			if (buf[n] != '.' || (tmp = &buf[n + 1])) {
++			if (buf[n] != '.' || (tmp == &buf[n + 1])) {
 +				epdrv->requested_id = EARLY_PLATFORM_ID_ERROR;
 +				n = 0;
 +			} else
 +				n += strcspn(&buf[n + 1], ",") + 1;
 +		}
 +
-+		if (buf[n] = ',')
++		if (buf[n] == ',')
 +			n++;
 +
 +		if (epdrv->bufsize) {
@@ -257,7 +257,7 @@ index 000000000000..3dfe9f3541bb
 +
 +	list_for_each_entry(pd, &early_platform_device_list, dev.devres_head)
 +		if (platform_match(&pd->dev, &epdrv->pdrv->driver))
-+			if (pd->id = id)
++			if (pd->id == id)
 +				return pd;
 +
 +	return NULL;
@@ -302,7 +302,7 @@ index 000000000000..3dfe9f3541bb
 +		if (strcmp(class_str, epdrv->class_str))
 +			continue;
 +
-+		if (id = -2) {
++		if (id == -2) {
 +			match_id = epdrv->requested_id;
 +			left = 1;
 +
@@ -316,7 +316,7 @@ index 000000000000..3dfe9f3541bb
 +			case EARLY_PLATFORM_ID_UNSET:
 +				break;
 +			default:
-+				if (epdrv->requested_id = id)
++				if (epdrv->requested_id == id)
 +					match_id = EARLY_PLATFORM_ID_UNSET;
 +			}
 +		}
@@ -341,11 +341,13 @@ index 000000000000..3dfe9f3541bb
 +			 */
 +			if (!match->dev.init_name && slab_is_available()) {
 +				if (match->id != -1)
-+					match->dev.init_name +						kasprintf(GFP_KERNEL, "%s.%d",
++					match->dev.init_name =
++						kasprintf(GFP_KERNEL, "%s.%d",
 +							  match->name,
 +							  match->id);
 +				else
-+					match->dev.init_name +						kasprintf(GFP_KERNEL, "%s",
++					match->dev.init_name =
++						kasprintf(GFP_KERNEL, "%s",
 +							  match->name);
 +
 +				if (!match->dev.init_name)
@@ -912,20 +914,20 @@ index b6c6c7d97d5b..be1e67ee3af6 100644
 -		list_move(&epdrv->list, &early_platform_driver_list);
 -
 -		/* Allow passing parameters after device name */
--		if (buf[n] = '\0' || buf[n] = ',')
+-		if (buf[n] == '\0' || buf[n] == ',')
 -			epdrv->requested_id = -1;
 -		else {
 -			epdrv->requested_id = simple_strtoul(&buf[n + 1],
 -							     &tmp, 10);
 -
--			if (buf[n] != '.' || (tmp = &buf[n + 1])) {
+-			if (buf[n] != '.' || (tmp == &buf[n + 1])) {
 -				epdrv->requested_id = EARLY_PLATFORM_ID_ERROR;
 -				n = 0;
 -			} else
 -				n += strcspn(&buf[n + 1], ",") + 1;
 -		}
 -
--		if (buf[n] = ',')
+-		if (buf[n] == ',')
 -			n++;
 -
 -		if (epdrv->bufsize) {
@@ -1003,7 +1005,7 @@ index b6c6c7d97d5b..be1e67ee3af6 100644
 -
 -	list_for_each_entry(pd, &early_platform_device_list, dev.devres_head)
 -		if (platform_match(&pd->dev, &epdrv->pdrv->driver))
--			if (pd->id = id)
+-			if (pd->id == id)
 -				return pd;
 -
 -	return NULL;
@@ -1048,7 +1050,7 @@ index b6c6c7d97d5b..be1e67ee3af6 100644
 -		if (strcmp(class_str, epdrv->class_str))
 -			continue;
 -
--		if (id = -2) {
+-		if (id == -2) {
 -			match_id = epdrv->requested_id;
 -			left = 1;
 -
@@ -1062,7 +1064,7 @@ index b6c6c7d97d5b..be1e67ee3af6 100644
 -			case EARLY_PLATFORM_ID_UNSET:
 -				break;
 -			default:
--				if (epdrv->requested_id = id)
+-				if (epdrv->requested_id == id)
 -					match_id = EARLY_PLATFORM_ID_UNSET;
 -			}
 -		}
@@ -1087,11 +1089,13 @@ index b6c6c7d97d5b..be1e67ee3af6 100644
 -			 */
 -			if (!match->dev.init_name && slab_is_available()) {
 -				if (match->id != -1)
--					match->dev.init_name -						kasprintf(GFP_KERNEL, "%s.%d",
+-					match->dev.init_name =
+-						kasprintf(GFP_KERNEL, "%s.%d",
 -							  match->name,
 -							  match->id);
 -				else
--					match->dev.init_name -						kasprintf(GFP_KERNEL, "%s",
+-					match->dev.init_name =
+-						kasprintf(GFP_KERNEL, "%s",
 -							  match->name);
 -
 -				if (!match->dev.init_name)
diff --git a/a/content_digest b/N1/content_digest
index 424c5a4..30d5faf 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,7 +1,7 @@
  "ref\020191003092913.10731-1-brgl@bgdev.pl\0"
  "From\0Bartosz Golaszewski <brgl@bgdev.pl>\0"
  "Subject\0[PATCH v4 1/2] drivers: move the early platform device support to arch/sh\0"
- "Date\0Thu, 03 Oct 2019 09:29:12 +0000\0"
+ "Date\0Thu,  3 Oct 2019 11:29:12 +0200\0"
  "To\0Yoshinori Sato <ysato@users.sourceforge.jp>"
   Rich Felker <dalias@libc.org>
   Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@@ -108,7 +108,7 @@
  "+\t\t  struct platform_device *pdev)\n"
  "+{\n"
  "+\twhile (id->name[0]) {\n"
- "+\t\tif (strcmp(pdev->name, id->name) = 0) {\n"
+ "+\t\tif (strcmp(pdev->name, id->name) == 0) {\n"
  "+\t\t\tpdev->id_entry = id;\n"
  "+\t\t\treturn id;\n"
  "+\t\t}\n"
@@ -131,7 +131,7 @@
  "+\t\treturn platform_match_id(pdrv->id_table, pdev) != NULL;\n"
  "+\n"
  "+\t/* fall-back to driver name match */\n"
- "+\treturn (strcmp(pdev->name, drv->name) = 0);\n"
+ "+\treturn (strcmp(pdev->name, drv->name) == 0);\n"
  "+}\n"
  "+\n"
  "+#ifdef CONFIG_PM\n"
@@ -183,20 +183,20 @@
  "+\t\tlist_move(&epdrv->list, &early_platform_driver_list);\n"
  "+\n"
  "+\t\t/* Allow passing parameters after device name */\n"
- "+\t\tif (buf[n] = '\\0' || buf[n] = ',')\n"
+ "+\t\tif (buf[n] == '\\0' || buf[n] == ',')\n"
  "+\t\t\tepdrv->requested_id = -1;\n"
  "+\t\telse {\n"
  "+\t\t\tepdrv->requested_id = simple_strtoul(&buf[n + 1],\n"
  "+\t\t\t\t\t\t\t     &tmp, 10);\n"
  "+\n"
- "+\t\t\tif (buf[n] != '.' || (tmp = &buf[n + 1])) {\n"
+ "+\t\t\tif (buf[n] != '.' || (tmp == &buf[n + 1])) {\n"
  "+\t\t\t\tepdrv->requested_id = EARLY_PLATFORM_ID_ERROR;\n"
  "+\t\t\t\tn = 0;\n"
  "+\t\t\t} else\n"
  "+\t\t\t\tn += strcspn(&buf[n + 1], \",\") + 1;\n"
  "+\t\t}\n"
  "+\n"
- "+\t\tif (buf[n] = ',')\n"
+ "+\t\tif (buf[n] == ',')\n"
  "+\t\t\tn++;\n"
  "+\n"
  "+\t\tif (epdrv->bufsize) {\n"
@@ -274,7 +274,7 @@
  "+\n"
  "+\tlist_for_each_entry(pd, &early_platform_device_list, dev.devres_head)\n"
  "+\t\tif (platform_match(&pd->dev, &epdrv->pdrv->driver))\n"
- "+\t\t\tif (pd->id = id)\n"
+ "+\t\t\tif (pd->id == id)\n"
  "+\t\t\t\treturn pd;\n"
  "+\n"
  "+\treturn NULL;\n"
@@ -319,7 +319,7 @@
  "+\t\tif (strcmp(class_str, epdrv->class_str))\n"
  "+\t\t\tcontinue;\n"
  "+\n"
- "+\t\tif (id = -2) {\n"
+ "+\t\tif (id == -2) {\n"
  "+\t\t\tmatch_id = epdrv->requested_id;\n"
  "+\t\t\tleft = 1;\n"
  "+\n"
@@ -333,7 +333,7 @@
  "+\t\t\tcase EARLY_PLATFORM_ID_UNSET:\n"
  "+\t\t\t\tbreak;\n"
  "+\t\t\tdefault:\n"
- "+\t\t\t\tif (epdrv->requested_id = id)\n"
+ "+\t\t\t\tif (epdrv->requested_id == id)\n"
  "+\t\t\t\t\tmatch_id = EARLY_PLATFORM_ID_UNSET;\n"
  "+\t\t\t}\n"
  "+\t\t}\n"
@@ -358,11 +358,13 @@
  "+\t\t\t */\n"
  "+\t\t\tif (!match->dev.init_name && slab_is_available()) {\n"
  "+\t\t\t\tif (match->id != -1)\n"
- "+\t\t\t\t\tmatch->dev.init_name +\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s.%d\",\n"
+ "+\t\t\t\t\tmatch->dev.init_name =\n"
+ "+\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s.%d\",\n"
  "+\t\t\t\t\t\t\t  match->name,\n"
  "+\t\t\t\t\t\t\t  match->id);\n"
  "+\t\t\t\telse\n"
- "+\t\t\t\t\tmatch->dev.init_name +\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s\",\n"
+ "+\t\t\t\t\tmatch->dev.init_name =\n"
+ "+\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s\",\n"
  "+\t\t\t\t\t\t\t  match->name);\n"
  "+\n"
  "+\t\t\t\tif (!match->dev.init_name)\n"
@@ -929,20 +931,20 @@
  "-\t\tlist_move(&epdrv->list, &early_platform_driver_list);\n"
  "-\n"
  "-\t\t/* Allow passing parameters after device name */\n"
- "-\t\tif (buf[n] = '\\0' || buf[n] = ',')\n"
+ "-\t\tif (buf[n] == '\\0' || buf[n] == ',')\n"
  "-\t\t\tepdrv->requested_id = -1;\n"
  "-\t\telse {\n"
  "-\t\t\tepdrv->requested_id = simple_strtoul(&buf[n + 1],\n"
  "-\t\t\t\t\t\t\t     &tmp, 10);\n"
  "-\n"
- "-\t\t\tif (buf[n] != '.' || (tmp = &buf[n + 1])) {\n"
+ "-\t\t\tif (buf[n] != '.' || (tmp == &buf[n + 1])) {\n"
  "-\t\t\t\tepdrv->requested_id = EARLY_PLATFORM_ID_ERROR;\n"
  "-\t\t\t\tn = 0;\n"
  "-\t\t\t} else\n"
  "-\t\t\t\tn += strcspn(&buf[n + 1], \",\") + 1;\n"
  "-\t\t}\n"
  "-\n"
- "-\t\tif (buf[n] = ',')\n"
+ "-\t\tif (buf[n] == ',')\n"
  "-\t\t\tn++;\n"
  "-\n"
  "-\t\tif (epdrv->bufsize) {\n"
@@ -1020,7 +1022,7 @@
  "-\n"
  "-\tlist_for_each_entry(pd, &early_platform_device_list, dev.devres_head)\n"
  "-\t\tif (platform_match(&pd->dev, &epdrv->pdrv->driver))\n"
- "-\t\t\tif (pd->id = id)\n"
+ "-\t\t\tif (pd->id == id)\n"
  "-\t\t\t\treturn pd;\n"
  "-\n"
  "-\treturn NULL;\n"
@@ -1065,7 +1067,7 @@
  "-\t\tif (strcmp(class_str, epdrv->class_str))\n"
  "-\t\t\tcontinue;\n"
  "-\n"
- "-\t\tif (id = -2) {\n"
+ "-\t\tif (id == -2) {\n"
  "-\t\t\tmatch_id = epdrv->requested_id;\n"
  "-\t\t\tleft = 1;\n"
  "-\n"
@@ -1079,7 +1081,7 @@
  "-\t\t\tcase EARLY_PLATFORM_ID_UNSET:\n"
  "-\t\t\t\tbreak;\n"
  "-\t\t\tdefault:\n"
- "-\t\t\t\tif (epdrv->requested_id = id)\n"
+ "-\t\t\t\tif (epdrv->requested_id == id)\n"
  "-\t\t\t\t\tmatch_id = EARLY_PLATFORM_ID_UNSET;\n"
  "-\t\t\t}\n"
  "-\t\t}\n"
@@ -1104,11 +1106,13 @@
  "-\t\t\t */\n"
  "-\t\t\tif (!match->dev.init_name && slab_is_available()) {\n"
  "-\t\t\t\tif (match->id != -1)\n"
- "-\t\t\t\t\tmatch->dev.init_name -\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s.%d\",\n"
+ "-\t\t\t\t\tmatch->dev.init_name =\n"
+ "-\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s.%d\",\n"
  "-\t\t\t\t\t\t\t  match->name,\n"
  "-\t\t\t\t\t\t\t  match->id);\n"
  "-\t\t\t\telse\n"
- "-\t\t\t\t\tmatch->dev.init_name -\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s\",\n"
+ "-\t\t\t\t\tmatch->dev.init_name =\n"
+ "-\t\t\t\t\t\tkasprintf(GFP_KERNEL, \"%s\",\n"
  "-\t\t\t\t\t\t\t  match->name);\n"
  "-\n"
  "-\t\t\t\tif (!match->dev.init_name)\n"
@@ -1396,4 +1400,4 @@
  "-- \n"
  2.23.0
 
-0e3911d205bd97d22f2262e1a3f99c44ca53779a315943917a06b76f328c6ef9
+da15ba8f8d97e97908a71632fd6df2d3358708a1e7a680ecff1ca6ad7b2efcf6

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.