All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <cd35605c-e52d-ef65-e105-5e0bc24f4ce4@users.sourceforge.net>

diff --git a/a/1.txt b/N1/1.txt
index 1f03d91..690bb08 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -20,13 +20,13 @@ index 61946f5d356f..cba9514605b7 100644
 --- a/drivers/vme/bridges/vme_tsi148.c
 +++ b/drivers/vme/bridges/vme_tsi148.c
 @@ -748,9 +748,9 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
- 	if (size = 0)
+ 	if (size == 0)
  		return 0;
  
--	if (image->bus_resource.name = NULL) {
+-	if (image->bus_resource.name == NULL) {
 +	if (!image->bus_resource.name) {
  		image->bus_resource.name = kmalloc(VMENAMSIZ+3, GFP_ATOMIC);
--		if (image->bus_resource.name = NULL) {
+-		if (image->bus_resource.name == NULL) {
 +		if (!image->bus_resource.name) {
  			retval = -ENOMEM;
  			goto err_name;
@@ -35,7 +35,7 @@ index 61946f5d356f..cba9514605b7 100644
  
  	image->kern_base = ioremap_nocache(
  		image->bus_resource.start, size);
--	if (image->kern_base = NULL) {
+-	if (image->kern_base == NULL) {
 +	if (!image->kern_base) {
  		dev_err(tsi148_bridge->parent, "Failed to remap resource\n");
  		retval = -ENOMEM;
@@ -44,7 +44,7 @@ index 61946f5d356f..cba9514605b7 100644
  
  	/* Descriptor must be aligned on 64-bit boundaries */
  	entry = kmalloc(sizeof(*entry), GFP_KERNEL);
--	if (entry = NULL) {
+-	if (entry == NULL) {
 +	if (!entry) {
  		retval = -ENOMEM;
  		goto err_mem;
@@ -71,7 +71,7 @@ index 61946f5d356f..cba9514605b7 100644
  	/* Allocate mem for CR/CSR image */
  	bridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE,
  						     &bridge->crcsr_bus);
--	if (bridge->crcsr_kernel = NULL) {
+-	if (bridge->crcsr_kernel == NULL) {
 +	if (!bridge->crcsr_kernel) {
  		dev_err(tsi148_bridge->parent, "Failed to allocate memory for "
  			"CR/CSR image\n");
@@ -80,7 +80,7 @@ index 61946f5d356f..cba9514605b7 100644
  	 * dynamically generate this so we get one per device
  	 */
  	tsi148_bridge = kzalloc(sizeof(*tsi148_bridge), GFP_KERNEL);
--	if (tsi148_bridge = NULL) {
+-	if (tsi148_bridge == NULL) {
 +	if (!tsi148_bridge) {
  		retval = -ENOMEM;
  		goto err_struct;
@@ -88,15 +88,16 @@ index 61946f5d356f..cba9514605b7 100644
  	vme_init_bridge(tsi148_bridge);
  
  	tsi148_device = kzalloc(sizeof(*tsi148_device), GFP_KERNEL);
--	if (tsi148_device = NULL) {
+-	if (tsi148_device == NULL) {
 +	if (!tsi148_device) {
  		retval = -ENOMEM;
  		goto err_driver;
  	}
 @@ -2365,7 +2365,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  
- 		tsi148_device->flush_image  			kmalloc(sizeof(*tsi148_device->flush_image), GFP_KERNEL);
--		if (tsi148_device->flush_image = NULL) {
+ 		tsi148_device->flush_image =
+ 			kmalloc(sizeof(*tsi148_device->flush_image), GFP_KERNEL);
+-		if (tsi148_device->flush_image == NULL) {
 +		if (!tsi148_device->flush_image) {
  			retval = -ENOMEM;
  			goto err_master;
@@ -105,7 +106,7 @@ index 61946f5d356f..cba9514605b7 100644
  	/* Add master windows to list */
  	for (i = 0; i < master_num; i++) {
  		master_image = kmalloc(sizeof(*master_image), GFP_KERNEL);
--		if (master_image = NULL) {
+-		if (master_image == NULL) {
 +		if (!master_image) {
  			retval = -ENOMEM;
  			goto err_master;
@@ -114,7 +115,7 @@ index 61946f5d356f..cba9514605b7 100644
  	/* Add slave windows to list */
  	for (i = 0; i < TSI148_MAX_SLAVE; i++) {
  		slave_image = kmalloc(sizeof(*slave_image), GFP_KERNEL);
--		if (slave_image = NULL) {
+-		if (slave_image == NULL) {
 +		if (!slave_image) {
  			retval = -ENOMEM;
  			goto err_slave;
@@ -123,7 +124,7 @@ index 61946f5d356f..cba9514605b7 100644
  	/* Add dma engines to list */
  	for (i = 0; i < TSI148_MAX_DMA; i++) {
  		dma_ctrlr = kmalloc(sizeof(*dma_ctrlr), GFP_KERNEL);
--		if (dma_ctrlr = NULL) {
+-		if (dma_ctrlr == NULL) {
 +		if (!dma_ctrlr) {
  			retval = -ENOMEM;
  			goto err_dma;
@@ -132,7 +133,7 @@ index 61946f5d356f..cba9514605b7 100644
  
  	/* Add location monitor to list */
  	lm = kmalloc(sizeof(*lm), GFP_KERNEL);
--	if (lm = NULL) {
+-	if (lm == NULL) {
 +	if (!lm) {
  		retval = -ENOMEM;
  		goto err_lm;
diff --git a/a/content_digest b/N1/content_digest
index 4d74feb..6172195 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,7 +1,7 @@
  "ref\07ab4be89-4aa6-5537-9839-da090635f249@users.sourceforge.net\0"
  "From\0SF Markus Elfring <elfring@users.sourceforge.net>\0"
  "Subject\0[PATCH 14/14] vme: tsi148: Adjust 14 checks for null pointers\0"
- "Date\0Fri, 25 Aug 2017 16:17:07 +0000\0"
+ "Date\0Fri, 25 Aug 2017 18:17:07 +0200\0"
  "To\0devel@driverdev.osuosl.org"
   Aaron Sierra <asierra@xes-inc.com>
   Alessio Igor Bogani <alessio.bogani@elettra.eu>
@@ -37,13 +37,13 @@
  "--- a/drivers/vme/bridges/vme_tsi148.c\n"
  "+++ b/drivers/vme/bridges/vme_tsi148.c\n"
  "@@ -748,9 +748,9 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,\n"
- " \tif (size = 0)\n"
+ " \tif (size == 0)\n"
  " \t\treturn 0;\n"
  " \n"
- "-\tif (image->bus_resource.name = NULL) {\n"
+ "-\tif (image->bus_resource.name == NULL) {\n"
  "+\tif (!image->bus_resource.name) {\n"
  " \t\timage->bus_resource.name = kmalloc(VMENAMSIZ+3, GFP_ATOMIC);\n"
- "-\t\tif (image->bus_resource.name = NULL) {\n"
+ "-\t\tif (image->bus_resource.name == NULL) {\n"
  "+\t\tif (!image->bus_resource.name) {\n"
  " \t\t\tretval = -ENOMEM;\n"
  " \t\t\tgoto err_name;\n"
@@ -52,7 +52,7 @@
  " \n"
  " \timage->kern_base = ioremap_nocache(\n"
  " \t\timage->bus_resource.start, size);\n"
- "-\tif (image->kern_base = NULL) {\n"
+ "-\tif (image->kern_base == NULL) {\n"
  "+\tif (!image->kern_base) {\n"
  " \t\tdev_err(tsi148_bridge->parent, \"Failed to remap resource\\n\");\n"
  " \t\tretval = -ENOMEM;\n"
@@ -61,7 +61,7 @@
  " \n"
  " \t/* Descriptor must be aligned on 64-bit boundaries */\n"
  " \tentry = kmalloc(sizeof(*entry), GFP_KERNEL);\n"
- "-\tif (entry = NULL) {\n"
+ "-\tif (entry == NULL) {\n"
  "+\tif (!entry) {\n"
  " \t\tretval = -ENOMEM;\n"
  " \t\tgoto err_mem;\n"
@@ -88,7 +88,7 @@
  " \t/* Allocate mem for CR/CSR image */\n"
  " \tbridge->crcsr_kernel = pci_zalloc_consistent(pdev, VME_CRCSR_BUF_SIZE,\n"
  " \t\t\t\t\t\t     &bridge->crcsr_bus);\n"
- "-\tif (bridge->crcsr_kernel = NULL) {\n"
+ "-\tif (bridge->crcsr_kernel == NULL) {\n"
  "+\tif (!bridge->crcsr_kernel) {\n"
  " \t\tdev_err(tsi148_bridge->parent, \"Failed to allocate memory for \"\n"
  " \t\t\t\"CR/CSR image\\n\");\n"
@@ -97,7 +97,7 @@
  " \t * dynamically generate this so we get one per device\n"
  " \t */\n"
  " \ttsi148_bridge = kzalloc(sizeof(*tsi148_bridge), GFP_KERNEL);\n"
- "-\tif (tsi148_bridge = NULL) {\n"
+ "-\tif (tsi148_bridge == NULL) {\n"
  "+\tif (!tsi148_bridge) {\n"
  " \t\tretval = -ENOMEM;\n"
  " \t\tgoto err_struct;\n"
@@ -105,15 +105,16 @@
  " \tvme_init_bridge(tsi148_bridge);\n"
  " \n"
  " \ttsi148_device = kzalloc(sizeof(*tsi148_device), GFP_KERNEL);\n"
- "-\tif (tsi148_device = NULL) {\n"
+ "-\tif (tsi148_device == NULL) {\n"
  "+\tif (!tsi148_device) {\n"
  " \t\tretval = -ENOMEM;\n"
  " \t\tgoto err_driver;\n"
  " \t}\n"
  "@@ -2365,7 +2365,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n"
  " \n"
- " \t\ttsi148_device->flush_image  \t\t\tkmalloc(sizeof(*tsi148_device->flush_image), GFP_KERNEL);\n"
- "-\t\tif (tsi148_device->flush_image = NULL) {\n"
+ " \t\ttsi148_device->flush_image =\n"
+ " \t\t\tkmalloc(sizeof(*tsi148_device->flush_image), GFP_KERNEL);\n"
+ "-\t\tif (tsi148_device->flush_image == NULL) {\n"
  "+\t\tif (!tsi148_device->flush_image) {\n"
  " \t\t\tretval = -ENOMEM;\n"
  " \t\t\tgoto err_master;\n"
@@ -122,7 +123,7 @@
  " \t/* Add master windows to list */\n"
  " \tfor (i = 0; i < master_num; i++) {\n"
  " \t\tmaster_image = kmalloc(sizeof(*master_image), GFP_KERNEL);\n"
- "-\t\tif (master_image = NULL) {\n"
+ "-\t\tif (master_image == NULL) {\n"
  "+\t\tif (!master_image) {\n"
  " \t\t\tretval = -ENOMEM;\n"
  " \t\t\tgoto err_master;\n"
@@ -131,7 +132,7 @@
  " \t/* Add slave windows to list */\n"
  " \tfor (i = 0; i < TSI148_MAX_SLAVE; i++) {\n"
  " \t\tslave_image = kmalloc(sizeof(*slave_image), GFP_KERNEL);\n"
- "-\t\tif (slave_image = NULL) {\n"
+ "-\t\tif (slave_image == NULL) {\n"
  "+\t\tif (!slave_image) {\n"
  " \t\t\tretval = -ENOMEM;\n"
  " \t\t\tgoto err_slave;\n"
@@ -140,7 +141,7 @@
  " \t/* Add dma engines to list */\n"
  " \tfor (i = 0; i < TSI148_MAX_DMA; i++) {\n"
  " \t\tdma_ctrlr = kmalloc(sizeof(*dma_ctrlr), GFP_KERNEL);\n"
- "-\t\tif (dma_ctrlr = NULL) {\n"
+ "-\t\tif (dma_ctrlr == NULL) {\n"
  "+\t\tif (!dma_ctrlr) {\n"
  " \t\t\tretval = -ENOMEM;\n"
  " \t\t\tgoto err_dma;\n"
@@ -149,7 +150,7 @@
  " \n"
  " \t/* Add location monitor to list */\n"
  " \tlm = kmalloc(sizeof(*lm), GFP_KERNEL);\n"
- "-\tif (lm = NULL) {\n"
+ "-\tif (lm == NULL) {\n"
  "+\tif (!lm) {\n"
  " \t\tretval = -ENOMEM;\n"
  " \t\tgoto err_lm;\n"
@@ -157,4 +158,4 @@
  "-- \n"
  2.14.0
 
-8799986ea0c4358fe5c089351aa76563a2d21bee3b3d88f8c22ec740bc609136
+fdf829f11cb452adce06cfc706b49eda680d95b1b5fac44865e384a90017baee

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.