Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: kpc2000: remove unnecessary comments in kp2000_pcie_probe

Much of the code comments in kp2000_pcie_probe just repeats the code and
does not add any additional information. Delete them and make sure that
comments still left in the function all use the same style.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Simon Sandström and committed by
Greg Kroah-Hartman
eafae15f fd5a82f4

+5 -33
+5 -33
drivers/staging/kpc2000/kpc2000/core.c
··· 311 311 unsigned long dma_bar_phys_len; 312 312 u16 regval; 313 313 314 - /* 315 - * Step 1: Allocate a struct for the pcard 316 - */ 317 314 pcard = kzalloc(sizeof(*pcard), GFP_KERNEL); 318 315 if (!pcard) 319 316 return -ENOMEM; 320 317 dev_dbg(&pdev->dev, "probe: allocated struct kp2000_device @ %p\n", 321 318 pcard); 322 319 323 - /* 324 - * Step 2: Initialize trivial pcard elements 325 - */ 326 320 err = ida_simple_get(&card_num_ida, 1, INT_MAX, GFP_KERNEL); 327 321 if (err < 0) { 328 322 dev_err(&pdev->dev, "probe: failed to get card number (%d)\n", ··· 332 338 pcard->pdev = pdev; 333 339 pci_set_drvdata(pdev, pcard); 334 340 335 - /* 336 - * Step 3: Enable PCI device 337 - */ 338 341 err = pci_enable_device(pcard->pdev); 339 342 if (err) { 340 343 dev_err(&pcard->pdev->dev, ··· 340 349 goto err_remove_ida; 341 350 } 342 351 343 - /* 344 - * Step 4: Setup the Register BAR 345 - */ 352 + /* Setup the Register BAR */ 346 353 reg_bar_phys_addr = pci_resource_start(pcard->pdev, REG_BAR); 347 354 reg_bar_phys_len = pci_resource_len(pcard->pdev, REG_BAR); 348 355 ··· 370 381 reg_bar_phys_len - 1; 371 382 pcard->regs_base_resource.flags = IORESOURCE_MEM; 372 383 373 - /* 374 - * Step 5: Setup the DMA BAR 375 - */ 384 + /* Setup the DMA BAR */ 376 385 dma_bar_phys_addr = pci_resource_start(pcard->pdev, DMA_BAR); 377 386 dma_bar_phys_len = pci_resource_len(pcard->pdev, DMA_BAR); 378 387 ··· 402 415 dma_bar_phys_len - 1; 403 416 pcard->dma_base_resource.flags = IORESOURCE_MEM; 404 417 405 - /* 406 - * Step 6: System Regs 407 - */ 418 + /* Read System Regs */ 408 419 pcard->sysinfo_regs_base = pcard->regs_bar_base; 409 420 err = read_system_regs(pcard); 410 421 if (err) ··· 412 427 writeq(0xFFFFFFFFFFFFFFFF, 413 428 pcard->sysinfo_regs_base + REG_INTERRUPT_MASK); 414 429 415 - /* 416 - * Step 7: Configure PCI thingies 417 - */ 418 430 // let the card master PCIe 419 431 pci_set_master(pcard->pdev); 432 + 420 433 // enable IO and mem if not already done 421 434 pci_read_config_word(pcard->pdev, PCI_COMMAND, &regval); 422 435 regval |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY); ··· 449 466 dev_dbg(&pcard->pdev->dev, 450 467 "Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard))); 451 468 452 - /* 453 - * Step 8: Configure IRQs 454 - */ 455 469 err = pci_enable_msi(pcard->pdev); 456 470 if (err < 0) 457 471 goto err_unmap_dma; ··· 461 481 goto err_disable_msi; 462 482 } 463 483 464 - /* 465 - * Step 9: Setup sysfs attributes 466 - */ 467 484 err = sysfs_create_files(&pdev->dev.kobj, kp_attr_list); 468 485 if (err) { 469 486 dev_err(&pdev->dev, "Failed to add sysfs files: %d\n", err); 470 487 goto err_free_irq; 471 488 } 472 489 473 - /* 474 - * Step 10: Probe cores 475 - */ 476 490 err = kp2000_probe_cores(pcard); 477 491 if (err) 478 492 goto err_remove_sysfs; 479 493 480 - /* 481 - * Step 11: Enable IRQs in HW 482 - */ 494 + /* Enable IRQs in HW */ 483 495 writel(KPC_DMA_CARD_IRQ_ENABLE | KPC_DMA_CARD_USER_INTERRUPT_MODE, 484 496 pcard->dma_common_regs); 485 497