diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2009-03-04 15:06:06 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 11:23:16 -0400 |
commit | 1beb6fa85ca9afaee109811a3f4a984232a32a4f (patch) | |
tree | 432ecd3c15c451e4f3027811f7ab6fed8bd99f5c /drivers/scsi/aic7xxx/aic7xxx_osm.h | |
parent | 5880f486ef733dae820724a71e3b91241c7921bd (diff) |
[SCSI] replace __inline with inline
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic7xxx_osm.h')
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.h | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h index 3f7238db35e5..56f07e527b48 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.h +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h | |||
@@ -230,7 +230,7 @@ int ahc_dmamap_unload(struct ahc_softc *, bus_dma_tag_t, bus_dmamap_t); | |||
230 | #include "aic7xxx.h" | 230 | #include "aic7xxx.h" |
231 | 231 | ||
232 | /***************************** Timer Facilities *******************************/ | 232 | /***************************** Timer Facilities *******************************/ |
233 | static __inline void | 233 | static inline void |
234 | ahc_scb_timer_reset(struct scb *scb, u_int usec) | 234 | ahc_scb_timer_reset(struct scb *scb, u_int usec) |
235 | { | 235 | { |
236 | } | 236 | } |
@@ -401,19 +401,19 @@ struct info_str { | |||
401 | /******************************** Locking *************************************/ | 401 | /******************************** Locking *************************************/ |
402 | /* Lock protecting internal data structures */ | 402 | /* Lock protecting internal data structures */ |
403 | 403 | ||
404 | static __inline void | 404 | static inline void |
405 | ahc_lockinit(struct ahc_softc *ahc) | 405 | ahc_lockinit(struct ahc_softc *ahc) |
406 | { | 406 | { |
407 | spin_lock_init(&ahc->platform_data->spin_lock); | 407 | spin_lock_init(&ahc->platform_data->spin_lock); |
408 | } | 408 | } |
409 | 409 | ||
410 | static __inline void | 410 | static inline void |
411 | ahc_lock(struct ahc_softc *ahc, unsigned long *flags) | 411 | ahc_lock(struct ahc_softc *ahc, unsigned long *flags) |
412 | { | 412 | { |
413 | spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags); | 413 | spin_lock_irqsave(&ahc->platform_data->spin_lock, *flags); |
414 | } | 414 | } |
415 | 415 | ||
416 | static __inline void | 416 | static inline void |
417 | ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) | 417 | ahc_unlock(struct ahc_softc *ahc, unsigned long *flags) |
418 | { | 418 | { |
419 | spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags); | 419 | spin_unlock_irqrestore(&ahc->platform_data->spin_lock, *flags); |
@@ -493,22 +493,22 @@ void ahc_pci_write_config(ahc_dev_softc_t pci, | |||
493 | int reg, uint32_t value, | 493 | int reg, uint32_t value, |
494 | int width); | 494 | int width); |
495 | 495 | ||
496 | static __inline int ahc_get_pci_function(ahc_dev_softc_t); | 496 | static inline int ahc_get_pci_function(ahc_dev_softc_t); |
497 | static __inline int | 497 | static inline int |
498 | ahc_get_pci_function(ahc_dev_softc_t pci) | 498 | ahc_get_pci_function(ahc_dev_softc_t pci) |
499 | { | 499 | { |
500 | return (PCI_FUNC(pci->devfn)); | 500 | return (PCI_FUNC(pci->devfn)); |
501 | } | 501 | } |
502 | 502 | ||
503 | static __inline int ahc_get_pci_slot(ahc_dev_softc_t); | 503 | static inline int ahc_get_pci_slot(ahc_dev_softc_t); |
504 | static __inline int | 504 | static inline int |
505 | ahc_get_pci_slot(ahc_dev_softc_t pci) | 505 | ahc_get_pci_slot(ahc_dev_softc_t pci) |
506 | { | 506 | { |
507 | return (PCI_SLOT(pci->devfn)); | 507 | return (PCI_SLOT(pci->devfn)); |
508 | } | 508 | } |
509 | 509 | ||
510 | static __inline int ahc_get_pci_bus(ahc_dev_softc_t); | 510 | static inline int ahc_get_pci_bus(ahc_dev_softc_t); |
511 | static __inline int | 511 | static inline int |
512 | ahc_get_pci_bus(ahc_dev_softc_t pci) | 512 | ahc_get_pci_bus(ahc_dev_softc_t pci) |
513 | { | 513 | { |
514 | return (pci->bus->number); | 514 | return (pci->bus->number); |
@@ -521,8 +521,8 @@ static inline void ahc_linux_pci_exit(void) { | |||
521 | } | 521 | } |
522 | #endif | 522 | #endif |
523 | 523 | ||
524 | static __inline void ahc_flush_device_writes(struct ahc_softc *); | 524 | static inline void ahc_flush_device_writes(struct ahc_softc *); |
525 | static __inline void | 525 | static inline void |
526 | ahc_flush_device_writes(struct ahc_softc *ahc) | 526 | ahc_flush_device_writes(struct ahc_softc *ahc) |
527 | { | 527 | { |
528 | /* XXX Is this sufficient for all architectures??? */ | 528 | /* XXX Is this sufficient for all architectures??? */ |
@@ -535,81 +535,81 @@ int ahc_linux_proc_info(struct Scsi_Host *, char *, char **, | |||
535 | 535 | ||
536 | /*************************** Domain Validation ********************************/ | 536 | /*************************** Domain Validation ********************************/ |
537 | /*********************** Transaction Access Wrappers *************************/ | 537 | /*********************** Transaction Access Wrappers *************************/ |
538 | static __inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); | 538 | static inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); |
539 | static __inline void ahc_set_transaction_status(struct scb *, uint32_t); | 539 | static inline void ahc_set_transaction_status(struct scb *, uint32_t); |
540 | static __inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); | 540 | static inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); |
541 | static __inline void ahc_set_scsi_status(struct scb *, uint32_t); | 541 | static inline void ahc_set_scsi_status(struct scb *, uint32_t); |
542 | static __inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd); | 542 | static inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd); |
543 | static __inline uint32_t ahc_get_transaction_status(struct scb *); | 543 | static inline uint32_t ahc_get_transaction_status(struct scb *); |
544 | static __inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd); | 544 | static inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd); |
545 | static __inline uint32_t ahc_get_scsi_status(struct scb *); | 545 | static inline uint32_t ahc_get_scsi_status(struct scb *); |
546 | static __inline void ahc_set_transaction_tag(struct scb *, int, u_int); | 546 | static inline void ahc_set_transaction_tag(struct scb *, int, u_int); |
547 | static __inline u_long ahc_get_transfer_length(struct scb *); | 547 | static inline u_long ahc_get_transfer_length(struct scb *); |
548 | static __inline int ahc_get_transfer_dir(struct scb *); | 548 | static inline int ahc_get_transfer_dir(struct scb *); |
549 | static __inline void ahc_set_residual(struct scb *, u_long); | 549 | static inline void ahc_set_residual(struct scb *, u_long); |
550 | static __inline void ahc_set_sense_residual(struct scb *scb, u_long resid); | 550 | static inline void ahc_set_sense_residual(struct scb *scb, u_long resid); |
551 | static __inline u_long ahc_get_residual(struct scb *); | 551 | static inline u_long ahc_get_residual(struct scb *); |
552 | static __inline u_long ahc_get_sense_residual(struct scb *); | 552 | static inline u_long ahc_get_sense_residual(struct scb *); |
553 | static __inline int ahc_perform_autosense(struct scb *); | 553 | static inline int ahc_perform_autosense(struct scb *); |
554 | static __inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *, | 554 | static inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *, |
555 | struct scb *); | 555 | struct scb *); |
556 | static __inline void ahc_notify_xfer_settings_change(struct ahc_softc *, | 556 | static inline void ahc_notify_xfer_settings_change(struct ahc_softc *, |
557 | struct ahc_devinfo *); | 557 | struct ahc_devinfo *); |
558 | static __inline void ahc_platform_scb_free(struct ahc_softc *ahc, | 558 | static inline void ahc_platform_scb_free(struct ahc_softc *ahc, |
559 | struct scb *scb); | 559 | struct scb *scb); |
560 | static __inline void ahc_freeze_scb(struct scb *scb); | 560 | static inline void ahc_freeze_scb(struct scb *scb); |
561 | 561 | ||
562 | static __inline | 562 | static inline |
563 | void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) | 563 | void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) |
564 | { | 564 | { |
565 | cmd->result &= ~(CAM_STATUS_MASK << 16); | 565 | cmd->result &= ~(CAM_STATUS_MASK << 16); |
566 | cmd->result |= status << 16; | 566 | cmd->result |= status << 16; |
567 | } | 567 | } |
568 | 568 | ||
569 | static __inline | 569 | static inline |
570 | void ahc_set_transaction_status(struct scb *scb, uint32_t status) | 570 | void ahc_set_transaction_status(struct scb *scb, uint32_t status) |
571 | { | 571 | { |
572 | ahc_cmd_set_transaction_status(scb->io_ctx,status); | 572 | ahc_cmd_set_transaction_status(scb->io_ctx,status); |
573 | } | 573 | } |
574 | 574 | ||
575 | static __inline | 575 | static inline |
576 | void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) | 576 | void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) |
577 | { | 577 | { |
578 | cmd->result &= ~0xFFFF; | 578 | cmd->result &= ~0xFFFF; |
579 | cmd->result |= status; | 579 | cmd->result |= status; |
580 | } | 580 | } |
581 | 581 | ||
582 | static __inline | 582 | static inline |
583 | void ahc_set_scsi_status(struct scb *scb, uint32_t status) | 583 | void ahc_set_scsi_status(struct scb *scb, uint32_t status) |
584 | { | 584 | { |
585 | ahc_cmd_set_scsi_status(scb->io_ctx, status); | 585 | ahc_cmd_set_scsi_status(scb->io_ctx, status); |
586 | } | 586 | } |
587 | 587 | ||
588 | static __inline | 588 | static inline |
589 | uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd) | 589 | uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd) |
590 | { | 590 | { |
591 | return ((cmd->result >> 16) & CAM_STATUS_MASK); | 591 | return ((cmd->result >> 16) & CAM_STATUS_MASK); |
592 | } | 592 | } |
593 | 593 | ||
594 | static __inline | 594 | static inline |
595 | uint32_t ahc_get_transaction_status(struct scb *scb) | 595 | uint32_t ahc_get_transaction_status(struct scb *scb) |
596 | { | 596 | { |
597 | return (ahc_cmd_get_transaction_status(scb->io_ctx)); | 597 | return (ahc_cmd_get_transaction_status(scb->io_ctx)); |
598 | } | 598 | } |
599 | 599 | ||
600 | static __inline | 600 | static inline |
601 | uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd) | 601 | uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd) |
602 | { | 602 | { |
603 | return (cmd->result & 0xFFFF); | 603 | return (cmd->result & 0xFFFF); |
604 | } | 604 | } |
605 | 605 | ||
606 | static __inline | 606 | static inline |
607 | uint32_t ahc_get_scsi_status(struct scb *scb) | 607 | uint32_t ahc_get_scsi_status(struct scb *scb) |
608 | { | 608 | { |
609 | return (ahc_cmd_get_scsi_status(scb->io_ctx)); | 609 | return (ahc_cmd_get_scsi_status(scb->io_ctx)); |
610 | } | 610 | } |
611 | 611 | ||
612 | static __inline | 612 | static inline |
613 | void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) | 613 | void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) |
614 | { | 614 | { |
615 | /* | 615 | /* |
@@ -618,43 +618,43 @@ void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type) | |||
618 | */ | 618 | */ |
619 | } | 619 | } |
620 | 620 | ||
621 | static __inline | 621 | static inline |
622 | u_long ahc_get_transfer_length(struct scb *scb) | 622 | u_long ahc_get_transfer_length(struct scb *scb) |
623 | { | 623 | { |
624 | return (scb->platform_data->xfer_len); | 624 | return (scb->platform_data->xfer_len); |
625 | } | 625 | } |
626 | 626 | ||
627 | static __inline | 627 | static inline |
628 | int ahc_get_transfer_dir(struct scb *scb) | 628 | int ahc_get_transfer_dir(struct scb *scb) |
629 | { | 629 | { |
630 | return (scb->io_ctx->sc_data_direction); | 630 | return (scb->io_ctx->sc_data_direction); |
631 | } | 631 | } |
632 | 632 | ||
633 | static __inline | 633 | static inline |
634 | void ahc_set_residual(struct scb *scb, u_long resid) | 634 | void ahc_set_residual(struct scb *scb, u_long resid) |
635 | { | 635 | { |
636 | scsi_set_resid(scb->io_ctx, resid); | 636 | scsi_set_resid(scb->io_ctx, resid); |
637 | } | 637 | } |
638 | 638 | ||
639 | static __inline | 639 | static inline |
640 | void ahc_set_sense_residual(struct scb *scb, u_long resid) | 640 | void ahc_set_sense_residual(struct scb *scb, u_long resid) |
641 | { | 641 | { |
642 | scb->platform_data->sense_resid = resid; | 642 | scb->platform_data->sense_resid = resid; |
643 | } | 643 | } |
644 | 644 | ||
645 | static __inline | 645 | static inline |
646 | u_long ahc_get_residual(struct scb *scb) | 646 | u_long ahc_get_residual(struct scb *scb) |
647 | { | 647 | { |
648 | return scsi_get_resid(scb->io_ctx); | 648 | return scsi_get_resid(scb->io_ctx); |
649 | } | 649 | } |
650 | 650 | ||
651 | static __inline | 651 | static inline |
652 | u_long ahc_get_sense_residual(struct scb *scb) | 652 | u_long ahc_get_sense_residual(struct scb *scb) |
653 | { | 653 | { |
654 | return (scb->platform_data->sense_resid); | 654 | return (scb->platform_data->sense_resid); |
655 | } | 655 | } |
656 | 656 | ||
657 | static __inline | 657 | static inline |
658 | int ahc_perform_autosense(struct scb *scb) | 658 | int ahc_perform_autosense(struct scb *scb) |
659 | { | 659 | { |
660 | /* | 660 | /* |
@@ -665,20 +665,20 @@ int ahc_perform_autosense(struct scb *scb) | |||
665 | return (1); | 665 | return (1); |
666 | } | 666 | } |
667 | 667 | ||
668 | static __inline uint32_t | 668 | static inline uint32_t |
669 | ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb) | 669 | ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb) |
670 | { | 670 | { |
671 | return (sizeof(struct scsi_sense_data)); | 671 | return (sizeof(struct scsi_sense_data)); |
672 | } | 672 | } |
673 | 673 | ||
674 | static __inline void | 674 | static inline void |
675 | ahc_notify_xfer_settings_change(struct ahc_softc *ahc, | 675 | ahc_notify_xfer_settings_change(struct ahc_softc *ahc, |
676 | struct ahc_devinfo *devinfo) | 676 | struct ahc_devinfo *devinfo) |
677 | { | 677 | { |
678 | /* Nothing to do here for linux */ | 678 | /* Nothing to do here for linux */ |
679 | } | 679 | } |
680 | 680 | ||
681 | static __inline void | 681 | static inline void |
682 | ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb) | 682 | ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb) |
683 | { | 683 | { |
684 | } | 684 | } |
@@ -687,7 +687,7 @@ int ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg); | |||
687 | void ahc_platform_free(struct ahc_softc *ahc); | 687 | void ahc_platform_free(struct ahc_softc *ahc); |
688 | void ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb); | 688 | void ahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb); |
689 | 689 | ||
690 | static __inline void | 690 | static inline void |
691 | ahc_freeze_scb(struct scb *scb) | 691 | ahc_freeze_scb(struct scb *scb) |
692 | { | 692 | { |
693 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { | 693 | if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { |