Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/qeth: static checker cleanups

- Add/delete some blanks, white spaces and braces.
- Fix misindentations.
- Adjust a deprecated header include, and htons() conversion.
- Remove extra 'return' statements.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julian Wiedmann and committed by
David S. Miller
378ac80d 84c91482

+22 -23
+4 -3
drivers/s390/net/qeth_core.h
··· 177 177 /** 178 178 * some more defs 179 179 */ 180 - #define QETH_TX_TIMEOUT 100 * HZ 181 - #define QETH_RCD_TIMEOUT 60 * HZ 180 + #define QETH_TX_TIMEOUT (100 * HZ) 181 + #define QETH_RCD_TIMEOUT (60 * HZ) 182 182 #define QETH_RECLAIM_WORK_TIME HZ 183 183 #define QETH_MAX_PORTNO 15 184 184 ··· 1069 1069 1070 1070 struct net_device *qeth_clone_netdev(struct net_device *orig); 1071 1071 struct qeth_card *qeth_get_card_by_busid(char *bus_id); 1072 - void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int); 1072 + void qeth_set_allowed_threads(struct qeth_card *card, unsigned long threads, 1073 + int clear_start_mask); 1073 1074 int qeth_threads_running(struct qeth_card *, unsigned long); 1074 1075 int qeth_set_offline(struct qeth_card *card, bool resetting); 1075 1076
+9 -9
drivers/s390/net/qeth_core_main.c
··· 17 17 #include <linux/errno.h> 18 18 #include <linux/kernel.h> 19 19 #include <linux/log2.h> 20 + #include <linux/io.h> 20 21 #include <linux/ip.h> 21 22 #include <linux/tcp.h> 22 23 #include <linux/mii.h> ··· 36 35 37 36 #include <asm/ebcdic.h> 38 37 #include <asm/chpid.h> 39 - #include <asm/io.h> 40 38 #include <asm/sysinfo.h> 41 39 #include <asm/diag.h> 42 40 #include <asm/cio.h> ··· 209 209 210 210 QETH_CARD_TEXT(card, 5, "clwrklst"); 211 211 list_for_each_entry_safe(pool_entry, tmp, 212 - &card->qdio.in_buf_pool.entry_list, list){ 213 - list_del(&pool_entry->list); 214 - } 212 + &card->qdio.in_buf_pool.entry_list, list) 213 + list_del(&pool_entry->list); 215 214 216 215 for (i = 0; i < ARRAY_SIZE(queue->bufs); i++) 217 216 queue->bufs[i].pool_entry = NULL; ··· 480 481 atomic_read(&c->state) == 481 482 QETH_QDIO_BUF_HANDLED_DELAYED) { 482 483 struct qeth_qdio_out_buffer *f = c; 484 + 483 485 QETH_CARD_TEXT(f->q->card, 5, "fp"); 484 486 QETH_CARD_TEXT_(f->q->card, 5, "%lx", (long) f); 485 487 /* release here to avoid interleaving between ··· 506 506 QETH_CARD_TEXT(q->card, 2, "clprecov"); 507 507 } 508 508 } 509 - 510 509 511 510 static void qeth_qdio_handle_aob(struct qeth_card *card, 512 511 unsigned long phys_aob_addr) ··· 883 884 { 884 885 const char *ipa_name; 885 886 int com = cmd->hdr.command; 887 + 886 888 ipa_name = qeth_get_ipa_cmd_name(com); 887 889 888 890 if (rc) ··· 1253 1253 return 0; 1254 1254 } 1255 1255 QETH_CARD_TEXT(card, 2, "DGENCHK"); 1256 - return -EIO; 1256 + return -EIO; 1257 1257 } 1258 1258 return 0; 1259 1259 } ··· 1600 1600 struct task_struct *ts; 1601 1601 struct qeth_card *card = container_of(work, struct qeth_card, 1602 1602 kernel_thread_starter); 1603 - QETH_CARD_TEXT(card , 2, "strthrd"); 1603 + QETH_CARD_TEXT(card, 2, "strthrd"); 1604 1604 1605 1605 if (card->read.state != CH_STATE_UP && 1606 1606 card->write.state != CH_STATE_UP) ··· 3416 3416 memcpy(tid->vmname, info322->vm[0].name, sizeof(tid->vmname)); 3417 3417 } 3418 3418 free_page(info); 3419 - return; 3420 3419 } 3421 3420 3422 3421 static int qeth_hw_trap_cb(struct qeth_card *card, ··· 4997 4998 card->options.cq = QETH_CQ_NOTAVAILABLE; 4998 4999 } 4999 5000 5000 - 5001 5001 out_offline: 5002 5002 if (ddev_offline == 1) 5003 5003 qeth_stop_channel(channel); ··· 6048 6050 static void qeth_unregister_dbf_views(void) 6049 6051 { 6050 6052 int x; 6053 + 6051 6054 for (x = 0; x < QETH_DBF_INFOS; x++) { 6052 6055 debug_unregister(qeth_dbf[x].id); 6053 6056 qeth_dbf[x].id = NULL; ··· 6412 6413 static void qeth_core_shutdown(struct ccwgroup_device *gdev) 6413 6414 { 6414 6415 struct qeth_card *card = dev_get_drvdata(&gdev->dev); 6416 + 6415 6417 qeth_set_allowed_threads(card, 0, 1); 6416 6418 if ((gdev->state == CCWGROUP_ONLINE) && card->info.hwtrap) 6417 6419 qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
+2 -3
drivers/s390/net/qeth_l2_main.c
··· 183 183 /* VSWITCH relies on the VLAN 184 184 * information to be present in 185 185 * the QDIO header */ 186 - if (veth->h_vlan_proto == __constant_htons(ETH_P_8021Q)) { 186 + if (veth->h_vlan_proto == htons(ETH_P_8021Q)) { 187 187 hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_VLAN; 188 188 hdr->hdr.l2.vlan_id = ntohs(veth->h_vlan_TCI); 189 189 } ··· 877 877 .ndo_set_mac_address = qeth_l2_set_mac_address, 878 878 .ndo_vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid, 879 879 .ndo_vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid, 880 - .ndo_tx_timeout = qeth_tx_timeout, 880 + .ndo_tx_timeout = qeth_tx_timeout, 881 881 .ndo_fix_features = qeth_fix_features, 882 882 .ndo_set_features = qeth_set_features, 883 883 .ndo_bridge_getlink = qeth_l2_bridge_getlink, ··· 1125 1125 QETH_CARD_TEXT(card, 2, "osndereg"); 1126 1126 card->osn_info.assist_cb = NULL; 1127 1127 card->osn_info.data_cb = NULL; 1128 - return; 1129 1128 } 1130 1129 EXPORT_SYMBOL(qeth_osn_deregister); 1131 1130 #endif
+3 -4
drivers/s390/net/qeth_l3_main.c
··· 97 97 return false; 98 98 99 99 qeth_l3_convert_addr_to_bits((u8 *) &addr->u, addr_bits, 100 - (addr->proto == QETH_PROT_IPV4)? 4:16); 100 + (addr->proto == QETH_PROT_IPV4) ? 4 : 16); 101 101 list_for_each_entry(ipatoe, &card->ipato.entries, entry) { 102 102 if (addr->proto != ipatoe->proto) 103 103 continue; ··· 540 540 if (ipatoe->proto != new->proto) 541 541 continue; 542 542 if (!memcmp(ipatoe->addr, new->addr, 543 - (ipatoe->proto == QETH_PROT_IPV4)? 4:16) && 543 + (ipatoe->proto == QETH_PROT_IPV4) ? 4 : 16) && 544 544 (ipatoe->mask_bits == new->mask_bits)) { 545 545 rc = -EEXIST; 546 546 break; ··· 572 572 if (ipatoe->proto != proto) 573 573 continue; 574 574 if (!memcmp(ipatoe->addr, addr, 575 - (proto == QETH_PROT_IPV4)? 4:16) && 575 + (proto == QETH_PROT_IPV4) ? 4 : 16) && 576 576 (ipatoe->mask_bits == mask_bits)) { 577 577 list_del(&ipatoe->entry); 578 578 qeth_l3_update_ipato(card); ··· 2139 2139 static int qeth_l3_ip_event(struct notifier_block *this, 2140 2140 unsigned long event, void *ptr) 2141 2141 { 2142 - 2143 2142 struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; 2144 2143 struct net_device *dev = ifa->ifa_dev->dev; 2145 2144 struct qeth_ipaddr addr;
+4 -4
drivers/s390/net/qeth_l3_sys.c
··· 285 285 { 286 286 struct qeth_card *card = dev_get_drvdata(dev); 287 287 288 - return sprintf(buf, "%i\n", card->ipato.enabled? 1:0); 288 + return sprintf(buf, "%u\n", card->ipato.enabled ? 1 : 0); 289 289 } 290 290 291 291 static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev, ··· 330 330 { 331 331 struct qeth_card *card = dev_get_drvdata(dev); 332 332 333 - return sprintf(buf, "%i\n", card->ipato.invert4? 1:0); 333 + return sprintf(buf, "%u\n", card->ipato.invert4 ? 1 : 0); 334 334 } 335 335 336 336 static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev, ··· 450 450 return -ENOMEM; 451 451 452 452 ipatoe->proto = proto; 453 - memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4)? 4:16); 453 + memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4) ? 4 : 16); 454 454 ipatoe->mask_bits = mask_bits; 455 455 456 456 rc = qeth_l3_add_ipato_entry(card, ipatoe); ··· 501 501 { 502 502 struct qeth_card *card = dev_get_drvdata(dev); 503 503 504 - return sprintf(buf, "%i\n", card->ipato.invert6? 1:0); 504 + return sprintf(buf, "%u\n", card->ipato.invert6 ? 1 : 0); 505 505 } 506 506 507 507 static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev,