aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorSony Chacko <sony.chacko@qlogic.com>2012-11-27 23:34:31 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-28 11:07:44 -0500
commit1e6b55ee98b9738966ee9709f6328ac10d474100 (patch)
treee02f85ae4749dc741d8ef86229aacdebf13d5f6c /drivers/net/ethernet
parent58634e74e66dd14407176d8620c76bae299ddb02 (diff)
qlcnic: fix coding style issues in qlcnic_minidump.c
Fix coding style violations in qlcnic_minidump.c Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
index 5e22c62e895d..12ff29270745 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
@@ -115,7 +115,7 @@ struct qlcnic_dump_entry {
115 } region; 115 } region;
116} __packed; 116} __packed;
117 117
118enum op_codes { 118enum qlcnic_minidump_opcode {
119 QLCNIC_DUMP_NOP = 0, 119 QLCNIC_DUMP_NOP = 0,
120 QLCNIC_DUMP_READ_CRB = 1, 120 QLCNIC_DUMP_READ_CRB = 1,
121 QLCNIC_DUMP_READ_MUX = 2, 121 QLCNIC_DUMP_READ_MUX = 2,
@@ -139,7 +139,7 @@ enum op_codes {
139}; 139};
140 140
141struct qlcnic_dump_operations { 141struct qlcnic_dump_operations {
142 enum op_codes opcode; 142 enum qlcnic_minidump_opcode opcode;
143 u32 (*handler)(struct qlcnic_adapter *, struct qlcnic_dump_entry *, 143 u32 (*handler)(struct qlcnic_adapter *, struct qlcnic_dump_entry *,
144 __le32 *); 144 __le32 *);
145}; 145};
@@ -269,7 +269,7 @@ static u32 qlcnic_dump_ctrl(struct qlcnic_adapter *adapter,
269 break; 269 break;
270 default: 270 default:
271 dev_info(&adapter->pdev->dev, 271 dev_info(&adapter->pdev->dev,
272 "Unknown opcode\n"); 272 "Unknown opcode\n");
273 break; 273 break;
274 } 274 }
275 } 275 }
@@ -455,8 +455,8 @@ static u32 qlcnic_read_memory(struct qlcnic_adapter *adapter,
455 /* check for data size of multiple of 16 and 16 byte alignment */ 455 /* check for data size of multiple of 16 and 16 byte alignment */
456 if ((addr & 0xf) || (reg_read%16)) { 456 if ((addr & 0xf) || (reg_read%16)) {
457 dev_info(&adapter->pdev->dev, 457 dev_info(&adapter->pdev->dev,
458 "Unaligned memory addr:0x%x size:0x%x\n", 458 "Unaligned memory addr:0x%x size:0x%x\n",
459 addr, reg_read); 459 addr, reg_read);
460 return -EINVAL; 460 return -EINVAL;
461 } 461 }
462 462
@@ -528,12 +528,12 @@ static const struct qlcnic_dump_operations fw_dump_ops[] = {
528/* Walk the template and collect dump for each entry in the dump template */ 528/* Walk the template and collect dump for each entry in the dump template */
529static int 529static int
530qlcnic_valid_dump_entry(struct device *dev, struct qlcnic_dump_entry *entry, 530qlcnic_valid_dump_entry(struct device *dev, struct qlcnic_dump_entry *entry,
531 u32 size) 531 u32 size)
532{ 532{
533 int ret = 1; 533 int ret = 1;
534 if (size != entry->hdr.cap_size) { 534 if (size != entry->hdr.cap_size) {
535 dev_info(dev, 535 dev_info(dev,
536 "Invalidate dump, Type:%d\tMask:%d\tSize:%dCap_size:%d\n", 536 "Invalid dump, Type:%d\tMask:%d\tSize:%dCap_size:%d\n",
537 entry->hdr.type, entry->hdr.mask, size, entry->hdr.cap_size); 537 entry->hdr.type, entry->hdr.mask, size, entry->hdr.cap_size);
538 dev_info(dev, "Aborting further dump capture\n"); 538 dev_info(dev, "Aborting further dump capture\n");
539 ret = 0; 539 ret = 0;
@@ -554,7 +554,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
554 554
555 if (fw_dump->clr) { 555 if (fw_dump->clr) {
556 dev_info(&adapter->pdev->dev, 556 dev_info(&adapter->pdev->dev,
557 "Previous dump not cleared, not capturing dump\n"); 557 "Previous dump not cleared, not capturing dump\n");
558 return -EIO; 558 return -EIO;
559 } 559 }
560 /* Calculate the size for dump data area only */ 560 /* Calculate the size for dump data area only */
@@ -567,8 +567,8 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
567 fw_dump->data = vzalloc(dump_size); 567 fw_dump->data = vzalloc(dump_size);
568 if (!fw_dump->data) { 568 if (!fw_dump->data) {
569 dev_info(&adapter->pdev->dev, 569 dev_info(&adapter->pdev->dev,
570 "Unable to allocate (%d KB) for fw dump\n", 570 "Unable to allocate (%d KB) for fw dump\n",
571 dump_size/1024); 571 dump_size / 1024);
572 return -ENOMEM; 572 return -ENOMEM;
573 } 573 }
574 buffer = fw_dump->data; 574 buffer = fw_dump->data;
@@ -595,14 +595,14 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
595 } 595 }
596 if (ops_index == ops_cnt) { 596 if (ops_index == ops_cnt) {
597 dev_info(&adapter->pdev->dev, 597 dev_info(&adapter->pdev->dev,
598 "Invalid entry type %d, exiting dump\n", 598 "Invalid entry type %d, exiting dump\n",
599 entry->hdr.type); 599 entry->hdr.type);
600 goto error; 600 goto error;
601 } 601 }
602 /* Collect dump for this entry */ 602 /* Collect dump for this entry */
603 dump = fw_dump_ops[ops_index].handler(adapter, entry, buffer); 603 dump = fw_dump_ops[ops_index].handler(adapter, entry, buffer);
604 if (dump && !qlcnic_valid_dump_entry(&adapter->pdev->dev, entry, 604 if (dump && !qlcnic_valid_dump_entry(&adapter->pdev->dev, entry,
605 dump)) 605 dump))
606 entry->hdr.flags |= QLCNIC_DUMP_SKIP; 606 entry->hdr.flags |= QLCNIC_DUMP_SKIP;
607 buf_offset += entry->hdr.cap_size; 607 buf_offset += entry->hdr.cap_size;
608 entry_offset += entry->hdr.offset; 608 entry_offset += entry->hdr.offset;
@@ -610,15 +610,15 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter)
610 } 610 }
611 if (dump_size != buf_offset) { 611 if (dump_size != buf_offset) {
612 dev_info(&adapter->pdev->dev, 612 dev_info(&adapter->pdev->dev,
613 "Captured(%d) and expected size(%d) do not match\n", 613 "Captured(%d) and expected size(%d) do not match\n",
614 buf_offset, dump_size); 614 buf_offset, dump_size);
615 goto error; 615 goto error;
616 } else { 616 } else {
617 fw_dump->clr = 1; 617 fw_dump->clr = 1;
618 snprintf(mesg, sizeof(mesg), "FW_DUMP=%s", 618 snprintf(mesg, sizeof(mesg), "FW_DUMP=%s",
619 adapter->netdev->name); 619 adapter->netdev->name);
620 dev_info(&adapter->pdev->dev, "Dump data, %d bytes captured\n", 620 dev_info(&adapter->pdev->dev, "Dump data, %d bytes captured\n",
621 fw_dump->size); 621 fw_dump->size);
622 /* Send a udev event to notify availability of FW dump */ 622 /* Send a udev event to notify availability of FW dump */
623 kobject_uevent_env(&adapter->pdev->dev.kobj, KOBJ_CHANGE, msg); 623 kobject_uevent_env(&adapter->pdev->dev.kobj, KOBJ_CHANGE, msg);
624 return 0; 624 return 0;