diff for duplicates of <1202337981.6162.8.camel@localhost.localdomain> diff --git a/a/1.txt b/N1/1.txt index a3387bb..0e43ce9 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -76,8 +76,8 @@ index 37c0bf7..3f341dc 100644 static int maple_dma_done(void) { -- return (ctrl_inl(MAPLE_STATE) & 1) = 0; -+ return (ctrl_inl(MAPLE_STATE) & 1) = 0; +- return (ctrl_inl(MAPLE_STATE) & 1) == 0; ++ return (ctrl_inl(MAPLE_STATE) & 1) == 0; } static void maple_release_device(struct device *dev) @@ -216,10 +216,12 @@ index 37c0bf7..3f341dc 100644 - *maple_sendptr++ = (port << 16) | len | 0x80000000; - *maple_sendptr++ = PHYSADDR(mq->recvbuf); -- *maple_sendptr++ - mq->command | (to << 8) | (from << 16) | (len << 24); +- *maple_sendptr++ = +- mq->command | (to << 8) | (from << 16) | (len << 24); + *maple_sendptr++ = (port << 16) | len | 0x80000000; + *maple_sendptr++ = PHYSADDR(mq->recvbuf); -+ *maple_sendptr++ + mq->command | (to << 8) | (from << 16) | (len << 24); ++ *maple_sendptr++ = ++ mq->command | (to << 8) | (from << 16) | (len << 24); - while (len-- > 0) - *maple_sendptr++ = *lsendbuf++; @@ -284,7 +286,7 @@ index 37c0bf7..3f341dc 100644 - mdev = devptr; - maple_drv = to_maple_driver(driver); - if (mdev->devinfo.function & be32_to_cpu(maple_drv->function)) { -- if (maple_drv->connect(mdev) = 0) { +- if (maple_drv->connect(mdev) == 0) { - mdev->driver = maple_drv; - return 1; - } @@ -296,7 +298,7 @@ index 37c0bf7..3f341dc 100644 + mdev = devptr; + maple_drv = to_maple_driver(driver); + if (mdev->devinfo.function & be32_to_cpu(maple_drv->function)) { -+ if (maple_drv->connect(mdev) = 0) { ++ if (maple_drv->connect(mdev) == 0) { + mdev->driver = maple_drv; + return 1; + } @@ -351,13 +353,13 @@ index 37c0bf7..3f341dc 100644 - dev->product_licence[60] = '\0'; - - for (p = dev->product_name + 29; dev->product_name <= p; p--) -- if (*p = ' ') +- if (*p == ' ') - *p = '\0'; - else - break; - - for (p = dev->product_licence + 59; dev->product_licence <= p; p--) -- if (*p = ' ') +- if (*p == ' ') - *p = '\0'; - else - break; @@ -374,10 +376,11 @@ index 37c0bf7..3f341dc 100644 - "Maple bus at (%d, %d): Connected function 0x%lX\n", - dev->port, dev->unit, function); - -- matched - bus_for_each_drv(&maple_bus_type, NULL, dev, +- matched = +- bus_for_each_drv(&maple_bus_type, NULL, dev, - attach_matching_maple_driver); - -- if (matched = 0) { +- if (matched == 0) { - /* Driver does not exist yet */ - printk(KERN_INFO - "No maple driver found for this device\n"); @@ -413,13 +416,13 @@ index 37c0bf7..3f341dc 100644 + dev->product_licence[60] = '\0'; + + for (p = dev->product_name + 29; dev->product_name <= p; p--) -+ if (*p = ' ') ++ if (*p == ' ') + *p = '\0'; + else + break; + + for (p = dev->product_licence + 59; dev->product_licence <= p; p--) -+ if (*p = ' ') ++ if (*p == ' ') + *p = '\0'; + else + break; @@ -436,10 +439,11 @@ index 37c0bf7..3f341dc 100644 + "Maple bus at (%d, %d): Connected function 0x%lX\n", + dev->port, dev->unit, function); + -+ matched + bus_for_each_drv(&maple_bus_type, NULL, dev, ++ matched = ++ bus_for_each_drv(&maple_bus_type, NULL, dev, + attach_matching_maple_driver); + -+ if (matched = 0) { ++ if (matched == 0) { + /* Driver does not exist yet */ + printk(KERN_INFO + "No maple driver found for this device\n"); @@ -473,7 +477,7 @@ index 37c0bf7..3f341dc 100644 - - ds = portptr; - mdev = to_maple_dev(device); -- if (mdev->port = ds->port && mdev->unit = ds->unit) +- if (mdev->port == ds->port && mdev->unit == ds->unit) - return 1; - return 0; + struct maple_device_specify *ds; @@ -481,7 +485,7 @@ index 37c0bf7..3f341dc 100644 + + ds = portptr; + mdev = to_maple_dev(device); -+ if (mdev->port = ds->port && mdev->unit = ds->unit) ++ if (mdev->port == ds->port && mdev->unit == ds->unit) + return 1; + return 0; } @@ -575,7 +579,8 @@ index 37c0bf7..3f341dc 100644 - for (k = 0; k < 5; k++) { - ds.port = mdev->port; - ds.unit = k + 1; -- retval - bus_for_each_dev(&maple_bus_type, NULL, &ds, +- retval = +- bus_for_each_dev(&maple_bus_type, NULL, &ds, - detach_maple_device); - if (retval) { - submask = submask >> 1; @@ -600,7 +605,8 @@ index 37c0bf7..3f341dc 100644 + for (k = 0; k < 5; k++) { + ds.port = mdev->port; + ds.unit = k + 1; -+ retval + bus_for_each_dev(&maple_bus_type, NULL, &ds, ++ retval = ++ bus_for_each_dev(&maple_bus_type, NULL, &ds, + detach_maple_device); + if (retval) { + submask = submask >> 1; @@ -679,11 +685,11 @@ index 37c0bf7..3f341dc 100644 + char *recvbuf) { - char submask; -- if ((!started) || (scanning = 2)) { +- if ((!started) || (scanning == 2)) { - maple_attach_driver(mdev); - return; - } -- if (mdev->unit = 0) { +- if (mdev->unit == 0) { - submask = recvbuf[2] & 0x1F; - if (submask ^ subdevice_map[mdev->port]) { - maple_map_subunits(mdev, submask); @@ -691,11 +697,11 @@ index 37c0bf7..3f341dc 100644 - } - } + char submask; -+ if ((!started) || (scanning = 2)) { ++ if ((!started) || (scanning == 2)) { + maple_attach_driver(mdev); + return; + } -+ if (mdev->unit = 0) { ++ if (mdev->unit == 0) { + submask = recvbuf[2] & 0x1F; + if (submask ^ subdevice_map[mdev->port]) { + maple_map_subunits(mdev, submask); @@ -756,13 +762,13 @@ index 37c0bf7..3f341dc 100644 - } - } - INIT_LIST_HEAD(&maple_sentq); -- if (scanning = 1) { +- if (scanning == 1) { - maple_send(); - scanning = 2; - } else - scanning = 0; - -- if (started = 0) +- if (started == 0) - started = 1; - } - maplebus_dma_reset(); @@ -815,13 +821,13 @@ index 37c0bf7..3f341dc 100644 + } + } + INIT_LIST_HEAD(&maple_sentq); -+ if (scanning = 1) { ++ if (scanning == 1) { + maple_send(); + scanning = 2; + } else + scanning = 0; + -+ if (started = 0) ++ if (started == 0) + started = 1; + } + maplebus_dma_reset(); @@ -877,12 +883,14 @@ index 37c0bf7..3f341dc 100644 static int maple_get_dma_buffer(void) { -- maple_sendbuf - (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, +- maple_sendbuf = +- (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, - MAPLE_DMA_PAGES); - if (!maple_sendbuf) - return -ENOMEM; - return 0; -+ maple_sendbuf + (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, ++ maple_sendbuf = ++ (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO, + MAPLE_DMA_PAGES); + if (!maple_sendbuf) + return -ENOMEM; @@ -899,7 +907,7 @@ index 37c0bf7..3f341dc 100644 - maple_drv = container_of(drvptr, struct maple_driver, drv); - maple_dev = container_of(devptr, struct maple_device, dev); - /* Trap empty port case */ -- if (maple_dev->devinfo.function = 0xFFFFFFFF) +- if (maple_dev->devinfo.function == 0xFFFFFFFF) - return 0; - else if (maple_dev->devinfo.function & - be32_to_cpu(maple_drv->function)) @@ -911,7 +919,7 @@ index 37c0bf7..3f341dc 100644 + maple_drv = container_of(drvptr, struct maple_driver, drv); + maple_dev = container_of(devptr, struct maple_device, dev); + /* Trap empty port case */ -+ if (maple_dev->devinfo.function = 0xFFFFFFFF) ++ if (maple_dev->devinfo.function == 0xFFFFFFFF) + return 0; + else if (maple_dev->devinfo.function & + be32_to_cpu(maple_drv->function)) @@ -1002,7 +1010,8 @@ index 37c0bf7..3f341dc 100644 - goto cleanup_irq; - } - -- maple_queue_cache - kmem_cache_create("maple_queue_cache", 0x400, 0, +- maple_queue_cache = +- kmem_cache_create("maple_queue_cache", 0x400, 0, - SLAB_HWCACHE_ALIGN, NULL); - - if (!maple_queue_cache) @@ -1100,7 +1109,8 @@ index 37c0bf7..3f341dc 100644 + goto cleanup_irq; + } + -+ maple_queue_cache + kmem_cache_create("maple_queue_cache", 0x400, 0, ++ maple_queue_cache = ++ kmem_cache_create("maple_queue_cache", 0x400, 0, + SLAB_HWCACHE_ALIGN, NULL); + + if (!maple_queue_cache) diff --git a/a/content_digest b/N1/content_digest index 264732b..cdbc9c1 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -85,8 +85,8 @@ " \n" " static int maple_dma_done(void)\n" " {\n" - "- return (ctrl_inl(MAPLE_STATE) & 1) = 0;\n" - "+\treturn (ctrl_inl(MAPLE_STATE) & 1) = 0;\n" + "- return (ctrl_inl(MAPLE_STATE) & 1) == 0;\n" + "+\treturn (ctrl_inl(MAPLE_STATE) & 1) == 0;\n" " }\n" " \n" " static void maple_release_device(struct device *dev)\n" @@ -225,10 +225,12 @@ " \n" "- *maple_sendptr++ = (port << 16) | len | 0x80000000;\n" "- *maple_sendptr++ = PHYSADDR(mq->recvbuf);\n" - "- *maple_sendptr++ - mq->command | (to << 8) | (from << 16) | (len << 24);\n" + "- *maple_sendptr++ =\n" + "- mq->command | (to << 8) | (from << 16) | (len << 24);\n" "+\t*maple_sendptr++ = (port << 16) | len | 0x80000000;\n" "+\t*maple_sendptr++ = PHYSADDR(mq->recvbuf);\n" - "+\t*maple_sendptr++ +\t mq->command | (to << 8) | (from << 16) | (len << 24);\n" + "+\t*maple_sendptr++ =\n" + "+\t mq->command | (to << 8) | (from << 16) | (len << 24);\n" " \n" "- while (len-- > 0)\n" "- *maple_sendptr++ = *lsendbuf++;\n" @@ -293,7 +295,7 @@ "- mdev = devptr;\n" "- maple_drv = to_maple_driver(driver);\n" "- if (mdev->devinfo.function & be32_to_cpu(maple_drv->function)) {\n" - "- if (maple_drv->connect(mdev) = 0) {\n" + "- if (maple_drv->connect(mdev) == 0) {\n" "- mdev->driver = maple_drv;\n" "- return 1;\n" "- }\n" @@ -305,7 +307,7 @@ "+\tmdev = devptr;\n" "+\tmaple_drv = to_maple_driver(driver);\n" "+\tif (mdev->devinfo.function & be32_to_cpu(maple_drv->function)) {\n" - "+\t\tif (maple_drv->connect(mdev) = 0) {\n" + "+\t\tif (maple_drv->connect(mdev) == 0) {\n" "+\t\t\tmdev->driver = maple_drv;\n" "+\t\t\treturn 1;\n" "+\t\t}\n" @@ -360,13 +362,13 @@ "- dev->product_licence[60] = '\\0';\n" "-\n" "- for (p = dev->product_name + 29; dev->product_name <= p; p--)\n" - "- if (*p = ' ')\n" + "- if (*p == ' ')\n" "- *p = '\\0';\n" "- else\n" "- break;\n" "-\n" "- for (p = dev->product_licence + 59; dev->product_licence <= p; p--)\n" - "- if (*p = ' ')\n" + "- if (*p == ' ')\n" "- *p = '\\0';\n" "- else\n" "- break;\n" @@ -383,10 +385,11 @@ "- \"Maple bus at (%d, %d): Connected function 0x%lX\\n\",\n" "- dev->port, dev->unit, function);\n" "-\n" - "- matched - bus_for_each_drv(&maple_bus_type, NULL, dev,\n" + "- matched =\n" + "- bus_for_each_drv(&maple_bus_type, NULL, dev,\n" "- attach_matching_maple_driver);\n" "-\n" - "- if (matched = 0) {\n" + "- if (matched == 0) {\n" "- /* Driver does not exist yet */\n" "- printk(KERN_INFO\n" "- \"No maple driver found for this device\\n\");\n" @@ -422,13 +425,13 @@ "+\tdev->product_licence[60] = '\\0';\n" "+\n" "+\tfor (p = dev->product_name + 29; dev->product_name <= p; p--)\n" - "+\t\tif (*p = ' ')\n" + "+\t\tif (*p == ' ')\n" "+\t\t\t*p = '\\0';\n" "+\t\telse\n" "+\t\t\tbreak;\n" "+\n" "+\tfor (p = dev->product_licence + 59; dev->product_licence <= p; p--)\n" - "+\t\tif (*p = ' ')\n" + "+\t\tif (*p == ' ')\n" "+\t\t\t*p = '\\0';\n" "+\t\telse\n" "+\t\t\tbreak;\n" @@ -445,10 +448,11 @@ "+\t\t \"Maple bus at (%d, %d): Connected function 0x%lX\\n\",\n" "+\t\t dev->port, dev->unit, function);\n" "+\n" - "+\t\tmatched +\t\t bus_for_each_drv(&maple_bus_type, NULL, dev,\n" + "+\t\tmatched =\n" + "+\t\t bus_for_each_drv(&maple_bus_type, NULL, dev,\n" "+\t\t\t\t attach_matching_maple_driver);\n" "+\n" - "+\t\tif (matched = 0) {\n" + "+\t\tif (matched == 0) {\n" "+\t\t\t/* Driver does not exist yet */\n" "+\t\t\tprintk(KERN_INFO\n" "+\t\t\t \"No maple driver found for this device\\n\");\n" @@ -482,7 +486,7 @@ "-\n" "- ds = portptr;\n" "- mdev = to_maple_dev(device);\n" - "- if (mdev->port = ds->port && mdev->unit = ds->unit)\n" + "- if (mdev->port == ds->port && mdev->unit == ds->unit)\n" "- return 1;\n" "- return 0;\n" "+\tstruct maple_device_specify *ds;\n" @@ -490,7 +494,7 @@ "+\n" "+\tds = portptr;\n" "+\tmdev = to_maple_dev(device);\n" - "+\tif (mdev->port = ds->port && mdev->unit = ds->unit)\n" + "+\tif (mdev->port == ds->port && mdev->unit == ds->unit)\n" "+\t\treturn 1;\n" "+\treturn 0;\n" " }\n" @@ -584,7 +588,8 @@ "- for (k = 0; k < 5; k++) {\n" "- ds.port = mdev->port;\n" "- ds.unit = k + 1;\n" - "- retval - bus_for_each_dev(&maple_bus_type, NULL, &ds,\n" + "- retval =\n" + "- bus_for_each_dev(&maple_bus_type, NULL, &ds,\n" "- detach_maple_device);\n" "- if (retval) {\n" "- submask = submask >> 1;\n" @@ -609,7 +614,8 @@ "+\tfor (k = 0; k < 5; k++) {\n" "+\t\tds.port = mdev->port;\n" "+\t\tds.unit = k + 1;\n" - "+\t\tretval +\t\t bus_for_each_dev(&maple_bus_type, NULL, &ds,\n" + "+\t\tretval =\n" + "+\t\t bus_for_each_dev(&maple_bus_type, NULL, &ds,\n" "+\t\t\t\t detach_maple_device);\n" "+\t\tif (retval) {\n" "+\t\t\tsubmask = submask >> 1;\n" @@ -688,11 +694,11 @@ "+\t\t\t\t char *recvbuf)\n" " {\n" "- char submask;\n" - "- if ((!started) || (scanning = 2)) {\n" + "- if ((!started) || (scanning == 2)) {\n" "- maple_attach_driver(mdev);\n" "- return;\n" "- }\n" - "- if (mdev->unit = 0) {\n" + "- if (mdev->unit == 0) {\n" "- submask = recvbuf[2] & 0x1F;\n" "- if (submask ^ subdevice_map[mdev->port]) {\n" "- maple_map_subunits(mdev, submask);\n" @@ -700,11 +706,11 @@ "- }\n" "- }\n" "+\tchar submask;\n" - "+\tif ((!started) || (scanning = 2)) {\n" + "+\tif ((!started) || (scanning == 2)) {\n" "+\t\tmaple_attach_driver(mdev);\n" "+\t\treturn;\n" "+\t}\n" - "+\tif (mdev->unit = 0) {\n" + "+\tif (mdev->unit == 0) {\n" "+\t\tsubmask = recvbuf[2] & 0x1F;\n" "+\t\tif (submask ^ subdevice_map[mdev->port]) {\n" "+\t\t\tmaple_map_subunits(mdev, submask);\n" @@ -765,13 +771,13 @@ "- }\n" "- }\n" "- INIT_LIST_HEAD(&maple_sentq);\n" - "- if (scanning = 1) {\n" + "- if (scanning == 1) {\n" "- maple_send();\n" "- scanning = 2;\n" "- } else\n" "- scanning = 0;\n" "-\n" - "- if (started = 0)\n" + "- if (started == 0)\n" "- started = 1;\n" "- }\n" "- maplebus_dma_reset();\n" @@ -824,13 +830,13 @@ "+\t\t\t}\n" "+\t\t}\n" "+\t\tINIT_LIST_HEAD(&maple_sentq);\n" - "+\t\tif (scanning = 1) {\n" + "+\t\tif (scanning == 1) {\n" "+\t\t\tmaple_send();\n" "+\t\t\tscanning = 2;\n" "+\t\t} else\n" "+\t\t\tscanning = 0;\n" "+\n" - "+\t\tif (started = 0)\n" + "+\t\tif (started == 0)\n" "+\t\t\tstarted = 1;\n" "+\t}\n" "+\tmaplebus_dma_reset();\n" @@ -886,12 +892,14 @@ " \n" " static int maple_get_dma_buffer(void)\n" " {\n" - "- maple_sendbuf - (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,\n" + "- maple_sendbuf =\n" + "- (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,\n" "- MAPLE_DMA_PAGES);\n" "- if (!maple_sendbuf)\n" "- return -ENOMEM;\n" "- return 0;\n" - "+\tmaple_sendbuf +\t (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,\n" + "+\tmaple_sendbuf =\n" + "+\t (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,\n" "+\t\t\t\t MAPLE_DMA_PAGES);\n" "+\tif (!maple_sendbuf)\n" "+\t\treturn -ENOMEM;\n" @@ -908,7 +916,7 @@ "- maple_drv = container_of(drvptr, struct maple_driver, drv);\n" "- maple_dev = container_of(devptr, struct maple_device, dev);\n" "- /* Trap empty port case */\n" - "- if (maple_dev->devinfo.function = 0xFFFFFFFF)\n" + "- if (maple_dev->devinfo.function == 0xFFFFFFFF)\n" "- return 0;\n" "- else if (maple_dev->devinfo.function &\n" "- be32_to_cpu(maple_drv->function))\n" @@ -920,7 +928,7 @@ "+\tmaple_drv = container_of(drvptr, struct maple_driver, drv);\n" "+\tmaple_dev = container_of(devptr, struct maple_device, dev);\n" "+\t/* Trap empty port case */\n" - "+\tif (maple_dev->devinfo.function = 0xFFFFFFFF)\n" + "+\tif (maple_dev->devinfo.function == 0xFFFFFFFF)\n" "+\t\treturn 0;\n" "+\telse if (maple_dev->devinfo.function &\n" "+\t\t be32_to_cpu(maple_drv->function))\n" @@ -1011,7 +1019,8 @@ "- goto cleanup_irq;\n" "- }\n" "-\n" - "- maple_queue_cache - kmem_cache_create(\"maple_queue_cache\", 0x400, 0,\n" + "- maple_queue_cache =\n" + "- kmem_cache_create(\"maple_queue_cache\", 0x400, 0,\n" "- SLAB_HWCACHE_ALIGN, NULL);\n" "-\n" "- if (!maple_queue_cache)\n" @@ -1109,7 +1118,8 @@ "+\t\tgoto cleanup_irq;\n" "+\t}\n" "+\n" - "+\tmaple_queue_cache +\t kmem_cache_create(\"maple_queue_cache\", 0x400, 0,\n" + "+\tmaple_queue_cache =\n" + "+\t kmem_cache_create(\"maple_queue_cache\", 0x400, 0,\n" "+\t\t\t SLAB_HWCACHE_ALIGN, NULL);\n" "+\n" "+\tif (!maple_queue_cache)\n" @@ -1301,4 +1311,4 @@ "-#endif /* __LINUX_MAPLE_H */\n" "+#endif\t\t\t\t/* __LINUX_MAPLE_H */" -13c7b694e7f860d2bd96536adad8830714eb630d8fbe8168b44f6173ec3f212c +2d64d918dcfd5f389eda68bad7792f2dc555201c407749bdad967c21dd06d378
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.