diff for duplicates of <1184489571313-git-send-email-crquan@gmail.com> diff --git a/a/1.txt b/N1/1.txt index afcef25..f7564a6 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -172,7 +172,7 @@ index 1cf090d..796011b 100644 + (unsigned char *)&scb_cs, sizeof(scb_cs)); scb_cs &= SCB_ST_INT; - if (scb_cs = 0) + if (scb_cs == 0) return; obram_write(ioaddr, scboff(OFFSET_SCB, scb_command), @@ -185,7 +185,7 @@ index 1cf090d..796011b 100644 obram_read(ioaddr, scboff(OFFSET_SCB, scb_command), - (unsigned char *) &scb_cs, sizeof(scb_cs)); + (unsigned char *)&scb_cs, sizeof(scb_cs)); - if (scb_cs = 0) + if (scb_cs == 0) break; @@ -587,7 +586,7 @@ static void wv_ack(struct net_device * dev) @@ -230,7 +230,7 @@ index 1cf090d..796011b 100644 + (unsigned char *)&status, sizeof(status)); /* If not completed -> exit */ - if ((status & AC_SFLD_C) = 0) + if ((status & AC_SFLD_C) == 0) @@ -668,7 +666,7 @@ wv_config_complete(struct net_device * dev, unsigned long ioaddr, net_local * lp /* check ia-config command */ ias_addr = mcs_addr - sizeof(ac_ias_t); @@ -282,12 +282,14 @@ index 1cf090d..796011b 100644 + (unsigned char *)&tx_status, sizeof(tx_status)); /* If not completed -> exit */ - if ((tx_status & AC_SFLD_C) = 0) + if ((tx_status & AC_SFLD_C) == 0) @@ -743,9 +740,8 @@ if (lp->tx_n_in_use > 0) /* Next one in the chain */ lp->tx_first_in_use += TXBLOCKZ; - if (lp->tx_first_in_use >- OFFSET_CU + -- NTXBLOCKS * TXBLOCKZ) lp->tx_first_in_use -- NTXBLOCKS * TXBLOCKZ; + if (lp->tx_first_in_use >= +- OFFSET_CU + +- NTXBLOCKS * TXBLOCKZ) lp->tx_first_in_use -= +- NTXBLOCKS * TXBLOCKZ; + OFFSET_CU + NTXBLOCKS * TXBLOCKZ) + lp->tx_first_in_use -= NTXBLOCKS * TXBLOCKZ; } @@ -391,7 +393,7 @@ index 1cf090d..796011b 100644 - ""); + scb_status & SCB_ST_RNR) ? "receiving unit not ready," : ""); printk("cus 0x%x[%s%s%s] ", (scb.scb_status & SCB_ST_CUS) >> 8, - ((scb.scb_status & SCB_ST_CUS) = + ((scb.scb_status & SCB_ST_CUS) == SCB_ST_CUS_IDLE) ? "idle" : "", @@ -1093,8 +1081,7 @@ static void wv_scb_show(unsigned long ioaddr) scb_command & SCB_CMD_ACK_FR) ? "ack frame received," : "", @@ -402,7 +404,7 @@ index 1cf090d..796011b 100644 + (scb.scb_command & SCB_CMD_ACK_RNR) ? "ack RU not ready," : ""); printk("cuc 0x%x[%s%s%s%s%s] ", (scb.scb_command & SCB_CMD_CUC) >> 8, - ((scb.scb_command & SCB_CMD_CUC) = + ((scb.scb_command & SCB_CMD_CUC) == @@ -1133,12 +1120,11 @@ static void wv_scb_show(unsigned long ioaddr) /* * Print the formatted status of the i82586's receive unit. @@ -583,10 +585,10 @@ index 1cf090d..796011b 100644 * the two limits with a 0.5 MHz precision. In practice, * I don't want you to have trouble with local regulations. */ -- if ((frequency->e = 1) && +- if ((frequency->e == 1) && - (frequency->m >= (int) 2.412e8) - && (frequency->m <= (int) 2.487e8)) { -+ if ((frequency->e = 1) && (frequency->m >= (int)2.412e8) ++ if ((frequency->e == 1) && (frequency->m >= (int)2.412e8) + && (frequency->m <= (int)2.487e8)) { freq = ((frequency->m / 10000) - 24000L) / 5; } @@ -906,7 +908,7 @@ index 1cf090d..796011b 100644 - if(!ret) { + if (!ret) { /* Basic checking... */ - if (wrqu->encoding.length = 8) { + if (wrqu->encoding.length == 8) { /* Copy the key in the driver */ @@ -2045,25 +2012,24 @@ static int wavelan_set_encode(struct net_device *dev, psa.psa_encryption_select = 1; @@ -1139,7 +1141,8 @@ index 1cf090d..796011b 100644 * Structures to export the Wireless Handlers */ --static const iw_handler wavelan_handler[] -{ +-static const iw_handler wavelan_handler[] = +-{ - NULL, /* SIOCSIWNAME */ - wavelan_get_name, /* SIOCGIWNAME */ - wavelan_set_nwid, /* SIOCSIWNWID */ @@ -1232,7 +1235,8 @@ index 1cf090d..796011b 100644 + wavelan_get_encode, /* SIOCGIWENCODE */ }; --static const iw_handler wavelan_private_handler[] -{ +-static const iw_handler wavelan_private_handler[] = +-{ - wavelan_set_qthr, /* SIOCIWFIRSTPRIV */ - wavelan_get_qthr, /* SIOCIWFIRSTPRIV + 1 */ +static const iw_handler wavelan_private_handler[] = { @@ -1261,7 +1265,8 @@ index 1cf090d..796011b 100644 + {SIOCGIPHISTO, 0, IW_PRIV_TYPE_INT | 16, "gethisto"}, }; --static const struct iw_handler_def wavelan_handler_def -{ +-static const struct iw_handler_def wavelan_handler_def = +-{ - .num_standard = sizeof(wavelan_handler)/sizeof(iw_handler), - .num_private = sizeof(wavelan_private_handler)/sizeof(iw_handler), - .num_private_args = sizeof(wavelan_private_args)/sizeof(struct iw_priv_args), @@ -1271,14 +1276,16 @@ index 1cf090d..796011b 100644 +static const struct iw_handler_def wavelan_handler_def = { + .num_standard = sizeof(wavelan_handler) / sizeof(iw_handler), + .num_private = sizeof(wavelan_private_handler) / sizeof(iw_handler), -+ .num_private_args + sizeof(wavelan_private_args) / sizeof(struct iw_priv_args), ++ .num_private_args = ++ sizeof(wavelan_private_args) / sizeof(struct iw_priv_args), + .standard = wavelan_handler, + .private = wavelan_private_handler, + .private_args = wavelan_private_args, .get_wireless_stats = wavelan_get_wireless_stats, }; -@@ -2414,7 +2372,7 @@ static const struct iw_handler_def wavelan_handler_def * Get wireless statistics. +@@ -2414,7 +2372,7 @@ static const struct iw_handler_def wavelan_handler_def = + * Get wireless statistics. * Called by /proc/net/wireless */ -static iw_stats *wavelan_get_wireless_stats(struct net_device * dev) @@ -1296,7 +1303,7 @@ index 1cf090d..796011b 100644 #endif /* Check */ - if (lp = (net_local *) NULL) + if (lp == (net_local *) NULL) return (iw_stats *) NULL; - + @@ -1358,8 +1365,8 @@ index 1cf090d..796011b 100644 #endif /* Allocate buffer for the data */ -- if ((skb = dev_alloc_skb(sksize)) = (struct sk_buff *) NULL) { -+ if ((skb = dev_alloc_skb(sksize)) = (struct sk_buff *)NULL) { +- if ((skb = dev_alloc_skb(sksize)) == (struct sk_buff *) NULL) { ++ if ((skb = dev_alloc_skb(sksize)) == (struct sk_buff *)NULL) { #ifdef DEBUG_RX_ERROR printk(KERN_INFO "%s: wv_packet_read(): could not alloc_skb(%d, GFP_ATOMIC).\n", @@ -1416,7 +1423,8 @@ index 1cf090d..796011b 100644 + (unsigned char *)&rbd, sizeof(rbd)); #ifdef DEBUG_RX_ERROR - if ((rbd.rbd_status & RBD_STATUS_EOF) !- RBD_STATUS_EOF) printk(KERN_INFO + if ((rbd.rbd_status & RBD_STATUS_EOF) != +- RBD_STATUS_EOF) printk(KERN_INFO - "%s: wv_receive(): missing EOF flag.\n", - dev->name); + RBD_STATUS_EOF) @@ -1424,7 +1432,8 @@ index 1cf090d..796011b 100644 + "%s: wv_receive(): missing EOF flag.\n", + dev->name); - if ((rbd.rbd_status & RBD_STATUS_F) !- RBD_STATUS_F) printk(KERN_INFO + if ((rbd.rbd_status & RBD_STATUS_F) != +- RBD_STATUS_F) printk(KERN_INFO - "%s: wv_receive(): missing F flag.\n", - dev->name); + RBD_STATUS_F) @@ -1623,7 +1632,8 @@ index 1cf090d..796011b 100644 sizeof(m.mmw_encr_key)); if (psa.psa_encryption_select) -- m.mmw_encr_enable - MMW_ENCR_ENABLE_EN | MMW_ENCR_ENABLE_MODE; +- m.mmw_encr_enable = +- MMW_ENCR_ENABLE_EN | MMW_ENCR_ENABLE_MODE; + m.mmw_encr_enable = MMW_ENCR_ENABLE_EN | MMW_ENCR_ENABLE_MODE; else m.mmw_encr_enable = 0; @@ -1675,17 +1685,18 @@ index 1cf090d..796011b 100644 obram_read(ioaddr, scboff(OFFSET_SCB, scb_status), - (unsigned char *) &scb_cs, sizeof(scb_cs)); + (unsigned char *)&scb_cs, sizeof(scb_cs)); - if ((scb_cs & SCB_ST_RUS) = SCB_ST_RUS_RDY) + if ((scb_cs & SCB_ST_RUS) == SCB_ST_RUS_RDY) return 0; lp->rx_head = OFFSET_RU; for (i = 0, rx = lp->rx_head; i < NRXBLOCKS; i++, rx = rx_next) { -- rx_next - (i = NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; -+ rx_next = (i = NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; +- rx_next = +- (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; ++ rx_next = (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ; fd.fd_status = 0; - fd.fd_command = (i = NRXBLOCKS - 1) ? FD_COMMAND_EL : 0; + fd.fd_command = (i == NRXBLOCKS - 1) ? FD_COMMAND_EL : 0; fd.fd_link_offset = rx_next; fd.fd_rbd_offset = rx + sizeof(fd); - obram_write(ioaddr, rx, (unsigned char *) &fd, sizeof(fd)); @@ -1718,7 +1729,7 @@ index 1cf090d..796011b 100644 obram_read(ioaddr, scboff(OFFSET_SCB, scb_command), - (unsigned char *) &scb_cs, sizeof(scb_cs)); + (unsigned char *)&scb_cs, sizeof(scb_cs)); - if (scb_cs = 0) + if (scb_cs == 0) break; @@ -3229,7 +3178,7 @@ static int wv_ru_start(struct net_device * dev) @@ -1754,7 +1765,8 @@ index 1cf090d..796011b 100644 sizeof(tbd)); } -- first_nop - OFFSET_CU + (NTXBLOCKS - 1) * TXBLOCKZ + sizeof(ac_tx_t); +- first_nop = +- OFFSET_CU + (NTXBLOCKS - 1) * TXBLOCKZ + sizeof(ac_tx_t); + first_nop = OFFSET_CU + (NTXBLOCKS - 1) * TXBLOCKZ + sizeof(ac_tx_t); obram_write(ioaddr, scboff(OFFSET_SCB, scb_cbl_offset), - (unsigned char *) &first_nop, sizeof(first_nop)); @@ -1771,7 +1783,7 @@ index 1cf090d..796011b 100644 obram_read(ioaddr, scboff(OFFSET_SCB, scb_command), - (unsigned char *) &scb_cs, sizeof(scb_cs)); + (unsigned char *)&scb_cs, sizeof(scb_cs)); - if (scb_cs = 0) + if (scb_cs == 0) break; @@ -3330,7 +3277,7 @@ static int wv_cu_start(struct net_device * dev) @@ -1815,8 +1827,8 @@ index 1cf090d..796011b 100644 + obram_read(ioaddr, OFFSET_ISCP, (unsigned char *)&iscp, sizeof(iscp)); -- if (iscp.iscp_busy = (unsigned short) 0) -+ if (iscp.iscp_busy = (unsigned short)0) +- if (iscp.iscp_busy == (unsigned short) 0) ++ if (iscp.iscp_busy == (unsigned short)0) break; udelay(10); @@ -1837,7 +1849,7 @@ index 1cf090d..796011b 100644 + obram_read(ioaddr, OFFSET_SCB, (unsigned char *)&scb, sizeof(scb)); - if (scb.scb_status = (SCB_ST_CX | SCB_ST_CNA)) + if (scb.scb_status == (SCB_ST_CX | SCB_ST_CNA)) @@ -3424,12 +3367,12 @@ static int wv_82586_start(struct net_device * dev) memset(&cb, 0x00, sizeof(cb)); cb.ac_command = AC_CFLD_EL | (AC_CFLD_CMD & acmd_diagnose); @@ -1845,7 +1857,7 @@ index 1cf090d..796011b 100644 - obram_write(ioaddr, OFFSET_CU, (unsigned char *) &cb, sizeof(cb)); + obram_write(ioaddr, OFFSET_CU, (unsigned char *)&cb, sizeof(cb)); - if (wv_synchronous_cmd(dev, "diag()") = -1) + if (wv_synchronous_cmd(dev, "diag()") == -1) return -1; - obram_read(ioaddr, OFFSET_CU, (unsigned char *) &cb, sizeof(cb)); @@ -1889,7 +1901,8 @@ index 1cf090d..796011b 100644 * * Updated from Wavelan Manual WCIN085B */ -- cfg.cfg_byte_cnt - AC_CFG_BYTE_CNT(sizeof(ac_cfg_t) - sizeof(ach_t)); +- cfg.cfg_byte_cnt = +- AC_CFG_BYTE_CNT(sizeof(ac_cfg_t) - sizeof(ach_t)); + cfg.cfg_byte_cnt = AC_CFG_BYTE_CNT(sizeof(ac_cfg_t) - sizeof(ach_t)); cfg.cfg_fifolim = AC_CFG_FIFOLIM(4); cfg.cfg_byte8 = AC_CFG_SAV_BF(1) | AC_CFG_SRDY(0); @@ -1966,7 +1979,8 @@ index 1cf090d..796011b 100644 @@ -3654,10 +3594,9 @@ static void wv_82586_stop(struct net_device * dev) /* Suspend both command unit and receive unit. */ - scb_cmd - (SCB_CMD_CUC & SCB_CMD_CUC_SUS) | (SCB_CMD_RUC & + scb_cmd = +- (SCB_CMD_CUC & SCB_CMD_CUC_SUS) | (SCB_CMD_RUC & - SCB_CMD_RUC_SUS); + (SCB_CMD_CUC & SCB_CMD_CUC_SUS) | (SCB_CMD_RUC & SCB_CMD_RUC_SUS); obram_write(ioaddr, scboff(OFFSET_SCB, scb_command), @@ -2106,7 +2120,7 @@ index 1cf090d..796011b 100644 #endif /* Check irq */ - if (dev->irq = 0) { + if (dev->irq == 0) { #ifdef DEBUG_CONFIG_ERROR - printk(KERN_WARNING "%s: wavelan_open(): no IRQ\n", - dev->name); @@ -2172,7 +2186,7 @@ index 1cf090d..796011b 100644 - psa_read(ioaddr, HACR_DEFAULT, psaoff(0, psa_int_req_no), - &irq_mask, 1); + psa_read(ioaddr, HACR_DEFAULT, psaoff(0, psa_int_req_no), &irq_mask, 1); - if ((irq = wv_psa_to_irq(irq_mask)) = -1) { + if ((irq = wv_psa_to_irq(irq_mask)) == -1) { #ifdef DEBUG_CONFIG_ERROR printk(KERN_INFO @@ -4183,8 +4118,8 @@ static int __init wavelan_config(struct net_device *dev, unsigned short ioaddr) @@ -2239,7 +2253,7 @@ index 1cf090d..796011b 100644 + } else { /* Scan all possible addresses of the WaveLAN hardware. */ for (i = 0; i < ARRAY_SIZE(iobase); i++) { dev->irq = def_irq; - if (wavelan_config(dev, iobase[i]) = 0) { + if (wavelan_config(dev, iobase[i]) == 0) { #ifdef DEBUG_CALLBACK_TRACE printk(KERN_DEBUG - "%s: <-wavelan_probe()\n", @@ -2249,7 +2263,7 @@ index 1cf090d..796011b 100644 break; } @@ -4282,16 +4216,16 @@ struct net_device * __init wavelan_probe(int unit) - if (i = ARRAY_SIZE(iobase)) + if (i == ARRAY_SIZE(iobase)) r = -ENODEV; } - if (r) diff --git a/a/content_digest b/N1/content_digest index 9eccaf2..5ede924 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,6 +1,6 @@ "From\0Denis Cheng <crquan@gmail.com>\0" "Subject\0[PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle\0" - "Date\0Sun, 15 Jul 2007 08:52:50 +0000\0" + "Date\0Sun, 15 Jul 2007 16:52:50 +0800\0" "To\0kernel-janitors@vger.kernel.org\0" "Cc\0linux-kernel@vger.kernel.org" " Denis Cheng <crquan@gmail.com>\0" @@ -180,7 +180,7 @@ "+\t\t (unsigned char *)&scb_cs, sizeof(scb_cs));\n" " \tscb_cs &= SCB_ST_INT;\n" " \n" - " \tif (scb_cs = 0)\n" + " \tif (scb_cs == 0)\n" " \t\treturn;\n" " \n" " \tobram_write(ioaddr, scboff(OFFSET_SCB, scb_command),\n" @@ -193,7 +193,7 @@ " \t\tobram_read(ioaddr, scboff(OFFSET_SCB, scb_command),\n" "-\t\t\t (unsigned char *) &scb_cs, sizeof(scb_cs));\n" "+\t\t\t (unsigned char *)&scb_cs, sizeof(scb_cs));\n" - " \t\tif (scb_cs = 0)\n" + " \t\tif (scb_cs == 0)\n" " \t\t\tbreak;\n" " \n" "@@ -587,7 +586,7 @@ static void wv_ack(struct net_device * dev)\n" @@ -238,7 +238,7 @@ "+\t\t (unsigned char *)&status, sizeof(status));\n" " \n" " \t/* If not completed -> exit */\n" - " \tif ((status & AC_SFLD_C) = 0)\n" + " \tif ((status & AC_SFLD_C) == 0)\n" "@@ -668,7 +666,7 @@ wv_config_complete(struct net_device * dev, unsigned long ioaddr, net_local * lp\n" " \t\t/* check ia-config command */\n" " \t\tias_addr = mcs_addr - sizeof(ac_ias_t);\n" @@ -290,12 +290,14 @@ "+\t\t\t (unsigned char *)&tx_status, sizeof(tx_status));\n" " \n" " \t\t/* If not completed -> exit */\n" - " \t\tif ((tx_status & AC_SFLD_C) = 0)\n" + " \t\tif ((tx_status & AC_SFLD_C) == 0)\n" "@@ -743,9 +740,8 @@ if (lp->tx_n_in_use > 0)\n" " \t\t\t/* Next one in the chain */\n" " \t\t\tlp->tx_first_in_use += TXBLOCKZ;\n" - " \t\t\tif (lp->tx_first_in_use >-\t\t\t OFFSET_CU +\n" - "-\t\t\t NTXBLOCKS * TXBLOCKZ) lp->tx_first_in_use --\t\t\t\t NTXBLOCKS * TXBLOCKZ;\n" + " \t\t\tif (lp->tx_first_in_use >=\n" + "-\t\t\t OFFSET_CU +\n" + "-\t\t\t NTXBLOCKS * TXBLOCKZ) lp->tx_first_in_use -=\n" + "-\t\t\t\t NTXBLOCKS * TXBLOCKZ;\n" "+\t\t\t OFFSET_CU + NTXBLOCKS * TXBLOCKZ)\n" "+\t\t\t\tlp->tx_first_in_use -= NTXBLOCKS * TXBLOCKZ;\n" " \t\t}\n" @@ -399,7 +401,7 @@ "-\t \"\");\n" "+\t\tscb_status & SCB_ST_RNR) ? \"receiving unit not ready,\" : \"\");\n" " \tprintk(\"cus 0x%x[%s%s%s] \", (scb.scb_status & SCB_ST_CUS) >> 8,\n" - " \t ((scb.scb_status & SCB_ST_CUS) =\n" + " \t ((scb.scb_status & SCB_ST_CUS) ==\n" " \t\tSCB_ST_CUS_IDLE) ? \"idle\" : \"\",\n" "@@ -1093,8 +1081,7 @@ static void wv_scb_show(unsigned long ioaddr)\n" " \t\tscb_command & SCB_CMD_ACK_FR) ? \"ack frame received,\" : \"\",\n" @@ -410,7 +412,7 @@ "+\t (scb.scb_command & SCB_CMD_ACK_RNR) ? \"ack RU not ready,\" : \"\");\n" " \tprintk(\"cuc 0x%x[%s%s%s%s%s] \",\n" " \t (scb.scb_command & SCB_CMD_CUC) >> 8,\n" - " \t ((scb.scb_command & SCB_CMD_CUC) =\n" + " \t ((scb.scb_command & SCB_CMD_CUC) ==\n" "@@ -1133,12 +1120,11 @@ static void wv_scb_show(unsigned long ioaddr)\n" " /*\n" " * Print the formatted status of the i82586's receive unit.\n" @@ -591,10 +593,10 @@ " \t * the two limits with a 0.5 MHz precision. In practice,\n" " \t * I don't want you to have trouble with local regulations.\n" " \t */\n" - "-\tif ((frequency->e = 1) &&\n" + "-\tif ((frequency->e == 1) &&\n" "-\t (frequency->m >= (int) 2.412e8)\n" "-\t && (frequency->m <= (int) 2.487e8)) {\n" - "+\tif ((frequency->e = 1) && (frequency->m >= (int)2.412e8)\n" + "+\tif ((frequency->e == 1) && (frequency->m >= (int)2.412e8)\n" "+\t && (frequency->m <= (int)2.487e8)) {\n" " \t\tfreq = ((frequency->m / 10000) - 24000L) / 5;\n" " \t}\n" @@ -914,7 +916,7 @@ "-\tif(!ret) {\n" "+\tif (!ret) {\n" " \t\t/* Basic checking... */\n" - " \t\tif (wrqu->encoding.length = 8) {\n" + " \t\tif (wrqu->encoding.length == 8) {\n" " \t\t\t/* Copy the key in the driver */\n" "@@ -2045,25 +2012,24 @@ static int wavelan_set_encode(struct net_device *dev,\n" " \t\t\tpsa.psa_encryption_select = 1;\n" @@ -1147,7 +1149,8 @@ " * Structures to export the Wireless Handlers\n" " */\n" " \n" - "-static const iw_handler\t\twavelan_handler[] -{\n" + "-static const iw_handler\t\twavelan_handler[] =\n" + "-{\n" "-\tNULL,\t\t\t\t/* SIOCSIWNAME */\n" "-\twavelan_get_name,\t\t/* SIOCGIWNAME */\n" "-\twavelan_set_nwid,\t\t/* SIOCSIWNWID */\n" @@ -1240,7 +1243,8 @@ "+\twavelan_get_encode,\t/* SIOCGIWENCODE */\n" " };\n" " \n" - "-static const iw_handler\t\twavelan_private_handler[] -{\n" + "-static const iw_handler\t\twavelan_private_handler[] =\n" + "-{\n" "-\twavelan_set_qthr,\t\t/* SIOCIWFIRSTPRIV */\n" "-\twavelan_get_qthr,\t\t/* SIOCIWFIRSTPRIV + 1 */\n" "+static const iw_handler wavelan_private_handler[] = {\n" @@ -1269,7 +1273,8 @@ "+\t{SIOCGIPHISTO, 0, IW_PRIV_TYPE_INT | 16, \"gethisto\"},\n" " };\n" " \n" - "-static const struct iw_handler_def\twavelan_handler_def -{\n" + "-static const struct iw_handler_def\twavelan_handler_def =\n" + "-{\n" "-\t.num_standard\t= sizeof(wavelan_handler)/sizeof(iw_handler),\n" "-\t.num_private\t= sizeof(wavelan_private_handler)/sizeof(iw_handler),\n" "-\t.num_private_args = sizeof(wavelan_private_args)/sizeof(struct iw_priv_args),\n" @@ -1279,14 +1284,16 @@ "+static const struct iw_handler_def wavelan_handler_def = {\n" "+\t.num_standard = sizeof(wavelan_handler) / sizeof(iw_handler),\n" "+\t.num_private = sizeof(wavelan_private_handler) / sizeof(iw_handler),\n" - "+\t.num_private_args +\t sizeof(wavelan_private_args) / sizeof(struct iw_priv_args),\n" + "+\t.num_private_args =\n" + "+\t sizeof(wavelan_private_args) / sizeof(struct iw_priv_args),\n" "+\t.standard = wavelan_handler,\n" "+\t.private = wavelan_private_handler,\n" "+\t.private_args = wavelan_private_args,\n" " \t.get_wireless_stats = wavelan_get_wireless_stats,\n" " };\n" " \n" - "@@ -2414,7 +2372,7 @@ static const struct iw_handler_def\twavelan_handler_def * Get wireless statistics.\n" + "@@ -2414,7 +2372,7 @@ static const struct iw_handler_def\twavelan_handler_def =\n" + " * Get wireless statistics.\n" " * Called by /proc/net/wireless\n" " */\n" "-static iw_stats *wavelan_get_wireless_stats(struct net_device * dev)\n" @@ -1304,7 +1311,7 @@ " #endif\n" " \n" " \t/* Check */\n" - " \tif (lp = (net_local *) NULL)\n" + " \tif (lp == (net_local *) NULL)\n" " \t\treturn (iw_stats *) NULL;\n" "-\t\n" "+\n" @@ -1366,8 +1373,8 @@ " #endif\n" " \n" " \t/* Allocate buffer for the data */\n" - "-\tif ((skb = dev_alloc_skb(sksize)) = (struct sk_buff *) NULL) {\n" - "+\tif ((skb = dev_alloc_skb(sksize)) = (struct sk_buff *)NULL) {\n" + "-\tif ((skb = dev_alloc_skb(sksize)) == (struct sk_buff *) NULL) {\n" + "+\tif ((skb = dev_alloc_skb(sksize)) == (struct sk_buff *)NULL) {\n" " #ifdef DEBUG_RX_ERROR\n" " \t\tprintk(KERN_INFO\n" " \t\t \"%s: wv_packet_read(): could not alloc_skb(%d, GFP_ATOMIC).\\n\",\n" @@ -1424,7 +1431,8 @@ "+\t\t\t\t\t (unsigned char *)&rbd, sizeof(rbd));\n" " \n" " #ifdef DEBUG_RX_ERROR\n" - " \t\t\t\tif ((rbd.rbd_status & RBD_STATUS_EOF) !-\t\t\t\t RBD_STATUS_EOF) printk(KERN_INFO\n" + " \t\t\t\tif ((rbd.rbd_status & RBD_STATUS_EOF) !=\n" + "-\t\t\t\t RBD_STATUS_EOF) printk(KERN_INFO\n" "-\t\t\t\t\t\t\t \"%s: wv_receive(): missing EOF flag.\\n\",\n" "-\t\t\t\t\t\t\t dev->name);\n" "+\t\t\t\t RBD_STATUS_EOF)\n" @@ -1432,7 +1440,8 @@ "+\t\t\t\t\t \"%s: wv_receive(): missing EOF flag.\\n\",\n" "+\t\t\t\t\t dev->name);\n" " \n" - " \t\t\t\tif ((rbd.rbd_status & RBD_STATUS_F) !-\t\t\t\t RBD_STATUS_F) printk(KERN_INFO\n" + " \t\t\t\tif ((rbd.rbd_status & RBD_STATUS_F) !=\n" + "-\t\t\t\t RBD_STATUS_F) printk(KERN_INFO\n" "-\t\t\t\t\t\t\t \"%s: wv_receive(): missing F flag.\\n\",\n" "-\t\t\t\t\t\t\t dev->name);\n" "+\t\t\t\t RBD_STATUS_F)\n" @@ -1631,7 +1640,8 @@ " \t sizeof(m.mmw_encr_key));\n" " \n" " \tif (psa.psa_encryption_select)\n" - "-\t\tm.mmw_encr_enable -\t\t MMW_ENCR_ENABLE_EN | MMW_ENCR_ENABLE_MODE;\n" + "-\t\tm.mmw_encr_enable =\n" + "-\t\t MMW_ENCR_ENABLE_EN | MMW_ENCR_ENABLE_MODE;\n" "+\t\tm.mmw_encr_enable = MMW_ENCR_ENABLE_EN | MMW_ENCR_ENABLE_MODE;\n" " \telse\n" " \t\tm.mmw_encr_enable = 0;\n" @@ -1683,17 +1693,18 @@ " \tobram_read(ioaddr, scboff(OFFSET_SCB, scb_status),\n" "-\t\t (unsigned char *) &scb_cs, sizeof(scb_cs));\n" "+\t\t (unsigned char *)&scb_cs, sizeof(scb_cs));\n" - " \tif ((scb_cs & SCB_ST_RUS) = SCB_ST_RUS_RDY)\n" + " \tif ((scb_cs & SCB_ST_RUS) == SCB_ST_RUS_RDY)\n" " \t\treturn 0;\n" " \n" " \tlp->rx_head = OFFSET_RU;\n" " \n" " \tfor (i = 0, rx = lp->rx_head; i < NRXBLOCKS; i++, rx = rx_next) {\n" - "-\t\trx_next -\t\t (i = NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ;\n" - "+\t\trx_next = (i = NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ;\n" + "-\t\trx_next =\n" + "-\t\t (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ;\n" + "+\t\trx_next = (i == NRXBLOCKS - 1) ? lp->rx_head : rx + RXBLOCKZ;\n" " \n" " \t\tfd.fd_status = 0;\n" - " \t\tfd.fd_command = (i = NRXBLOCKS - 1) ? FD_COMMAND_EL : 0;\n" + " \t\tfd.fd_command = (i == NRXBLOCKS - 1) ? FD_COMMAND_EL : 0;\n" " \t\tfd.fd_link_offset = rx_next;\n" " \t\tfd.fd_rbd_offset = rx + sizeof(fd);\n" "-\t\tobram_write(ioaddr, rx, (unsigned char *) &fd, sizeof(fd));\n" @@ -1726,7 +1737,7 @@ " \t\tobram_read(ioaddr, scboff(OFFSET_SCB, scb_command),\n" "-\t\t\t (unsigned char *) &scb_cs, sizeof(scb_cs));\n" "+\t\t\t (unsigned char *)&scb_cs, sizeof(scb_cs));\n" - " \t\tif (scb_cs = 0)\n" + " \t\tif (scb_cs == 0)\n" " \t\t\tbreak;\n" " \n" "@@ -3229,7 +3178,7 @@ static int wv_ru_start(struct net_device * dev)\n" @@ -1762,7 +1773,8 @@ " \t\t\t sizeof(tbd));\n" " \t}\n" " \n" - "-\tfirst_nop -\t OFFSET_CU + (NTXBLOCKS - 1) * TXBLOCKZ + sizeof(ac_tx_t);\n" + "-\tfirst_nop =\n" + "-\t OFFSET_CU + (NTXBLOCKS - 1) * TXBLOCKZ + sizeof(ac_tx_t);\n" "+\tfirst_nop = OFFSET_CU + (NTXBLOCKS - 1) * TXBLOCKZ + sizeof(ac_tx_t);\n" " \tobram_write(ioaddr, scboff(OFFSET_SCB, scb_cbl_offset),\n" "-\t\t (unsigned char *) &first_nop, sizeof(first_nop));\n" @@ -1779,7 +1791,7 @@ " \t\tobram_read(ioaddr, scboff(OFFSET_SCB, scb_command),\n" "-\t\t\t (unsigned char *) &scb_cs, sizeof(scb_cs));\n" "+\t\t\t (unsigned char *)&scb_cs, sizeof(scb_cs));\n" - " \t\tif (scb_cs = 0)\n" + " \t\tif (scb_cs == 0)\n" " \t\t\tbreak;\n" " \n" "@@ -3330,7 +3277,7 @@ static int wv_cu_start(struct net_device * dev)\n" @@ -1823,8 +1835,8 @@ "+\t\tobram_read(ioaddr, OFFSET_ISCP, (unsigned char *)&iscp,\n" " \t\t\t sizeof(iscp));\n" " \n" - "-\t\tif (iscp.iscp_busy = (unsigned short) 0)\n" - "+\t\tif (iscp.iscp_busy = (unsigned short)0)\n" + "-\t\tif (iscp.iscp_busy == (unsigned short) 0)\n" + "+\t\tif (iscp.iscp_busy == (unsigned short)0)\n" " \t\t\tbreak;\n" " \n" " \t\tudelay(10);\n" @@ -1845,7 +1857,7 @@ "+\t\tobram_read(ioaddr, OFFSET_SCB, (unsigned char *)&scb,\n" " \t\t\t sizeof(scb));\n" " \n" - " \t\tif (scb.scb_status = (SCB_ST_CX | SCB_ST_CNA))\n" + " \t\tif (scb.scb_status == (SCB_ST_CX | SCB_ST_CNA))\n" "@@ -3424,12 +3367,12 @@ static int wv_82586_start(struct net_device * dev)\n" " \tmemset(&cb, 0x00, sizeof(cb));\n" " \tcb.ac_command = AC_CFLD_EL | (AC_CFLD_CMD & acmd_diagnose);\n" @@ -1853,7 +1865,7 @@ "-\tobram_write(ioaddr, OFFSET_CU, (unsigned char *) &cb, sizeof(cb));\n" "+\tobram_write(ioaddr, OFFSET_CU, (unsigned char *)&cb, sizeof(cb));\n" " \n" - " \tif (wv_synchronous_cmd(dev, \"diag()\") = -1)\n" + " \tif (wv_synchronous_cmd(dev, \"diag()\") == -1)\n" " \t\treturn -1;\n" " \n" "-\tobram_read(ioaddr, OFFSET_CU, (unsigned char *) &cb, sizeof(cb));\n" @@ -1897,7 +1909,8 @@ " \t *\n" " \t * Updated from Wavelan Manual WCIN085B\n" " \t */\n" - "-\tcfg.cfg_byte_cnt -\t AC_CFG_BYTE_CNT(sizeof(ac_cfg_t) - sizeof(ach_t));\n" + "-\tcfg.cfg_byte_cnt =\n" + "-\t AC_CFG_BYTE_CNT(sizeof(ac_cfg_t) - sizeof(ach_t));\n" "+\tcfg.cfg_byte_cnt = AC_CFG_BYTE_CNT(sizeof(ac_cfg_t) - sizeof(ach_t));\n" " \tcfg.cfg_fifolim = AC_CFG_FIFOLIM(4);\n" " \tcfg.cfg_byte8 = AC_CFG_SAV_BF(1) | AC_CFG_SRDY(0);\n" @@ -1974,7 +1987,8 @@ "@@ -3654,10 +3594,9 @@ static void wv_82586_stop(struct net_device * dev)\n" " \n" " \t/* Suspend both command unit and receive unit. */\n" - " \tscb_cmd -\t (SCB_CMD_CUC & SCB_CMD_CUC_SUS) | (SCB_CMD_RUC &\n" + " \tscb_cmd =\n" + "-\t (SCB_CMD_CUC & SCB_CMD_CUC_SUS) | (SCB_CMD_RUC &\n" "-\t\t\t\t\t SCB_CMD_RUC_SUS);\n" "+\t (SCB_CMD_CUC & SCB_CMD_CUC_SUS) | (SCB_CMD_RUC & SCB_CMD_RUC_SUS);\n" " \tobram_write(ioaddr, scboff(OFFSET_SCB, scb_command),\n" @@ -2114,7 +2128,7 @@ " #endif\n" " \n" " \t/* Check irq */\n" - " \tif (dev->irq = 0) {\n" + " \tif (dev->irq == 0) {\n" " #ifdef DEBUG_CONFIG_ERROR\n" "-\t\tprintk(KERN_WARNING \"%s: wavelan_open(): no IRQ\\n\",\n" "-\t\t dev->name);\n" @@ -2180,7 +2194,7 @@ "-\tpsa_read(ioaddr, HACR_DEFAULT, psaoff(0, psa_int_req_no),\n" "-\t\t &irq_mask, 1);\n" "+\tpsa_read(ioaddr, HACR_DEFAULT, psaoff(0, psa_int_req_no), &irq_mask, 1);\n" - " \tif ((irq = wv_psa_to_irq(irq_mask)) = -1) {\n" + " \tif ((irq = wv_psa_to_irq(irq_mask)) == -1) {\n" " #ifdef DEBUG_CONFIG_ERROR\n" " \t\tprintk(KERN_INFO\n" "@@ -4183,8 +4118,8 @@ static int __init wavelan_config(struct net_device *dev, unsigned short ioaddr)\n" @@ -2247,7 +2261,7 @@ "+\t} else {\t\t/* Scan all possible addresses of the WaveLAN hardware. */\n" " \t\tfor (i = 0; i < ARRAY_SIZE(iobase); i++) {\n" " \t\t\tdev->irq = def_irq;\n" - " \t\t\tif (wavelan_config(dev, iobase[i]) = 0) {\n" + " \t\t\tif (wavelan_config(dev, iobase[i]) == 0) {\n" " #ifdef DEBUG_CALLBACK_TRACE\n" " \t\t\t\tprintk(KERN_DEBUG\n" "-\t\t\t\t \"%s: <-wavelan_probe()\\n\",\n" @@ -2257,7 +2271,7 @@ " \t\t\t\tbreak;\n" " \t\t\t}\n" "@@ -4282,16 +4216,16 @@ struct net_device * __init wavelan_probe(int unit)\n" - " \t\tif (i = ARRAY_SIZE(iobase))\n" + " \t\tif (i == ARRAY_SIZE(iobase))\n" " \t\t\tr = -ENODEV;\n" " \t}\n" "-\tif (r) \n" @@ -2306,4 +2320,4 @@ "-- \n" 1.5.2.2 -d9efbc39e7b3a878917257c654c2eb8c335b42fc0f546093da41728f448a33da +ef87d8e85aaacf81fb311dd9f761352a84deb4dfd98d3ab811bd53823e6f3fc0
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.