All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20150219124920.GA20085@sloth>

diff --git a/a/1.txt b/N1/1.txt
index a743c45..95413ee 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -11,7 +11,7 @@ constant char[] c;
 @@
 
 e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(...);
-if (e = NULL) {
+if (e == NULL) {
   <+...
 -  print(...,c,...);
   ... when any
@@ -62,11 +62,11 @@ index e6ecea5..e7af285 100644
  	}
  
  	cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
--	if (cmdrsp = NULL) {
+-	if (cmdrsp == NULL) {
 -		LOGERR("kmalloc of cmdrsp failed.\n");
 -		return FAILED;	/* reject */
 -	}
-+	if (cmdrsp = NULL)
++	if (cmdrsp == NULL)
 +		return FAILED;  /* reject */
  
  	init_waitqueue_head(&notifyevent);
@@ -75,11 +75,11 @@ index e6ecea5..e7af285 100644
  	}
  
  	cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
--	if (cmdrsp = NULL) {
+-	if (cmdrsp == NULL) {
 -		LOGERR("kmalloc of cmdrsp failed.\n");
 -		return FAILED;	/* reject */
 -	}
-+	if (cmdrsp = NULL)
++	if (cmdrsp == NULL)
 +		return FAILED;  /* reject */
  
  	init_waitqueue_head(&notifyevent);
@@ -88,9 +88,9 @@ index e6ecea5..e7af285 100644
  	}
  
  	cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
--	if (cmdrsp = NULL) {
+-	if (cmdrsp == NULL) {
 -		LOGERR("kmalloc of cmdrsp failed.\n");
-+	if (cmdrsp = NULL)
++	if (cmdrsp == NULL)
  		return 1;	/* reject the command */
 -	}
  
@@ -111,7 +111,7 @@ index e6ecea5..e7af285 100644
 @@ -1342,7 +1334,6 @@ process_incoming_rsps(void *v)
  	/* alloc once and reuse */
  	cmdrsp = kmalloc(SZ, GFP_ATOMIC);
- 	if (cmdrsp = NULL) {
+ 	if (cmdrsp == NULL) {
 -		LOGERR("process_incoming_rsps ****FAILED to malloc - thread exiting\n");
  		complete_and_exit(&dc->threadinfo.has_stopped, 0);
  		return 0;
@@ -123,7 +123,7 @@ index 8fdfd6f..edaf43f 100644
 @@ -931,7 +931,6 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
  	/* add a Virtual Device */
  	virtpcidev = kzalloc(sizeof(*virtpcidev), GFP_ATOMIC);
- 	if (virtpcidev = NULL) {
+ 	if (virtpcidev == NULL) {
 -		LOGERR("can't add device - malloc FALLED\n");
  		POSTCODE_LINUX_2(MALLOC_FAILURE_PC, POSTCODE_SEVERITY_ERR);
  		return 0;
@@ -135,7 +135,7 @@ index 0188ef8..90cea7d 100644
 @@ -59,7 +59,6 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,
  
  	p = kmalloc(sizeof(*p), GFP_KERNEL|__GFP_NORETRY);
- 	if (p = NULL) {
+ 	if (p == NULL) {
 -		ERRDRV("allocation failed: (status=0)\n");
  		rc = NULL;
  		goto cleanup;
@@ -147,7 +147,7 @@ index 9edbd3b..686fe64 100644
 @@ -69,8 +69,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,
  	}
  	ctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY);
- 	if (ctx = NULL) {
+ 	if (ctx == NULL) {
 -		ERRDRV("%s (%s:%d) - failed to allocate %d bytes",
 -		       __func__, __FILE__, __LINE__, allocbytes);
  		if (tryAgain)
@@ -160,7 +160,7 @@ index f606ee9..6f55195 100644
 @@ -1118,8 +1118,6 @@ bus_create(struct controlvm_message *inmsg)
  	}
  	pBusInfo = kzalloc(sizeof(struct visorchipset_bus_info), GFP_KERNEL);
- 	if (pBusInfo = NULL) {
+ 	if (pBusInfo == NULL) {
 -		LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu kzalloc failed",
 -		       busNo);
  		POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
@@ -169,7 +169,7 @@ index f606ee9..6f55195 100644
 @@ -1268,8 +1266,6 @@ my_device_create(struct controlvm_message *inmsg)
  	}
  	pDevInfo = kzalloc(sizeof(struct visorchipset_device_info), GFP_KERNEL);
- 	if (pDevInfo = NULL) {
+ 	if (pDevInfo == NULL) {
 -		LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu kmaloc failed",
 -		     busNo, devNo);
  		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
@@ -183,9 +183,9 @@ index 33522cc..cd0b88c 100644
  		return NULL;
  	}
  	memregion = kzalloc(sizeof(*memregion), GFP_KERNEL|__GFP_NORETRY);
--	if (memregion = NULL) {
+-	if (memregion == NULL) {
 -		ERRDRV("%s allocation failed", __func__);
-+	if (memregion = NULL)
++	if (memregion == NULL)
  		return NULL;
 -	}
  
@@ -199,9 +199,9 @@ index 82279ca..0672e8c 100644
  		goto Away;
  	}
  	type = kzalloc(sizeof(MYPROCTYPE), GFP_KERNEL | __GFP_NORETRY);
--	if (type = NULL) {
+-	if (type == NULL) {
 -		ERRDRV("out of memory\n");
-+	if (type = NULL)
++	if (type == NULL)
  		goto Away;
 -	}
  	type->name = name;
@@ -211,9 +211,9 @@ index 82279ca..0672e8c 100644
  	type->procDirs = kzalloc((type->nNames + 1) *
  				 sizeof(struct proc_dir_entry *),
  				 GFP_KERNEL | __GFP_NORETRY);
--	if (type->procDirs = NULL) {
+-	if (type->procDirs == NULL) {
 -		ERRDRV("out of memory\n");
-+	if (type->procDirs = NULL)
++	if (type->procDirs == NULL)
  		goto Away;
 -	}
  	parent = procDirRoot;
@@ -223,17 +223,17 @@ index 82279ca..0672e8c 100644
  		goto Away;
  	}
  	obj = kzalloc(sizeof(MYPROCOBJECT), GFP_KERNEL | __GFP_NORETRY);
--	if (obj = NULL) {
+-	if (obj == NULL) {
 -		ERRDRV("out of memory\n");
-+	if (obj = NULL)
++	if (obj == NULL)
  		goto Away;
 -	}
  	obj->type = type;
  	obj->context = context;
- 	if (name = NULL) {
+ 	if (name == NULL) {
 @@ -245,7 +239,6 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,
  		obj->name = kmalloc(obj->namesize, GFP_KERNEL | __GFP_NORETRY);
- 		if (obj->name = NULL) {
+ 		if (obj->name == NULL) {
  			obj->namesize = 0;
 -			ERRDRV("out of memory\n");
  			goto Away;
@@ -243,17 +243,17 @@ index 82279ca..0672e8c 100644
  		kzalloc((type->nProperties + 1) *
  			sizeof(struct proc_dir_entry_context),
  			GFP_KERNEL | __GFP_NORETRY);
--	if (obj->procDirPropertyContexts = NULL) {
+-	if (obj->procDirPropertyContexts == NULL) {
 -		ERRDRV("out of memory\n");
-+	if (obj->procDirPropertyContexts = NULL)
++	if (obj->procDirPropertyContexts == NULL)
  		goto Away;
 -	}
  	obj->procDirProperties = kzalloc((type->nProperties + 1) *
  					 sizeof(struct proc_dir_entry *),
  					 GFP_KERNEL | __GFP_NORETRY);
--	if (obj->procDirProperties = NULL) {
+-	if (obj->procDirProperties == NULL) {
 -		ERRDRV("out of memory\n");
-+	if (obj->procDirProperties = NULL)
++	if (obj->procDirProperties == NULL)
  		goto Away;
 -	}
  	for (i = 0; i < type->nProperties; i++) {
diff --git a/a/content_digest b/N1/content_digest
index 5509295..27f26c0 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,6 +1,6 @@
  "From\0Quentin Lambert <lambert.quentin@gmail.com>\0"
  "Subject\0[PATCH 1/1] staging: unisys: Remove unnecessary OOM message\0"
- "Date\0Thu, 19 Feb 2015 12:49:20 +0000\0"
+ "Date\0Thu, 19 Feb 2015 13:49:20 +0100\0"
  "To\0Benjamin Romer <benjamin.romer@unisys.com>"
   David Kershner <david.kershner@unisys.com>
  " Greg Kroah-Hartman <gregkh@linuxfoundation.org>\0"
@@ -23,7 +23,7 @@
  "@@\n"
  "\n"
  "e = \\(kzalloc\\|kmalloc\\|devm_kzalloc\\|devm_kmalloc\\)(...);\n"
- "if (e = NULL) {\n"
+ "if (e == NULL) {\n"
  "  <+...\n"
  "-  print(...,c,...);\n"
  "  ... when any\n"
@@ -74,11 +74,11 @@
  " \t}\n"
  " \n"
  " \tcmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);\n"
- "-\tif (cmdrsp = NULL) {\n"
+ "-\tif (cmdrsp == NULL) {\n"
  "-\t\tLOGERR(\"kmalloc of cmdrsp failed.\\n\");\n"
  "-\t\treturn FAILED;\t/* reject */\n"
  "-\t}\n"
- "+\tif (cmdrsp = NULL)\n"
+ "+\tif (cmdrsp == NULL)\n"
  "+\t\treturn FAILED;  /* reject */\n"
  " \n"
  " \tinit_waitqueue_head(&notifyevent);\n"
@@ -87,11 +87,11 @@
  " \t}\n"
  " \n"
  " \tcmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);\n"
- "-\tif (cmdrsp = NULL) {\n"
+ "-\tif (cmdrsp == NULL) {\n"
  "-\t\tLOGERR(\"kmalloc of cmdrsp failed.\\n\");\n"
  "-\t\treturn FAILED;\t/* reject */\n"
  "-\t}\n"
- "+\tif (cmdrsp = NULL)\n"
+ "+\tif (cmdrsp == NULL)\n"
  "+\t\treturn FAILED;  /* reject */\n"
  " \n"
  " \tinit_waitqueue_head(&notifyevent);\n"
@@ -100,9 +100,9 @@
  " \t}\n"
  " \n"
  " \tcmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);\n"
- "-\tif (cmdrsp = NULL) {\n"
+ "-\tif (cmdrsp == NULL) {\n"
  "-\t\tLOGERR(\"kmalloc of cmdrsp failed.\\n\");\n"
- "+\tif (cmdrsp = NULL)\n"
+ "+\tif (cmdrsp == NULL)\n"
  " \t\treturn 1;\t/* reject the command */\n"
  "-\t}\n"
  " \n"
@@ -123,7 +123,7 @@
  "@@ -1342,7 +1334,6 @@ process_incoming_rsps(void *v)\n"
  " \t/* alloc once and reuse */\n"
  " \tcmdrsp = kmalloc(SZ, GFP_ATOMIC);\n"
- " \tif (cmdrsp = NULL) {\n"
+ " \tif (cmdrsp == NULL) {\n"
  "-\t\tLOGERR(\"process_incoming_rsps ****FAILED to malloc - thread exiting\\n\");\n"
  " \t\tcomplete_and_exit(&dc->threadinfo.has_stopped, 0);\n"
  " \t\treturn 0;\n"
@@ -135,7 +135,7 @@
  "@@ -931,7 +931,6 @@ static int virtpci_device_add(struct device *parentbus, int devtype,\n"
  " \t/* add a Virtual Device */\n"
  " \tvirtpcidev = kzalloc(sizeof(*virtpcidev), GFP_ATOMIC);\n"
- " \tif (virtpcidev = NULL) {\n"
+ " \tif (virtpcidev == NULL) {\n"
  "-\t\tLOGERR(\"can't add device - malloc FALLED\\n\");\n"
  " \t\tPOSTCODE_LINUX_2(MALLOC_FAILURE_PC, POSTCODE_SEVERITY_ERR);\n"
  " \t\treturn 0;\n"
@@ -147,7 +147,7 @@
  "@@ -59,7 +59,6 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channel_bytes,\n"
  " \n"
  " \tp = kmalloc(sizeof(*p), GFP_KERNEL|__GFP_NORETRY);\n"
- " \tif (p = NULL) {\n"
+ " \tif (p == NULL) {\n"
  "-\t\tERRDRV(\"allocation failed: (status=0)\\n\");\n"
  " \t\trc = NULL;\n"
  " \t\tgoto cleanup;\n"
@@ -159,7 +159,7 @@
  "@@ -69,8 +69,6 @@ parser_init_guts(u64 addr, u32 bytes, BOOL isLocal,\n"
  " \t}\n"
  " \tctx = kzalloc(allocbytes, GFP_KERNEL|__GFP_NORETRY);\n"
- " \tif (ctx = NULL) {\n"
+ " \tif (ctx == NULL) {\n"
  "-\t\tERRDRV(\"%s (%s:%d) - failed to allocate %d bytes\",\n"
  "-\t\t       __func__, __FILE__, __LINE__, allocbytes);\n"
  " \t\tif (tryAgain)\n"
@@ -172,7 +172,7 @@
  "@@ -1118,8 +1118,6 @@ bus_create(struct controlvm_message *inmsg)\n"
  " \t}\n"
  " \tpBusInfo = kzalloc(sizeof(struct visorchipset_bus_info), GFP_KERNEL);\n"
- " \tif (pBusInfo = NULL) {\n"
+ " \tif (pBusInfo == NULL) {\n"
  "-\t\tLOGERR(\"CONTROLVM_BUS_CREATE Failed: bus %lu kzalloc failed\",\n"
  "-\t\t       busNo);\n"
  " \t\tPOSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,\n"
@@ -181,7 +181,7 @@
  "@@ -1268,8 +1266,6 @@ my_device_create(struct controlvm_message *inmsg)\n"
  " \t}\n"
  " \tpDevInfo = kzalloc(sizeof(struct visorchipset_device_info), GFP_KERNEL);\n"
- " \tif (pDevInfo = NULL) {\n"
+ " \tif (pDevInfo == NULL) {\n"
  "-\t\tLOGERR(\"CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu kmaloc failed\",\n"
  "-\t\t     busNo, devNo);\n"
  " \t\tPOSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,\n"
@@ -195,9 +195,9 @@
  " \t\treturn NULL;\n"
  " \t}\n"
  " \tmemregion = kzalloc(sizeof(*memregion), GFP_KERNEL|__GFP_NORETRY);\n"
- "-\tif (memregion = NULL) {\n"
+ "-\tif (memregion == NULL) {\n"
  "-\t\tERRDRV(\"%s allocation failed\", __func__);\n"
- "+\tif (memregion = NULL)\n"
+ "+\tif (memregion == NULL)\n"
  " \t\treturn NULL;\n"
  "-\t}\n"
  " \n"
@@ -211,9 +211,9 @@
  " \t\tgoto Away;\n"
  " \t}\n"
  " \ttype = kzalloc(sizeof(MYPROCTYPE), GFP_KERNEL | __GFP_NORETRY);\n"
- "-\tif (type = NULL) {\n"
+ "-\tif (type == NULL) {\n"
  "-\t\tERRDRV(\"out of memory\\n\");\n"
- "+\tif (type = NULL)\n"
+ "+\tif (type == NULL)\n"
  " \t\tgoto Away;\n"
  "-\t}\n"
  " \ttype->name = name;\n"
@@ -223,9 +223,9 @@
  " \ttype->procDirs = kzalloc((type->nNames + 1) *\n"
  " \t\t\t\t sizeof(struct proc_dir_entry *),\n"
  " \t\t\t\t GFP_KERNEL | __GFP_NORETRY);\n"
- "-\tif (type->procDirs = NULL) {\n"
+ "-\tif (type->procDirs == NULL) {\n"
  "-\t\tERRDRV(\"out of memory\\n\");\n"
- "+\tif (type->procDirs = NULL)\n"
+ "+\tif (type->procDirs == NULL)\n"
  " \t\tgoto Away;\n"
  "-\t}\n"
  " \tparent = procDirRoot;\n"
@@ -235,17 +235,17 @@
  " \t\tgoto Away;\n"
  " \t}\n"
  " \tobj = kzalloc(sizeof(MYPROCOBJECT), GFP_KERNEL | __GFP_NORETRY);\n"
- "-\tif (obj = NULL) {\n"
+ "-\tif (obj == NULL) {\n"
  "-\t\tERRDRV(\"out of memory\\n\");\n"
- "+\tif (obj = NULL)\n"
+ "+\tif (obj == NULL)\n"
  " \t\tgoto Away;\n"
  "-\t}\n"
  " \tobj->type = type;\n"
  " \tobj->context = context;\n"
- " \tif (name = NULL) {\n"
+ " \tif (name == NULL) {\n"
  "@@ -245,7 +239,6 @@ MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type,\n"
  " \t\tobj->name = kmalloc(obj->namesize, GFP_KERNEL | __GFP_NORETRY);\n"
- " \t\tif (obj->name = NULL) {\n"
+ " \t\tif (obj->name == NULL) {\n"
  " \t\t\tobj->namesize = 0;\n"
  "-\t\t\tERRDRV(\"out of memory\\n\");\n"
  " \t\t\tgoto Away;\n"
@@ -255,17 +255,17 @@
  " \t\tkzalloc((type->nProperties + 1) *\n"
  " \t\t\tsizeof(struct proc_dir_entry_context),\n"
  " \t\t\tGFP_KERNEL | __GFP_NORETRY);\n"
- "-\tif (obj->procDirPropertyContexts = NULL) {\n"
+ "-\tif (obj->procDirPropertyContexts == NULL) {\n"
  "-\t\tERRDRV(\"out of memory\\n\");\n"
- "+\tif (obj->procDirPropertyContexts = NULL)\n"
+ "+\tif (obj->procDirPropertyContexts == NULL)\n"
  " \t\tgoto Away;\n"
  "-\t}\n"
  " \tobj->procDirProperties = kzalloc((type->nProperties + 1) *\n"
  " \t\t\t\t\t sizeof(struct proc_dir_entry *),\n"
  " \t\t\t\t\t GFP_KERNEL | __GFP_NORETRY);\n"
- "-\tif (obj->procDirProperties = NULL) {\n"
+ "-\tif (obj->procDirProperties == NULL) {\n"
  "-\t\tERRDRV(\"out of memory\\n\");\n"
- "+\tif (obj->procDirProperties = NULL)\n"
+ "+\tif (obj->procDirProperties == NULL)\n"
  " \t\tgoto Away;\n"
  "-\t}\n"
  " \tfor (i = 0; i < type->nProperties; i++) {\n"
@@ -274,4 +274,4 @@
  "-- \n"
  1.9.1
 
-3a9cf6014a662a41d26b50a1dc35dd619000d986211bd316a8f93b1027a70bca
+1e829e2c6c761949e4252eeaa642d4effb55ab0ce1b797ca7e454d792b0632a2

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.