summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 10:09:04 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2019-01-29 00:40:54 -0500
commit50e931679ace9cf1c2915f664f29f52a203d8687 (patch)
tree71ecd181b134c68876e90ef431e70661a0b382ed /drivers/scsi/lpfc
parentfd84ec206d7a0d5a2aa0c3c78868deec6bfcd050 (diff)
scsi: lpfc: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: James Smart <james.smart@broadcom.com> Cc: Dick Kennedy <dick.kennedy@broadcom.com> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r--drivers/scsi/lpfc/lpfc_debugfs.c170
1 files changed, 0 insertions, 170 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index a58f0b3f03a9..a851dee09587 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -5280,11 +5280,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5280 if (!lpfc_debugfs_root) { 5280 if (!lpfc_debugfs_root) {
5281 lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL); 5281 lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL);
5282 atomic_set(&lpfc_debugfs_hba_count, 0); 5282 atomic_set(&lpfc_debugfs_hba_count, 0);
5283 if (!lpfc_debugfs_root) {
5284 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5285 "0408 Cannot create debugfs root\n");
5286 goto debug_failed;
5287 }
5288 } 5283 }
5289 if (!lpfc_debugfs_start_time) 5284 if (!lpfc_debugfs_start_time)
5290 lpfc_debugfs_start_time = jiffies; 5285 lpfc_debugfs_start_time = jiffies;
@@ -5295,11 +5290,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5295 pport_setup = true; 5290 pport_setup = true;
5296 phba->hba_debugfs_root = 5291 phba->hba_debugfs_root =
5297 debugfs_create_dir(name, lpfc_debugfs_root); 5292 debugfs_create_dir(name, lpfc_debugfs_root);
5298 if (!phba->hba_debugfs_root) {
5299 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5300 "0412 Cannot create debugfs hba\n");
5301 goto debug_failed;
5302 }
5303 atomic_inc(&lpfc_debugfs_hba_count); 5293 atomic_inc(&lpfc_debugfs_hba_count);
5304 atomic_set(&phba->debugfs_vport_count, 0); 5294 atomic_set(&phba->debugfs_vport_count, 0);
5305 5295
@@ -5309,11 +5299,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5309 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5299 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5310 phba->hba_debugfs_root, 5300 phba->hba_debugfs_root,
5311 phba, &lpfc_debugfs_op_hbqinfo); 5301 phba, &lpfc_debugfs_op_hbqinfo);
5312 if (!phba->debug_hbqinfo) {
5313 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5314 "0411 Cannot create debugfs hbqinfo\n");
5315 goto debug_failed;
5316 }
5317 5302
5318 /* Setup dumpHBASlim */ 5303 /* Setup dumpHBASlim */
5319 if (phba->sli_rev < LPFC_SLI_REV4) { 5304 if (phba->sli_rev < LPFC_SLI_REV4) {
@@ -5323,12 +5308,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5323 S_IFREG|S_IRUGO|S_IWUSR, 5308 S_IFREG|S_IRUGO|S_IWUSR,
5324 phba->hba_debugfs_root, 5309 phba->hba_debugfs_root,
5325 phba, &lpfc_debugfs_op_dumpHBASlim); 5310 phba, &lpfc_debugfs_op_dumpHBASlim);
5326 if (!phba->debug_dumpHBASlim) {
5327 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5328 "0413 Cannot create debugfs "
5329 "dumpHBASlim\n");
5330 goto debug_failed;
5331 }
5332 } else 5311 } else
5333 phba->debug_dumpHBASlim = NULL; 5312 phba->debug_dumpHBASlim = NULL;
5334 5313
@@ -5340,12 +5319,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5340 S_IFREG|S_IRUGO|S_IWUSR, 5319 S_IFREG|S_IRUGO|S_IWUSR,
5341 phba->hba_debugfs_root, 5320 phba->hba_debugfs_root,
5342 phba, &lpfc_debugfs_op_dumpHostSlim); 5321 phba, &lpfc_debugfs_op_dumpHostSlim);
5343 if (!phba->debug_dumpHostSlim) {
5344 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5345 "0414 Cannot create debugfs "
5346 "dumpHostSlim\n");
5347 goto debug_failed;
5348 }
5349 } else 5322 } else
5350 phba->debug_dumpHostSlim = NULL; 5323 phba->debug_dumpHostSlim = NULL;
5351 5324
@@ -5355,11 +5328,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5355 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5328 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5356 phba->hba_debugfs_root, 5329 phba->hba_debugfs_root,
5357 phba, &lpfc_debugfs_op_dumpData); 5330 phba, &lpfc_debugfs_op_dumpData);
5358 if (!phba->debug_dumpData) {
5359 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5360 "0800 Cannot create debugfs dumpData\n");
5361 goto debug_failed;
5362 }
5363 5331
5364 /* Setup dumpDif */ 5332 /* Setup dumpDif */
5365 snprintf(name, sizeof(name), "dumpDif"); 5333 snprintf(name, sizeof(name), "dumpDif");
@@ -5367,11 +5335,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5367 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5335 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5368 phba->hba_debugfs_root, 5336 phba->hba_debugfs_root,
5369 phba, &lpfc_debugfs_op_dumpDif); 5337 phba, &lpfc_debugfs_op_dumpDif);
5370 if (!phba->debug_dumpDif) {
5371 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5372 "0801 Cannot create debugfs dumpDif\n");
5373 goto debug_failed;
5374 }
5375 5338
5376 /* Setup DIF Error Injections */ 5339 /* Setup DIF Error Injections */
5377 snprintf(name, sizeof(name), "InjErrLBA"); 5340 snprintf(name, sizeof(name), "InjErrLBA");
@@ -5379,11 +5342,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5379 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5342 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5380 phba->hba_debugfs_root, 5343 phba->hba_debugfs_root,
5381 phba, &lpfc_debugfs_op_dif_err); 5344 phba, &lpfc_debugfs_op_dif_err);
5382 if (!phba->debug_InjErrLBA) {
5383 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5384 "0807 Cannot create debugfs InjErrLBA\n");
5385 goto debug_failed;
5386 }
5387 phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF; 5345 phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF;
5388 5346
5389 snprintf(name, sizeof(name), "InjErrNPortID"); 5347 snprintf(name, sizeof(name), "InjErrNPortID");
@@ -5391,88 +5349,48 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5391 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5349 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5392 phba->hba_debugfs_root, 5350 phba->hba_debugfs_root,
5393 phba, &lpfc_debugfs_op_dif_err); 5351 phba, &lpfc_debugfs_op_dif_err);
5394 if (!phba->debug_InjErrNPortID) {
5395 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5396 "0809 Cannot create debugfs InjErrNPortID\n");
5397 goto debug_failed;
5398 }
5399 5352
5400 snprintf(name, sizeof(name), "InjErrWWPN"); 5353 snprintf(name, sizeof(name), "InjErrWWPN");
5401 phba->debug_InjErrWWPN = 5354 phba->debug_InjErrWWPN =
5402 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5355 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5403 phba->hba_debugfs_root, 5356 phba->hba_debugfs_root,
5404 phba, &lpfc_debugfs_op_dif_err); 5357 phba, &lpfc_debugfs_op_dif_err);
5405 if (!phba->debug_InjErrWWPN) {
5406 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5407 "0810 Cannot create debugfs InjErrWWPN\n");
5408 goto debug_failed;
5409 }
5410 5358
5411 snprintf(name, sizeof(name), "writeGuardInjErr"); 5359 snprintf(name, sizeof(name), "writeGuardInjErr");
5412 phba->debug_writeGuard = 5360 phba->debug_writeGuard =
5413 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5361 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5414 phba->hba_debugfs_root, 5362 phba->hba_debugfs_root,
5415 phba, &lpfc_debugfs_op_dif_err); 5363 phba, &lpfc_debugfs_op_dif_err);
5416 if (!phba->debug_writeGuard) {
5417 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5418 "0802 Cannot create debugfs writeGuard\n");
5419 goto debug_failed;
5420 }
5421 5364
5422 snprintf(name, sizeof(name), "writeAppInjErr"); 5365 snprintf(name, sizeof(name), "writeAppInjErr");
5423 phba->debug_writeApp = 5366 phba->debug_writeApp =
5424 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5367 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5425 phba->hba_debugfs_root, 5368 phba->hba_debugfs_root,
5426 phba, &lpfc_debugfs_op_dif_err); 5369 phba, &lpfc_debugfs_op_dif_err);
5427 if (!phba->debug_writeApp) {
5428 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5429 "0803 Cannot create debugfs writeApp\n");
5430 goto debug_failed;
5431 }
5432 5370
5433 snprintf(name, sizeof(name), "writeRefInjErr"); 5371 snprintf(name, sizeof(name), "writeRefInjErr");
5434 phba->debug_writeRef = 5372 phba->debug_writeRef =
5435 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5373 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5436 phba->hba_debugfs_root, 5374 phba->hba_debugfs_root,
5437 phba, &lpfc_debugfs_op_dif_err); 5375 phba, &lpfc_debugfs_op_dif_err);
5438 if (!phba->debug_writeRef) {
5439 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5440 "0804 Cannot create debugfs writeRef\n");
5441 goto debug_failed;
5442 }
5443 5376
5444 snprintf(name, sizeof(name), "readGuardInjErr"); 5377 snprintf(name, sizeof(name), "readGuardInjErr");
5445 phba->debug_readGuard = 5378 phba->debug_readGuard =
5446 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5379 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5447 phba->hba_debugfs_root, 5380 phba->hba_debugfs_root,
5448 phba, &lpfc_debugfs_op_dif_err); 5381 phba, &lpfc_debugfs_op_dif_err);
5449 if (!phba->debug_readGuard) {
5450 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5451 "0808 Cannot create debugfs readGuard\n");
5452 goto debug_failed;
5453 }
5454 5382
5455 snprintf(name, sizeof(name), "readAppInjErr"); 5383 snprintf(name, sizeof(name), "readAppInjErr");
5456 phba->debug_readApp = 5384 phba->debug_readApp =
5457 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5385 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5458 phba->hba_debugfs_root, 5386 phba->hba_debugfs_root,
5459 phba, &lpfc_debugfs_op_dif_err); 5387 phba, &lpfc_debugfs_op_dif_err);
5460 if (!phba->debug_readApp) {
5461 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5462 "0805 Cannot create debugfs readApp\n");
5463 goto debug_failed;
5464 }
5465 5388
5466 snprintf(name, sizeof(name), "readRefInjErr"); 5389 snprintf(name, sizeof(name), "readRefInjErr");
5467 phba->debug_readRef = 5390 phba->debug_readRef =
5468 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5391 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5469 phba->hba_debugfs_root, 5392 phba->hba_debugfs_root,
5470 phba, &lpfc_debugfs_op_dif_err); 5393 phba, &lpfc_debugfs_op_dif_err);
5471 if (!phba->debug_readRef) {
5472 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5473 "0806 Cannot create debugfs readApp\n");
5474 goto debug_failed;
5475 }
5476 5394
5477 /* Setup slow ring trace */ 5395 /* Setup slow ring trace */
5478 if (lpfc_debugfs_max_slow_ring_trc) { 5396 if (lpfc_debugfs_max_slow_ring_trc) {
@@ -5496,12 +5414,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5496 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5414 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5497 phba->hba_debugfs_root, 5415 phba->hba_debugfs_root,
5498 phba, &lpfc_debugfs_op_slow_ring_trc); 5416 phba, &lpfc_debugfs_op_slow_ring_trc);
5499 if (!phba->debug_slow_ring_trc) {
5500 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5501 "0415 Cannot create debugfs "
5502 "slow_ring_trace\n");
5503 goto debug_failed;
5504 }
5505 if (!phba->slow_ring_trc) { 5417 if (!phba->slow_ring_trc) {
5506 phba->slow_ring_trc = kmalloc( 5418 phba->slow_ring_trc = kmalloc(
5507 (sizeof(struct lpfc_debugfs_trc) * 5419 (sizeof(struct lpfc_debugfs_trc) *
@@ -5524,11 +5436,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport)
5524 debugfs_create_file(name, 0644, 5436 debugfs_create_file(name, 0644,
5525 phba->hba_debugfs_root, 5437 phba->hba_debugfs_root,
5526 phba, &lpfc_debugfs_op_nvmeio_trc); 5438 phba, &lpfc_debugfs_op_nvmeio_trc);
5527 if (!phba->debug_nvmeio_trc) {
5528 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5529 "0574 No create debugfs nvmeio_trc\n");
5530 goto debug_failed;
5531 }
5532 5439
5533 atomic_set(&phba->nvmeio_trc_cnt, 0); 5440 atomic_set(&phba->nvmeio_trc_cnt, 0);
5534 if (lpfc_debugfs_max_nvmeio_trc) { 5441 if (lpfc_debugfs_max_nvmeio_trc) {
@@ -5576,11 +5483,6 @@ nvmeio_off:
5576 if (!vport->vport_debugfs_root) { 5483 if (!vport->vport_debugfs_root) {
5577 vport->vport_debugfs_root = 5484 vport->vport_debugfs_root =
5578 debugfs_create_dir(name, phba->hba_debugfs_root); 5485 debugfs_create_dir(name, phba->hba_debugfs_root);
5579 if (!vport->vport_debugfs_root) {
5580 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5581 "0417 Can't create debugfs\n");
5582 goto debug_failed;
5583 }
5584 atomic_inc(&phba->debugfs_vport_count); 5486 atomic_inc(&phba->debugfs_vport_count);
5585 } 5487 }
5586 5488
@@ -5617,55 +5519,29 @@ nvmeio_off:
5617 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5519 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5618 vport->vport_debugfs_root, 5520 vport->vport_debugfs_root,
5619 vport, &lpfc_debugfs_op_disc_trc); 5521 vport, &lpfc_debugfs_op_disc_trc);
5620 if (!vport->debug_disc_trc) {
5621 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5622 "0419 Cannot create debugfs "
5623 "discovery_trace\n");
5624 goto debug_failed;
5625 }
5626 snprintf(name, sizeof(name), "nodelist"); 5522 snprintf(name, sizeof(name), "nodelist");
5627 vport->debug_nodelist = 5523 vport->debug_nodelist =
5628 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5524 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5629 vport->vport_debugfs_root, 5525 vport->vport_debugfs_root,
5630 vport, &lpfc_debugfs_op_nodelist); 5526 vport, &lpfc_debugfs_op_nodelist);
5631 if (!vport->debug_nodelist) {
5632 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5633 "2985 Can't create debugfs nodelist\n");
5634 goto debug_failed;
5635 }
5636 5527
5637 snprintf(name, sizeof(name), "nvmestat"); 5528 snprintf(name, sizeof(name), "nvmestat");
5638 vport->debug_nvmestat = 5529 vport->debug_nvmestat =
5639 debugfs_create_file(name, 0644, 5530 debugfs_create_file(name, 0644,
5640 vport->vport_debugfs_root, 5531 vport->vport_debugfs_root,
5641 vport, &lpfc_debugfs_op_nvmestat); 5532 vport, &lpfc_debugfs_op_nvmestat);
5642 if (!vport->debug_nvmestat) {
5643 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5644 "0811 Cannot create debugfs nvmestat\n");
5645 goto debug_failed;
5646 }
5647 5533
5648 snprintf(name, sizeof(name), "nvmektime"); 5534 snprintf(name, sizeof(name), "nvmektime");
5649 vport->debug_nvmektime = 5535 vport->debug_nvmektime =
5650 debugfs_create_file(name, 0644, 5536 debugfs_create_file(name, 0644,
5651 vport->vport_debugfs_root, 5537 vport->vport_debugfs_root,
5652 vport, &lpfc_debugfs_op_nvmektime); 5538 vport, &lpfc_debugfs_op_nvmektime);
5653 if (!vport->debug_nvmektime) {
5654 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5655 "0815 Cannot create debugfs nvmektime\n");
5656 goto debug_failed;
5657 }
5658 5539
5659 snprintf(name, sizeof(name), "cpucheck"); 5540 snprintf(name, sizeof(name), "cpucheck");
5660 vport->debug_cpucheck = 5541 vport->debug_cpucheck =
5661 debugfs_create_file(name, 0644, 5542 debugfs_create_file(name, 0644,
5662 vport->vport_debugfs_root, 5543 vport->vport_debugfs_root,
5663 vport, &lpfc_debugfs_op_cpucheck); 5544 vport, &lpfc_debugfs_op_cpucheck);
5664 if (!vport->debug_cpucheck) {
5665 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5666 "0819 Cannot create debugfs cpucheck\n");
5667 goto debug_failed;
5668 }
5669 5545
5670 /* 5546 /*
5671 * The following section is for additional directories/files for the 5547 * The following section is for additional directories/files for the
@@ -5685,11 +5561,6 @@ nvmeio_off:
5685 if (!phba->idiag_root) { 5561 if (!phba->idiag_root) {
5686 phba->idiag_root = 5562 phba->idiag_root =
5687 debugfs_create_dir(name, phba->hba_debugfs_root); 5563 debugfs_create_dir(name, phba->hba_debugfs_root);
5688 if (!phba->idiag_root) {
5689 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5690 "2922 Can't create idiag debugfs\n");
5691 goto debug_failed;
5692 }
5693 /* Initialize iDiag data structure */ 5564 /* Initialize iDiag data structure */
5694 memset(&idiag, 0, sizeof(idiag)); 5565 memset(&idiag, 0, sizeof(idiag));
5695 } 5566 }
@@ -5700,11 +5571,6 @@ nvmeio_off:
5700 phba->idiag_pci_cfg = 5571 phba->idiag_pci_cfg =
5701 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5572 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5702 phba->idiag_root, phba, &lpfc_idiag_op_pciCfg); 5573 phba->idiag_root, phba, &lpfc_idiag_op_pciCfg);
5703 if (!phba->idiag_pci_cfg) {
5704 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5705 "2923 Can't create idiag debugfs\n");
5706 goto debug_failed;
5707 }
5708 idiag.offset.last_rd = 0; 5574 idiag.offset.last_rd = 0;
5709 } 5575 }
5710 5576
@@ -5714,11 +5580,6 @@ nvmeio_off:
5714 phba->idiag_bar_acc = 5580 phba->idiag_bar_acc =
5715 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5581 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5716 phba->idiag_root, phba, &lpfc_idiag_op_barAcc); 5582 phba->idiag_root, phba, &lpfc_idiag_op_barAcc);
5717 if (!phba->idiag_bar_acc) {
5718 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5719 "3056 Can't create idiag debugfs\n");
5720 goto debug_failed;
5721 }
5722 idiag.offset.last_rd = 0; 5583 idiag.offset.last_rd = 0;
5723 } 5584 }
5724 5585
@@ -5728,11 +5589,6 @@ nvmeio_off:
5728 phba->idiag_que_info = 5589 phba->idiag_que_info =
5729 debugfs_create_file(name, S_IFREG|S_IRUGO, 5590 debugfs_create_file(name, S_IFREG|S_IRUGO,
5730 phba->idiag_root, phba, &lpfc_idiag_op_queInfo); 5591 phba->idiag_root, phba, &lpfc_idiag_op_queInfo);
5731 if (!phba->idiag_que_info) {
5732 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5733 "2924 Can't create idiag debugfs\n");
5734 goto debug_failed;
5735 }
5736 } 5592 }
5737 5593
5738 /* iDiag access PCI function queue */ 5594 /* iDiag access PCI function queue */
@@ -5741,11 +5597,6 @@ nvmeio_off:
5741 phba->idiag_que_acc = 5597 phba->idiag_que_acc =
5742 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5598 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5743 phba->idiag_root, phba, &lpfc_idiag_op_queAcc); 5599 phba->idiag_root, phba, &lpfc_idiag_op_queAcc);
5744 if (!phba->idiag_que_acc) {
5745 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5746 "2926 Can't create idiag debugfs\n");
5747 goto debug_failed;
5748 }
5749 } 5600 }
5750 5601
5751 /* iDiag access PCI function doorbell registers */ 5602 /* iDiag access PCI function doorbell registers */
@@ -5754,11 +5605,6 @@ nvmeio_off:
5754 phba->idiag_drb_acc = 5605 phba->idiag_drb_acc =
5755 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5606 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5756 phba->idiag_root, phba, &lpfc_idiag_op_drbAcc); 5607 phba->idiag_root, phba, &lpfc_idiag_op_drbAcc);
5757 if (!phba->idiag_drb_acc) {
5758 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5759 "2927 Can't create idiag debugfs\n");
5760 goto debug_failed;
5761 }
5762 } 5608 }
5763 5609
5764 /* iDiag access PCI function control registers */ 5610 /* iDiag access PCI function control registers */
@@ -5767,11 +5613,6 @@ nvmeio_off:
5767 phba->idiag_ctl_acc = 5613 phba->idiag_ctl_acc =
5768 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5614 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5769 phba->idiag_root, phba, &lpfc_idiag_op_ctlAcc); 5615 phba->idiag_root, phba, &lpfc_idiag_op_ctlAcc);
5770 if (!phba->idiag_ctl_acc) {
5771 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5772 "2981 Can't create idiag debugfs\n");
5773 goto debug_failed;
5774 }
5775 } 5616 }
5776 5617
5777 /* iDiag access mbox commands */ 5618 /* iDiag access mbox commands */
@@ -5780,11 +5621,6 @@ nvmeio_off:
5780 phba->idiag_mbx_acc = 5621 phba->idiag_mbx_acc =
5781 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR, 5622 debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
5782 phba->idiag_root, phba, &lpfc_idiag_op_mbxAcc); 5623 phba->idiag_root, phba, &lpfc_idiag_op_mbxAcc);
5783 if (!phba->idiag_mbx_acc) {
5784 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5785 "2980 Can't create idiag debugfs\n");
5786 goto debug_failed;
5787 }
5788 } 5624 }
5789 5625
5790 /* iDiag extents access commands */ 5626 /* iDiag extents access commands */
@@ -5796,12 +5632,6 @@ nvmeio_off:
5796 S_IFREG|S_IRUGO|S_IWUSR, 5632 S_IFREG|S_IRUGO|S_IWUSR,
5797 phba->idiag_root, phba, 5633 phba->idiag_root, phba,
5798 &lpfc_idiag_op_extAcc); 5634 &lpfc_idiag_op_extAcc);
5799 if (!phba->idiag_ext_acc) {
5800 lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
5801 "2986 Cant create "
5802 "idiag debugfs\n");
5803 goto debug_failed;
5804 }
5805 } 5635 }
5806 } 5636 }
5807 5637