mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
staging: qlge: Fix CHECK: Alignment should match open parenthesis
Fix CHECK: Alignment should match open parenthesis in qlge_dbg.c, qlge_ethtool.c, qlge_main.c, and qlge_mpi.c. Also made changes to the following lines: WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:81 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:87 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3528 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3536 CHECK: spaces preferred around that '*' (ctx:VxV) drivers/staging/qlge/qlge_main.c:4102 I made these changes due to touching these lines in the original fix Signed-off-by: Scott Schafer <schaferjscott@gmail.com> Link: https://lore.kernel.org/r/27ec7ee0a3ba8c1ad946077aacfcc6e40b98c106.1576086080.git.schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
25dde2435a
commit
1b998958b3
4 changed files with 117 additions and 130 deletions
|
@ -144,7 +144,8 @@ static int ql_get_serdes_regs(struct ql_adapter *qdev,
|
|||
|
||||
/* The XAUI needs to be read out per port */
|
||||
status = ql_read_other_func_serdes_reg(qdev,
|
||||
XG_SERDES_XAUI_HSS_PCS_START, &temp);
|
||||
XG_SERDES_XAUI_HSS_PCS_START,
|
||||
&temp);
|
||||
if (status)
|
||||
temp = XG_SERDES_ADDR_XAUI_PWR_DOWN;
|
||||
|
||||
|
@ -480,7 +481,8 @@ static int ql_get_mpi_shadow_regs(struct ql_adapter *qdev, u32 *buf)
|
|||
int status;
|
||||
|
||||
for (i = 0; i < MPI_CORE_SH_REGS_CNT; i++, buf++) {
|
||||
status = ql_write_mpi_reg(qdev, RISC_124,
|
||||
status = ql_write_mpi_reg(qdev,
|
||||
RISC_124,
|
||||
(SHADOW_OFFSET | i << SHADOW_REG_SHIFT));
|
||||
if (status)
|
||||
goto end;
|
||||
|
|
|
@ -196,8 +196,7 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
|
|||
*/
|
||||
cqicb = (struct cqicb *)&qdev->rx_ring[qdev->rss_ring_count];
|
||||
if (le16_to_cpu(cqicb->irq_delay) != qdev->tx_coalesce_usecs ||
|
||||
le16_to_cpu(cqicb->pkt_delay) !=
|
||||
qdev->tx_max_coalesced_frames) {
|
||||
le16_to_cpu(cqicb->pkt_delay) != qdev->tx_max_coalesced_frames) {
|
||||
for (i = qdev->rss_ring_count; i < qdev->rx_ring_count; i++) {
|
||||
rx_ring = &qdev->rx_ring[i];
|
||||
cqicb = (struct cqicb *)rx_ring;
|
||||
|
@ -218,8 +217,7 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
|
|||
/* Update the inbound (RSS) handler queues if they changed. */
|
||||
cqicb = (struct cqicb *)&qdev->rx_ring[0];
|
||||
if (le16_to_cpu(cqicb->irq_delay) != qdev->rx_coalesce_usecs ||
|
||||
le16_to_cpu(cqicb->pkt_delay) !=
|
||||
qdev->rx_max_coalesced_frames) {
|
||||
le16_to_cpu(cqicb->pkt_delay) != qdev->rx_max_coalesced_frames) {
|
||||
for (i = 0; i < qdev->rss_ring_count; i++, rx_ring++) {
|
||||
rx_ring = &qdev->rx_ring[i];
|
||||
cqicb = (struct cqicb *)rx_ring;
|
||||
|
|
|
@ -77,14 +77,12 @@ MODULE_PARM_DESC(qlge_irq_type, "0 = MSI-X, 1 = MSI, 2 = Legacy.");
|
|||
static int qlge_mpi_coredump;
|
||||
module_param(qlge_mpi_coredump, int, 0);
|
||||
MODULE_PARM_DESC(qlge_mpi_coredump,
|
||||
"Option to enable MPI firmware dump. "
|
||||
"Default is OFF - Do Not allocate memory. ");
|
||||
"Option to enable MPI firmware dump. Default is OFF - Do Not allocate memory. ");
|
||||
|
||||
static int qlge_force_coredump;
|
||||
module_param(qlge_force_coredump, int, 0);
|
||||
MODULE_PARM_DESC(qlge_force_coredump,
|
||||
"Option to allow force of firmware core dump. "
|
||||
"Default is OFF - Do not allow.");
|
||||
"Option to allow force of firmware core dump. Default is OFF - Do not allow.");
|
||||
|
||||
static const struct pci_device_id qlge_pci_tbl[] = {
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, QLGE_DEVICE_ID_8012)},
|
||||
|
@ -277,29 +275,27 @@ int ql_get_mac_addr_reg(struct ql_adapter *qdev, u32 type, u16 index,
|
|||
(index << MAC_ADDR_IDX_SHIFT) | /* index */
|
||||
MAC_ADDR_ADR | MAC_ADDR_RS | type); /* type */
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MR, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
*value++ = ql_read32(qdev, MAC_ADDR_DATA);
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */
|
||||
(index << MAC_ADDR_IDX_SHIFT) | /* index */
|
||||
MAC_ADDR_ADR | MAC_ADDR_RS | type); /* type */
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MR, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MR, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
*value++ = ql_read32(qdev, MAC_ADDR_DATA);
|
||||
if (type == MAC_ADDR_TYPE_CAM_MAC) {
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW,
|
||||
0);
|
||||
if (status)
|
||||
goto exit;
|
||||
ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */
|
||||
|
@ -375,8 +371,7 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
|
|||
(addr[2] << 24) | (addr[3] << 16) | (addr[4] << 8) |
|
||||
(addr[5]);
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */
|
||||
|
@ -384,8 +379,7 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
|
|||
type); /* type */
|
||||
ql_write32(qdev, MAC_ADDR_DATA, lower);
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
ql_write32(qdev, MAC_ADDR_IDX, (offset++) | /* offset */
|
||||
|
@ -393,8 +387,7 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
|
|||
type); /* type */
|
||||
ql_write32(qdev, MAC_ADDR_DATA, upper);
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
ql_write32(qdev, MAC_ADDR_IDX, (offset) | /* offset */
|
||||
|
@ -423,8 +416,7 @@ static int ql_set_mac_addr_reg(struct ql_adapter *qdev, u8 *addr, u32 type,
|
|||
* That's bit-27 we're talking about.
|
||||
*/
|
||||
status =
|
||||
ql_wait_reg_rdy(qdev,
|
||||
MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
ql_wait_reg_rdy(qdev, MAC_ADDR_IDX, MAC_ADDR_MW, 0);
|
||||
if (status)
|
||||
goto exit;
|
||||
ql_write32(qdev, MAC_ADDR_IDX, offset | /* offset */
|
||||
|
@ -467,7 +459,8 @@ static int ql_set_mac_addr(struct ql_adapter *qdev, int set)
|
|||
if (status)
|
||||
return status;
|
||||
status = ql_set_mac_addr_reg(qdev, (u8 *) addr,
|
||||
MAC_ADDR_TYPE_CAM_MAC, qdev->func * MAX_CQ);
|
||||
MAC_ADDR_TYPE_CAM_MAC,
|
||||
qdev->func * MAX_CQ);
|
||||
ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK);
|
||||
if (status)
|
||||
netif_err(qdev, ifup, qdev->ndev,
|
||||
|
@ -721,7 +714,8 @@ static int ql_get_8000_flash_params(struct ql_adapter *qdev)
|
|||
}
|
||||
|
||||
status = ql_validate_flash(qdev,
|
||||
sizeof(struct flash_params_8000) / sizeof(u16),
|
||||
sizeof(struct flash_params_8000) /
|
||||
sizeof(u16),
|
||||
"8000");
|
||||
if (status) {
|
||||
netif_err(qdev, ifup, qdev->ndev, "Invalid flash.\n");
|
||||
|
@ -784,7 +778,8 @@ static int ql_get_8012_flash_params(struct ql_adapter *qdev)
|
|||
}
|
||||
|
||||
status = ql_validate_flash(qdev,
|
||||
sizeof(struct flash_params_8012) / sizeof(u16),
|
||||
sizeof(struct flash_params_8012) /
|
||||
sizeof(u16),
|
||||
"8012");
|
||||
if (status) {
|
||||
netif_err(qdev, ifup, qdev->ndev, "Invalid flash.\n");
|
||||
|
@ -1438,8 +1433,7 @@ static void ql_update_mac_hdr_len(struct ql_adapter *qdev,
|
|||
static void ql_process_mac_rx_gro_page(struct ql_adapter *qdev,
|
||||
struct rx_ring *rx_ring,
|
||||
struct ib_mac_iocb_rsp *ib_mac_rsp,
|
||||
u32 length,
|
||||
u16 vlan_id)
|
||||
u32 length, u16 vlan_id)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct qlge_bq_desc *lbq_desc = ql_get_curr_lchunk(qdev, rx_ring);
|
||||
|
@ -1485,8 +1479,7 @@ static void ql_process_mac_rx_gro_page(struct ql_adapter *qdev,
|
|||
static void ql_process_mac_rx_page(struct ql_adapter *qdev,
|
||||
struct rx_ring *rx_ring,
|
||||
struct ib_mac_iocb_rsp *ib_mac_rsp,
|
||||
u32 length,
|
||||
u16 vlan_id)
|
||||
u32 length, u16 vlan_id)
|
||||
{
|
||||
struct net_device *ndev = qdev->ndev;
|
||||
struct sk_buff *skb = NULL;
|
||||
|
@ -1528,8 +1521,7 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
|
|||
"%d bytes of headers and data in large. Chain page to new skb and pull tail.\n",
|
||||
length);
|
||||
skb_fill_page_desc(skb, 0, lbq_desc->p.pg_chunk.page,
|
||||
lbq_desc->p.pg_chunk.offset + hlen,
|
||||
length - hlen);
|
||||
lbq_desc->p.pg_chunk.offset + hlen, length - hlen);
|
||||
skb->len += length - hlen;
|
||||
skb->data_len += length - hlen;
|
||||
skb->truesize += length - hlen;
|
||||
|
@ -1578,8 +1570,7 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
|
|||
static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
|
||||
struct rx_ring *rx_ring,
|
||||
struct ib_mac_iocb_rsp *ib_mac_rsp,
|
||||
u32 length,
|
||||
u16 vlan_id)
|
||||
u32 length, u16 vlan_id)
|
||||
{
|
||||
struct qlge_bq_desc *sbq_desc = qlge_get_curr_buf(&rx_ring->sbq);
|
||||
struct net_device *ndev = qdev->ndev;
|
||||
|
@ -1779,8 +1770,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
|
|||
"Chaining page at offset = %d, for %d bytes to skb.\n",
|
||||
lbq_desc->p.pg_chunk.offset, length);
|
||||
skb_fill_page_desc(skb, 0, lbq_desc->p.pg_chunk.page,
|
||||
lbq_desc->p.pg_chunk.offset,
|
||||
length);
|
||||
lbq_desc->p.pg_chunk.offset, length);
|
||||
skb->len += length;
|
||||
skb->data_len += length;
|
||||
skb->truesize += length;
|
||||
|
@ -1804,8 +1794,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
|
|||
netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev,
|
||||
"%d bytes of headers and data in large. Chain page to new skb and pull tail.\n",
|
||||
length);
|
||||
skb_fill_page_desc(skb, 0,
|
||||
lbq_desc->p.pg_chunk.page,
|
||||
skb_fill_page_desc(skb, 0, lbq_desc->p.pg_chunk.page,
|
||||
lbq_desc->p.pg_chunk.offset,
|
||||
length);
|
||||
skb->len += length;
|
||||
|
@ -1858,8 +1847,7 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev,
|
|||
i, size);
|
||||
skb_fill_page_desc(skb, i,
|
||||
lbq_desc->p.pg_chunk.page,
|
||||
lbq_desc->p.pg_chunk.offset,
|
||||
size);
|
||||
lbq_desc->p.pg_chunk.offset, size);
|
||||
skb->len += size;
|
||||
skb->data_len += size;
|
||||
skb->truesize += size;
|
||||
|
@ -1992,22 +1980,22 @@ static unsigned long ql_process_mac_rx_intr(struct ql_adapter *qdev,
|
|||
* Allocate a new skb, copy the data and
|
||||
* return the buffer to the free pool.
|
||||
*/
|
||||
ql_process_mac_rx_skb(qdev, rx_ring, ib_mac_rsp,
|
||||
length, vlan_id);
|
||||
ql_process_mac_rx_skb(qdev, rx_ring, ib_mac_rsp, length,
|
||||
vlan_id);
|
||||
} else if ((ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_DL) &&
|
||||
!(ib_mac_rsp->flags1 & IB_MAC_CSUM_ERR_MASK) &&
|
||||
(ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_T)) {
|
||||
/* TCP packet in a page chunk that's been checksummed.
|
||||
* Tack it on to our GRO skb and let it go.
|
||||
*/
|
||||
ql_process_mac_rx_gro_page(qdev, rx_ring, ib_mac_rsp,
|
||||
length, vlan_id);
|
||||
ql_process_mac_rx_gro_page(qdev, rx_ring, ib_mac_rsp, length,
|
||||
vlan_id);
|
||||
} else if (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_DL) {
|
||||
/* Non-TCP packet in a page chunk. Allocate an
|
||||
* skb, tack it on frags, and send it up.
|
||||
*/
|
||||
ql_process_mac_rx_page(qdev, rx_ring, ib_mac_rsp,
|
||||
length, vlan_id);
|
||||
ql_process_mac_rx_page(qdev, rx_ring, ib_mac_rsp, length,
|
||||
vlan_id);
|
||||
} else {
|
||||
/* Non-TCP/UDP large frames that span multiple buffers
|
||||
* can be processed corrrectly by the split frame logic.
|
||||
|
@ -3534,16 +3522,14 @@ static int ql_route_initialize(struct ql_adapter *qdev)
|
|||
RT_IDX_IP_CSUM_ERR, 1);
|
||||
if (status) {
|
||||
netif_err(qdev, ifup, qdev->ndev,
|
||||
"Failed to init routing register "
|
||||
"for IP CSUM error packets.\n");
|
||||
"Failed to init routing register for IP CSUM error packets.\n");
|
||||
goto exit;
|
||||
}
|
||||
status = ql_set_routing_reg(qdev, RT_IDX_TCP_UDP_CSUM_ERR_SLOT,
|
||||
RT_IDX_TU_CSUM_ERR, 1);
|
||||
if (status) {
|
||||
netif_err(qdev, ifup, qdev->ndev,
|
||||
"Failed to init routing register "
|
||||
"for TCP/UDP CSUM error packets.\n");
|
||||
"Failed to init routing register for TCP/UDP CSUM error packets.\n");
|
||||
goto exit;
|
||||
}
|
||||
status = ql_set_routing_reg(qdev, RT_IDX_BCAST_SLOT, RT_IDX_BCAST, 1);
|
||||
|
@ -4268,7 +4254,8 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
|
|||
if (status)
|
||||
return status;
|
||||
status = ql_set_mac_addr_reg(qdev, (u8 *) ndev->dev_addr,
|
||||
MAC_ADDR_TYPE_CAM_MAC, qdev->func * MAX_CQ);
|
||||
MAC_ADDR_TYPE_CAM_MAC,
|
||||
qdev->func * MAX_CQ);
|
||||
if (status)
|
||||
netif_err(qdev, hw, qdev->ndev, "Failed to load MAC address.\n");
|
||||
ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK);
|
||||
|
@ -4583,7 +4570,8 @@ static int qlge_probe(struct pci_dev *pdev,
|
|||
int err = 0;
|
||||
|
||||
ndev = alloc_etherdev_mq(sizeof(struct ql_adapter),
|
||||
min(MAX_CPUS, netif_get_num_default_rss_queues()));
|
||||
min(MAX_CPUS,
|
||||
netif_get_num_default_rss_queues()));
|
||||
if (!ndev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -1125,8 +1125,7 @@ void ql_mpi_port_cfg_work(struct work_struct *work)
|
|||
}
|
||||
|
||||
if (qdev->link_config & CFG_JUMBO_FRAME_SIZE &&
|
||||
qdev->max_frame_size ==
|
||||
CFG_DEFAULT_MAX_FRAME_SIZE)
|
||||
qdev->max_frame_size == CFG_DEFAULT_MAX_FRAME_SIZE)
|
||||
goto end;
|
||||
|
||||
qdev->link_config |= CFG_JUMBO_FRAME_SIZE;
|
||||
|
|
Loading…
Reference in a new issue