Commit b264fad3 authored by Mohana Datta Yelugoti's avatar Mohana Datta Yelugoti Committed by Greg Kroah-Hartman

staging: qlge: qlge_main.c: fix style issues

This patch fixes "WARNING: Missing a blank line after
declarations" generated from checkpatch.pl by adding
a blank line after declarations.
Signed-off-by: default avatarMohana Datta Yelugoti <ymdatta.work@gmail.com>
Link: https://lore.kernel.org/r/20200211095813.11426-1-ymdatta.work@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f4f67b5
...@@ -143,6 +143,7 @@ static int ql_sem_trylock(struct ql_adapter *qdev, u32 sem_mask) ...@@ -143,6 +143,7 @@ static int ql_sem_trylock(struct ql_adapter *qdev, u32 sem_mask)
int ql_sem_spinlock(struct ql_adapter *qdev, u32 sem_mask) int ql_sem_spinlock(struct ql_adapter *qdev, u32 sem_mask)
{ {
unsigned int wait_count = 30; unsigned int wait_count = 30;
do { do {
if (!ql_sem_trylock(qdev, sem_mask)) if (!ql_sem_trylock(qdev, sem_mask))
return 0; return 0;
...@@ -1210,6 +1211,7 @@ static void ql_unmap_send(struct ql_adapter *qdev, ...@@ -1210,6 +1211,7 @@ static void ql_unmap_send(struct ql_adapter *qdev,
struct tx_ring_desc *tx_ring_desc, int mapped) struct tx_ring_desc *tx_ring_desc, int mapped)
{ {
int i; int i;
for (i = 0; i < mapped; i++) { for (i = 0; i < mapped; i++) {
if (i == 0 || (i == 7 && mapped > 7)) { if (i == 0 || (i == 7 && mapped > 7)) {
/* /*
...@@ -1290,6 +1292,7 @@ static int ql_map_send(struct ql_adapter *qdev, ...@@ -1290,6 +1292,7 @@ static int ql_map_send(struct ql_adapter *qdev,
*/ */
for (frag_idx = 0; frag_idx < frag_cnt; frag_idx++, map_idx++) { for (frag_idx = 0; frag_idx < frag_cnt; frag_idx++, map_idx++) {
skb_frag_t *frag = &skb_shinfo(skb)->frags[frag_idx]; skb_frag_t *frag = &skb_shinfo(skb)->frags[frag_idx];
tbd++; tbd++;
if (frag_idx == 6 && frag_cnt > 7) { if (frag_idx == 6 && frag_cnt > 7) {
/* Let's tack on an sglist. /* Let's tack on an sglist.
...@@ -1649,6 +1652,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev, ...@@ -1649,6 +1652,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
(ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) { (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) {
/* Unfragmented ipv4 UDP frame. */ /* Unfragmented ipv4 UDP frame. */
struct iphdr *iph = (struct iphdr *) skb->data; struct iphdr *iph = (struct iphdr *) skb->data;
if (!(iph->frag_off & if (!(iph->frag_off &
htons(IP_MF|IP_OFFSET))) { htons(IP_MF|IP_OFFSET))) {
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
...@@ -1818,6 +1822,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev, ...@@ -1818,6 +1822,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
* eventually be in trouble. * eventually be in trouble.
*/ */
int size, i = 0; int size, i = 0;
sbq_desc = qlge_get_curr_buf(&rx_ring->sbq); sbq_desc = qlge_get_curr_buf(&rx_ring->sbq);
pci_unmap_single(qdev->pdev, sbq_desc->dma_addr, pci_unmap_single(qdev->pdev, sbq_desc->dma_addr,
SMALL_BUF_MAP_SIZE, PCI_DMA_FROMDEVICE); SMALL_BUF_MAP_SIZE, PCI_DMA_FROMDEVICE);
...@@ -1936,6 +1941,7 @@ static void ql_process_mac_split_rx_intr(struct ql_adapter *qdev, ...@@ -1936,6 +1941,7 @@ static void ql_process_mac_split_rx_intr(struct ql_adapter *qdev,
(ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) { (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) {
/* Unfragmented ipv4 UDP frame. */ /* Unfragmented ipv4 UDP frame. */
struct iphdr *iph = (struct iphdr *) skb->data; struct iphdr *iph = (struct iphdr *) skb->data;
if (!(iph->frag_off & if (!(iph->frag_off &
htons(IP_MF|IP_OFFSET))) { htons(IP_MF|IP_OFFSET))) {
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
...@@ -2391,6 +2397,7 @@ static void qlge_restore_vlan(struct ql_adapter *qdev) ...@@ -2391,6 +2397,7 @@ static void qlge_restore_vlan(struct ql_adapter *qdev)
static irqreturn_t qlge_msix_rx_isr(int irq, void *dev_id) static irqreturn_t qlge_msix_rx_isr(int irq, void *dev_id)
{ {
struct rx_ring *rx_ring = dev_id; struct rx_ring *rx_ring = dev_id;
napi_schedule(&rx_ring->napi); napi_schedule(&rx_ring->napi);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -2497,6 +2504,7 @@ static int ql_tso(struct sk_buff *skb, struct ob_mac_tso_iocb_req *mac_iocb_ptr) ...@@ -2497,6 +2504,7 @@ static int ql_tso(struct sk_buff *skb, struct ob_mac_tso_iocb_req *mac_iocb_ptr)
mac_iocb_ptr->flags2 |= OB_MAC_TSO_IOCB_LSO; mac_iocb_ptr->flags2 |= OB_MAC_TSO_IOCB_LSO;
if (likely(l3_proto == htons(ETH_P_IP))) { if (likely(l3_proto == htons(ETH_P_IP))) {
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
iph->check = 0; iph->check = 0;
mac_iocb_ptr->flags1 |= OB_MAC_TSO_IOCB_IP4; mac_iocb_ptr->flags1 |= OB_MAC_TSO_IOCB_IP4;
tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr,
...@@ -2521,6 +2529,7 @@ static void ql_hw_csum_setup(struct sk_buff *skb, ...@@ -2521,6 +2529,7 @@ static void ql_hw_csum_setup(struct sk_buff *skb,
int len; int len;
struct iphdr *iph = ip_hdr(skb); struct iphdr *iph = ip_hdr(skb);
__sum16 *check; __sum16 *check;
mac_iocb_ptr->opcode = OPCODE_OB_MAC_TSO_IOCB; mac_iocb_ptr->opcode = OPCODE_OB_MAC_TSO_IOCB;
mac_iocb_ptr->frame_len = cpu_to_le32((u32) skb->len); mac_iocb_ptr->frame_len = cpu_to_le32((u32) skb->len);
mac_iocb_ptr->net_trans_offset = mac_iocb_ptr->net_trans_offset =
...@@ -4265,6 +4274,7 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p) ...@@ -4265,6 +4274,7 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
static void qlge_tx_timeout(struct net_device *ndev, unsigned int txqueue) static void qlge_tx_timeout(struct net_device *ndev, unsigned int txqueue)
{ {
struct ql_adapter *qdev = netdev_priv(ndev); struct ql_adapter *qdev = netdev_priv(ndev);
ql_queue_asic_error(qdev); ql_queue_asic_error(qdev);
} }
...@@ -4273,6 +4283,7 @@ static void ql_asic_reset_work(struct work_struct *work) ...@@ -4273,6 +4283,7 @@ static void ql_asic_reset_work(struct work_struct *work)
struct ql_adapter *qdev = struct ql_adapter *qdev =
container_of(work, struct ql_adapter, asic_reset_work.work); container_of(work, struct ql_adapter, asic_reset_work.work);
int status; int status;
rtnl_lock(); rtnl_lock();
status = ql_adapter_down(qdev); status = ql_adapter_down(qdev);
if (status) if (status)
...@@ -4344,6 +4355,7 @@ static int ql_get_alt_pcie_func(struct ql_adapter *qdev) ...@@ -4344,6 +4355,7 @@ static int ql_get_alt_pcie_func(struct ql_adapter *qdev)
static int ql_get_board_info(struct ql_adapter *qdev) static int ql_get_board_info(struct ql_adapter *qdev)
{ {
int status; int status;
qdev->func = qdev->func =
(ql_read32(qdev, STS) & STS_FUNC_ID_MASK) >> STS_FUNC_ID_SHIFT; (ql_read32(qdev, STS) & STS_FUNC_ID_MASK) >> STS_FUNC_ID_SHIFT;
if (qdev->func > 3) if (qdev->func > 3)
...@@ -4652,6 +4664,7 @@ static void qlge_remove(struct pci_dev *pdev) ...@@ -4652,6 +4664,7 @@ static void qlge_remove(struct pci_dev *pdev)
{ {
struct net_device *ndev = pci_get_drvdata(pdev); struct net_device *ndev = pci_get_drvdata(pdev);
struct ql_adapter *qdev = netdev_priv(ndev); struct ql_adapter *qdev = netdev_priv(ndev);
del_timer_sync(&qdev->timer); del_timer_sync(&qdev->timer);
ql_cancel_all_work_sync(qdev); ql_cancel_all_work_sync(qdev);
unregister_netdev(ndev); unregister_netdev(ndev);
......
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