Commit 378ac80d authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

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: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84c91482
...@@ -177,8 +177,8 @@ struct qeth_vnicc_info { ...@@ -177,8 +177,8 @@ struct qeth_vnicc_info {
/** /**
* some more defs * some more defs
*/ */
#define QETH_TX_TIMEOUT 100 * HZ #define QETH_TX_TIMEOUT (100 * HZ)
#define QETH_RCD_TIMEOUT 60 * HZ #define QETH_RCD_TIMEOUT (60 * HZ)
#define QETH_RECLAIM_WORK_TIME HZ #define QETH_RECLAIM_WORK_TIME HZ
#define QETH_MAX_PORTNO 15 #define QETH_MAX_PORTNO 15
...@@ -1069,7 +1069,8 @@ extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS]; ...@@ -1069,7 +1069,8 @@ extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS];
struct net_device *qeth_clone_netdev(struct net_device *orig); struct net_device *qeth_clone_netdev(struct net_device *orig);
struct qeth_card *qeth_get_card_by_busid(char *bus_id); struct qeth_card *qeth_get_card_by_busid(char *bus_id);
void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int); void qeth_set_allowed_threads(struct qeth_card *card, unsigned long threads,
int clear_start_mask);
int qeth_threads_running(struct qeth_card *, unsigned long); int qeth_threads_running(struct qeth_card *, unsigned long);
int qeth_set_offline(struct qeth_card *card, bool resetting); int qeth_set_offline(struct qeth_card *card, bool resetting);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/log2.h> #include <linux/log2.h>
#include <linux/io.h>
#include <linux/ip.h> #include <linux/ip.h>
#include <linux/tcp.h> #include <linux/tcp.h>
#include <linux/mii.h> #include <linux/mii.h>
...@@ -35,7 +36,6 @@ ...@@ -35,7 +36,6 @@
#include <asm/ebcdic.h> #include <asm/ebcdic.h>
#include <asm/chpid.h> #include <asm/chpid.h>
#include <asm/io.h>
#include <asm/sysinfo.h> #include <asm/sysinfo.h>
#include <asm/diag.h> #include <asm/diag.h>
#include <asm/cio.h> #include <asm/cio.h>
...@@ -209,9 +209,8 @@ static void qeth_clear_working_pool_list(struct qeth_card *card) ...@@ -209,9 +209,8 @@ static void qeth_clear_working_pool_list(struct qeth_card *card)
QETH_CARD_TEXT(card, 5, "clwrklst"); QETH_CARD_TEXT(card, 5, "clwrklst");
list_for_each_entry_safe(pool_entry, tmp, list_for_each_entry_safe(pool_entry, tmp,
&card->qdio.in_buf_pool.entry_list, list){ &card->qdio.in_buf_pool.entry_list, list)
list_del(&pool_entry->list); list_del(&pool_entry->list);
}
for (i = 0; i < ARRAY_SIZE(queue->bufs); i++) for (i = 0; i < ARRAY_SIZE(queue->bufs); i++)
queue->bufs[i].pool_entry = NULL; queue->bufs[i].pool_entry = NULL;
...@@ -481,6 +480,7 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx, ...@@ -481,6 +480,7 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx,
atomic_read(&c->state) == atomic_read(&c->state) ==
QETH_QDIO_BUF_HANDLED_DELAYED) { QETH_QDIO_BUF_HANDLED_DELAYED) {
struct qeth_qdio_out_buffer *f = c; struct qeth_qdio_out_buffer *f = c;
QETH_CARD_TEXT(f->q->card, 5, "fp"); QETH_CARD_TEXT(f->q->card, 5, "fp");
QETH_CARD_TEXT_(f->q->card, 5, "%lx", (long) f); QETH_CARD_TEXT_(f->q->card, 5, "%lx", (long) f);
/* release here to avoid interleaving between /* release here to avoid interleaving between
...@@ -507,7 +507,6 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx, ...@@ -507,7 +507,6 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx,
} }
} }
static void qeth_qdio_handle_aob(struct qeth_card *card, static void qeth_qdio_handle_aob(struct qeth_card *card,
unsigned long phys_aob_addr) unsigned long phys_aob_addr)
{ {
...@@ -884,6 +883,7 @@ static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc, ...@@ -884,6 +883,7 @@ static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc,
{ {
const char *ipa_name; const char *ipa_name;
int com = cmd->hdr.command; int com = cmd->hdr.command;
ipa_name = qeth_get_ipa_cmd_name(com); ipa_name = qeth_get_ipa_cmd_name(com);
if (rc) if (rc)
...@@ -1600,7 +1600,7 @@ static void qeth_start_kernel_thread(struct work_struct *work) ...@@ -1600,7 +1600,7 @@ static void qeth_start_kernel_thread(struct work_struct *work)
struct task_struct *ts; struct task_struct *ts;
struct qeth_card *card = container_of(work, struct qeth_card, struct qeth_card *card = container_of(work, struct qeth_card,
kernel_thread_starter); kernel_thread_starter);
QETH_CARD_TEXT(card , 2, "strthrd"); QETH_CARD_TEXT(card, 2, "strthrd");
if (card->read.state != CH_STATE_UP && if (card->read.state != CH_STATE_UP &&
card->write.state != CH_STATE_UP) card->write.state != CH_STATE_UP)
...@@ -3416,7 +3416,6 @@ static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid) ...@@ -3416,7 +3416,6 @@ static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid)
memcpy(tid->vmname, info322->vm[0].name, sizeof(tid->vmname)); memcpy(tid->vmname, info322->vm[0].name, sizeof(tid->vmname));
} }
free_page(info); free_page(info);
return;
} }
static int qeth_hw_trap_cb(struct qeth_card *card, static int qeth_hw_trap_cb(struct qeth_card *card,
...@@ -4998,7 +4997,6 @@ static void qeth_determine_capabilities(struct qeth_card *card) ...@@ -4998,7 +4997,6 @@ static void qeth_determine_capabilities(struct qeth_card *card)
card->options.cq = QETH_CQ_NOTAVAILABLE; card->options.cq = QETH_CQ_NOTAVAILABLE;
} }
out_offline: out_offline:
if (ddev_offline == 1) if (ddev_offline == 1)
qeth_stop_channel(channel); qeth_stop_channel(channel);
...@@ -6050,6 +6048,7 @@ EXPORT_SYMBOL_GPL(qeth_send_simple_setassparms_prot); ...@@ -6050,6 +6048,7 @@ EXPORT_SYMBOL_GPL(qeth_send_simple_setassparms_prot);
static void qeth_unregister_dbf_views(void) static void qeth_unregister_dbf_views(void)
{ {
int x; int x;
for (x = 0; x < QETH_DBF_INFOS; x++) { for (x = 0; x < QETH_DBF_INFOS; x++) {
debug_unregister(qeth_dbf[x].id); debug_unregister(qeth_dbf[x].id);
qeth_dbf[x].id = NULL; qeth_dbf[x].id = NULL;
...@@ -6413,6 +6412,7 @@ static int qeth_core_set_offline(struct ccwgroup_device *gdev) ...@@ -6413,6 +6412,7 @@ static int qeth_core_set_offline(struct ccwgroup_device *gdev)
static void qeth_core_shutdown(struct ccwgroup_device *gdev) static void qeth_core_shutdown(struct ccwgroup_device *gdev)
{ {
struct qeth_card *card = dev_get_drvdata(&gdev->dev); struct qeth_card *card = dev_get_drvdata(&gdev->dev);
qeth_set_allowed_threads(card, 0, 1); qeth_set_allowed_threads(card, 0, 1);
if ((gdev->state == CCWGROUP_ONLINE) && card->info.hwtrap) if ((gdev->state == CCWGROUP_ONLINE) && card->info.hwtrap)
qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM); qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
......
...@@ -183,7 +183,7 @@ static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue, ...@@ -183,7 +183,7 @@ static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue,
/* VSWITCH relies on the VLAN /* VSWITCH relies on the VLAN
* information to be present in * information to be present in
* the QDIO header */ * the QDIO header */
if (veth->h_vlan_proto == __constant_htons(ETH_P_8021Q)) { if (veth->h_vlan_proto == htons(ETH_P_8021Q)) {
hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_VLAN; hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_VLAN;
hdr->hdr.l2.vlan_id = ntohs(veth->h_vlan_TCI); hdr->hdr.l2.vlan_id = ntohs(veth->h_vlan_TCI);
} }
...@@ -1125,7 +1125,6 @@ void qeth_osn_deregister(struct net_device *dev) ...@@ -1125,7 +1125,6 @@ void qeth_osn_deregister(struct net_device *dev)
QETH_CARD_TEXT(card, 2, "osndereg"); QETH_CARD_TEXT(card, 2, "osndereg");
card->osn_info.assist_cb = NULL; card->osn_info.assist_cb = NULL;
card->osn_info.data_cb = NULL; card->osn_info.data_cb = NULL;
return;
} }
EXPORT_SYMBOL(qeth_osn_deregister); EXPORT_SYMBOL(qeth_osn_deregister);
#endif #endif
......
...@@ -97,7 +97,7 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card, ...@@ -97,7 +97,7 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card,
return false; return false;
qeth_l3_convert_addr_to_bits((u8 *) &addr->u, addr_bits, qeth_l3_convert_addr_to_bits((u8 *) &addr->u, addr_bits,
(addr->proto == QETH_PROT_IPV4)? 4:16); (addr->proto == QETH_PROT_IPV4) ? 4 : 16);
list_for_each_entry(ipatoe, &card->ipato.entries, entry) { list_for_each_entry(ipatoe, &card->ipato.entries, entry) {
if (addr->proto != ipatoe->proto) if (addr->proto != ipatoe->proto)
continue; continue;
...@@ -540,7 +540,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card, ...@@ -540,7 +540,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card,
if (ipatoe->proto != new->proto) if (ipatoe->proto != new->proto)
continue; continue;
if (!memcmp(ipatoe->addr, new->addr, if (!memcmp(ipatoe->addr, new->addr,
(ipatoe->proto == QETH_PROT_IPV4)? 4:16) && (ipatoe->proto == QETH_PROT_IPV4) ? 4 : 16) &&
(ipatoe->mask_bits == new->mask_bits)) { (ipatoe->mask_bits == new->mask_bits)) {
rc = -EEXIST; rc = -EEXIST;
break; break;
...@@ -572,7 +572,7 @@ int qeth_l3_del_ipato_entry(struct qeth_card *card, ...@@ -572,7 +572,7 @@ int qeth_l3_del_ipato_entry(struct qeth_card *card,
if (ipatoe->proto != proto) if (ipatoe->proto != proto)
continue; continue;
if (!memcmp(ipatoe->addr, addr, if (!memcmp(ipatoe->addr, addr,
(proto == QETH_PROT_IPV4)? 4:16) && (proto == QETH_PROT_IPV4) ? 4 : 16) &&
(ipatoe->mask_bits == mask_bits)) { (ipatoe->mask_bits == mask_bits)) {
list_del(&ipatoe->entry); list_del(&ipatoe->entry);
qeth_l3_update_ipato(card); qeth_l3_update_ipato(card);
...@@ -2139,7 +2139,6 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev) ...@@ -2139,7 +2139,6 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)
static int qeth_l3_ip_event(struct notifier_block *this, static int qeth_l3_ip_event(struct notifier_block *this,
unsigned long event, void *ptr) unsigned long event, void *ptr)
{ {
struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
struct net_device *dev = ifa->ifa_dev->dev; struct net_device *dev = ifa->ifa_dev->dev;
struct qeth_ipaddr addr; struct qeth_ipaddr addr;
......
...@@ -285,7 +285,7 @@ static ssize_t qeth_l3_dev_ipato_enable_show(struct device *dev, ...@@ -285,7 +285,7 @@ static ssize_t qeth_l3_dev_ipato_enable_show(struct device *dev,
{ {
struct qeth_card *card = dev_get_drvdata(dev); struct qeth_card *card = dev_get_drvdata(dev);
return sprintf(buf, "%i\n", card->ipato.enabled? 1:0); return sprintf(buf, "%u\n", card->ipato.enabled ? 1 : 0);
} }
static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev, static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev,
...@@ -330,7 +330,7 @@ static ssize_t qeth_l3_dev_ipato_invert4_show(struct device *dev, ...@@ -330,7 +330,7 @@ static ssize_t qeth_l3_dev_ipato_invert4_show(struct device *dev,
{ {
struct qeth_card *card = dev_get_drvdata(dev); struct qeth_card *card = dev_get_drvdata(dev);
return sprintf(buf, "%i\n", card->ipato.invert4? 1:0); return sprintf(buf, "%u\n", card->ipato.invert4 ? 1 : 0);
} }
static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev, static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev,
...@@ -450,7 +450,7 @@ static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count, ...@@ -450,7 +450,7 @@ static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count,
return -ENOMEM; return -ENOMEM;
ipatoe->proto = proto; ipatoe->proto = proto;
memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4)? 4:16); memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4) ? 4 : 16);
ipatoe->mask_bits = mask_bits; ipatoe->mask_bits = mask_bits;
rc = qeth_l3_add_ipato_entry(card, ipatoe); rc = qeth_l3_add_ipato_entry(card, ipatoe);
...@@ -501,7 +501,7 @@ static ssize_t qeth_l3_dev_ipato_invert6_show(struct device *dev, ...@@ -501,7 +501,7 @@ static ssize_t qeth_l3_dev_ipato_invert6_show(struct device *dev,
{ {
struct qeth_card *card = dev_get_drvdata(dev); struct qeth_card *card = dev_get_drvdata(dev);
return sprintf(buf, "%i\n", card->ipato.invert6? 1:0); return sprintf(buf, "%u\n", card->ipato.invert6 ? 1 : 0);
} }
static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev, static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment