forked from luck/tmp_suning_uos_patched
ehea: fix main checkpatch complaints
Cc: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Doug Maxey <dwm@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
13da93d495
commit
508d2b5d26
@ -54,11 +54,11 @@ static int rq1_entries = EHEA_DEF_ENTRIES_RQ1;
|
||||
static int rq2_entries = EHEA_DEF_ENTRIES_RQ2;
|
||||
static int rq3_entries = EHEA_DEF_ENTRIES_RQ3;
|
||||
static int sq_entries = EHEA_DEF_ENTRIES_SQ;
|
||||
static int use_mcs = 0;
|
||||
static int use_lro = 0;
|
||||
static int use_mcs;
|
||||
static int use_lro;
|
||||
static int lro_max_aggr = EHEA_LRO_MAX_AGGR;
|
||||
static int num_tx_qps = EHEA_NUM_TX_QP;
|
||||
static int prop_carrier_state = 0;
|
||||
static int prop_carrier_state;
|
||||
|
||||
module_param(msg_level, int, 0);
|
||||
module_param(rq1_entries, int, 0);
|
||||
@ -94,9 +94,9 @@ MODULE_PARM_DESC(lro_max_aggr, " LRO: Max packets to be aggregated. Default = "
|
||||
MODULE_PARM_DESC(use_lro, " Large Receive Offload, 1: enable, 0: disable, "
|
||||
"Default = 0");
|
||||
|
||||
static int port_name_cnt = 0;
|
||||
static int port_name_cnt;
|
||||
static LIST_HEAD(adapter_list);
|
||||
u64 ehea_driver_flags = 0;
|
||||
u64 ehea_driver_flags;
|
||||
struct work_struct ehea_rereg_mr_task;
|
||||
|
||||
struct semaphore dlpar_mem_lock;
|
||||
@ -121,7 +121,8 @@ static struct of_platform_driver ehea_driver = {
|
||||
.remove = ehea_remove,
|
||||
};
|
||||
|
||||
void ehea_dump(void *adr, int len, char *msg) {
|
||||
void ehea_dump(void *adr, int len, char *msg)
|
||||
{
|
||||
int x;
|
||||
unsigned char *deb = adr;
|
||||
for (x = 0; x < len; x += 16) {
|
||||
@ -518,7 +519,8 @@ static int ehea_proc_rwqes(struct net_device *dev,
|
||||
last_wqe_index = wqe_index;
|
||||
rmb();
|
||||
if (!ehea_check_cqe(cqe, &rq)) {
|
||||
if (rq == 1) { /* LL RQ1 */
|
||||
if (rq == 1) {
|
||||
/* LL RQ1 */
|
||||
skb = get_skb_by_index_ll(skb_arr_rq1,
|
||||
skb_arr_rq1_len,
|
||||
wqe_index);
|
||||
@ -534,7 +536,8 @@ static int ehea_proc_rwqes(struct net_device *dev,
|
||||
skb_copy_to_linear_data(skb, ((char *)cqe) + 64,
|
||||
cqe->num_bytes_transfered - 4);
|
||||
ehea_fill_skb(dev, skb, cqe);
|
||||
} else if (rq == 2) { /* RQ2 */
|
||||
} else if (rq == 2) {
|
||||
/* RQ2 */
|
||||
skb = get_skb_by_index(skb_arr_rq2,
|
||||
skb_arr_rq2_len, cqe);
|
||||
if (unlikely(!skb)) {
|
||||
@ -544,7 +547,8 @@ static int ehea_proc_rwqes(struct net_device *dev,
|
||||
}
|
||||
ehea_fill_skb(dev, skb, cqe);
|
||||
processed_rq2++;
|
||||
} else { /* RQ3 */
|
||||
} else {
|
||||
/* RQ3 */
|
||||
skb = get_skb_by_index(skb_arr_rq3,
|
||||
skb_arr_rq3_len, cqe);
|
||||
if (unlikely(!skb)) {
|
||||
@ -643,7 +647,8 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota)
|
||||
|
||||
static int ehea_poll(struct napi_struct *napi, int budget)
|
||||
{
|
||||
struct ehea_port_res *pr = container_of(napi, struct ehea_port_res, napi);
|
||||
struct ehea_port_res *pr = container_of(napi, struct ehea_port_res,
|
||||
napi);
|
||||
struct net_device *dev = pr->port->netdev;
|
||||
struct ehea_cqe *cqe;
|
||||
struct ehea_cqe *cqe_skb = NULL;
|
||||
@ -743,8 +748,9 @@ int ehea_sense_port_attr(struct ehea_port *port)
|
||||
u64 hret;
|
||||
struct hcp_ehea_port_cb0 *cb0;
|
||||
|
||||
cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC); /* May be called via */
|
||||
if (!cb0) { /* ehea_neq_tasklet() */
|
||||
/* may be called via ehea_neq_tasklet() */
|
||||
cb0 = kzalloc(PAGE_SIZE, GFP_ATOMIC);
|
||||
if (!cb0) {
|
||||
ehea_error("no mem for cb0");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
@ -1791,11 +1797,10 @@ static void ehea_set_multicast_list(struct net_device *dev)
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0, k_mcl_entry = dev->mc_list;
|
||||
i < dev->mc_count;
|
||||
i++, k_mcl_entry = k_mcl_entry->next) {
|
||||
for (i = 0, k_mcl_entry = dev->mc_list; i < dev->mc_count; i++,
|
||||
k_mcl_entry = k_mcl_entry->next)
|
||||
ehea_add_multicast_entry(port, k_mcl_entry->dmi_addr);
|
||||
}
|
||||
|
||||
}
|
||||
out:
|
||||
return;
|
||||
@ -1925,12 +1930,12 @@ static inline int ehea_hash_skb(struct sk_buff *skb, int num_qps)
|
||||
|
||||
if ((skb->protocol == htons(ETH_P_IP)) &&
|
||||
(ip_hdr(skb)->protocol == IPPROTO_TCP)) {
|
||||
tcp = (struct tcphdr*)(skb_network_header(skb) + (ip_hdr(skb)->ihl * 4));
|
||||
tcp = (struct tcphdr *)(skb_network_header(skb) +
|
||||
(ip_hdr(skb)->ihl * 4));
|
||||
tmp = (tcp->source + (tcp->dest << 16)) % 31;
|
||||
tmp += ip_hdr(skb)->daddr % 31;
|
||||
return tmp % num_qps;
|
||||
}
|
||||
else
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user