mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
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: Mohana Datta Yelugoti <ymdatta.work@gmail.com> Link: https://lore.kernel.org/r/20200211095813.11426-1-ymdatta.work@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0f4f67b551
commit
b264fad30b
1 changed files with 13 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
unsigned int wait_count = 30;
|
||||
|
||||
do {
|
||||
if (!ql_sem_trylock(qdev, sem_mask))
|
||||
return 0;
|
||||
|
@ -1210,6 +1211,7 @@ static void ql_unmap_send(struct ql_adapter *qdev,
|
|||
struct tx_ring_desc *tx_ring_desc, int mapped)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < mapped; i++) {
|
||||
if (i == 0 || (i == 7 && mapped > 7)) {
|
||||
/*
|
||||
|
@ -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++) {
|
||||
skb_frag_t *frag = &skb_shinfo(skb)->frags[frag_idx];
|
||||
|
||||
tbd++;
|
||||
if (frag_idx == 6 && frag_cnt > 7) {
|
||||
/* Let's tack on an sglist.
|
||||
|
@ -1649,6 +1652,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
|
|||
(ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) {
|
||||
/* Unfragmented ipv4 UDP frame. */
|
||||
struct iphdr *iph = (struct iphdr *) skb->data;
|
||||
|
||||
if (!(iph->frag_off &
|
||||
htons(IP_MF|IP_OFFSET))) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
@ -1818,6 +1822,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
|
|||
* eventually be in trouble.
|
||||
*/
|
||||
int size, i = 0;
|
||||
|
||||
sbq_desc = qlge_get_curr_buf(&rx_ring->sbq);
|
||||
pci_unmap_single(qdev->pdev, sbq_desc->dma_addr,
|
||||
SMALL_BUF_MAP_SIZE, PCI_DMA_FROMDEVICE);
|
||||
|
@ -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)) {
|
||||
/* Unfragmented ipv4 UDP frame. */
|
||||
struct iphdr *iph = (struct iphdr *) skb->data;
|
||||
|
||||
if (!(iph->frag_off &
|
||||
htons(IP_MF|IP_OFFSET))) {
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
|
@ -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)
|
||||
{
|
||||
struct rx_ring *rx_ring = dev_id;
|
||||
|
||||
napi_schedule(&rx_ring->napi);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
@ -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;
|
||||
if (likely(l3_proto == htons(ETH_P_IP))) {
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
|
||||
iph->check = 0;
|
||||
mac_iocb_ptr->flags1 |= OB_MAC_TSO_IOCB_IP4;
|
||||
tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr,
|
||||
|
@ -2521,6 +2529,7 @@ static void ql_hw_csum_setup(struct sk_buff *skb,
|
|||
int len;
|
||||
struct iphdr *iph = ip_hdr(skb);
|
||||
__sum16 *check;
|
||||
|
||||
mac_iocb_ptr->opcode = OPCODE_OB_MAC_TSO_IOCB;
|
||||
mac_iocb_ptr->frame_len = cpu_to_le32((u32) skb->len);
|
||||
mac_iocb_ptr->net_trans_offset =
|
||||
|
@ -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)
|
||||
{
|
||||
struct ql_adapter *qdev = netdev_priv(ndev);
|
||||
|
||||
ql_queue_asic_error(qdev);
|
||||
}
|
||||
|
||||
|
@ -4273,6 +4283,7 @@ static void ql_asic_reset_work(struct work_struct *work)
|
|||
struct ql_adapter *qdev =
|
||||
container_of(work, struct ql_adapter, asic_reset_work.work);
|
||||
int status;
|
||||
|
||||
rtnl_lock();
|
||||
status = ql_adapter_down(qdev);
|
||||
if (status)
|
||||
|
@ -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)
|
||||
{
|
||||
int status;
|
||||
|
||||
qdev->func =
|
||||
(ql_read32(qdev, STS) & STS_FUNC_ID_MASK) >> STS_FUNC_ID_SHIFT;
|
||||
if (qdev->func > 3)
|
||||
|
@ -4652,6 +4664,7 @@ static void qlge_remove(struct pci_dev *pdev)
|
|||
{
|
||||
struct net_device *ndev = pci_get_drvdata(pdev);
|
||||
struct ql_adapter *qdev = netdev_priv(ndev);
|
||||
|
||||
del_timer_sync(&qdev->timer);
|
||||
ql_cancel_all_work_sync(qdev);
|
||||
unregister_netdev(ndev);
|
||||
|
|
Loading…
Reference in a new issue