aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aic79xx_osm.h
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2009-03-04 15:06:06 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-04-03 11:23:16 -0400
commit1beb6fa85ca9afaee109811a3f4a984232a32a4f (patch)
tree432ecd3c15c451e4f3027811f7ab6fed8bd99f5c /drivers/scsi/aic7xxx/aic79xx_osm.h
parent5880f486ef733dae820724a71e3b91241c7921bd (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/aic79xx_osm.h')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.h102
1 files changed, 51 insertions, 51 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
index 8d6612c19922..55c1fe07969f 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.h
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.h
@@ -395,19 +395,19 @@ struct info_str {
395}; 395};
396 396
397/******************************** Locking *************************************/ 397/******************************** Locking *************************************/
398static __inline void 398static inline void
399ahd_lockinit(struct ahd_softc *ahd) 399ahd_lockinit(struct ahd_softc *ahd)
400{ 400{
401 spin_lock_init(&ahd->platform_data->spin_lock); 401 spin_lock_init(&ahd->platform_data->spin_lock);
402} 402}
403 403
404static __inline void 404static inline void
405ahd_lock(struct ahd_softc *ahd, unsigned long *flags) 405ahd_lock(struct ahd_softc *ahd, unsigned long *flags)
406{ 406{
407 spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags); 407 spin_lock_irqsave(&ahd->platform_data->spin_lock, *flags);
408} 408}
409 409
410static __inline void 410static inline void
411ahd_unlock(struct ahd_softc *ahd, unsigned long *flags) 411ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)
412{ 412{
413 spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags); 413 spin_unlock_irqrestore(&ahd->platform_data->spin_lock, *flags);
@@ -490,29 +490,29 @@ void ahd_pci_write_config(ahd_dev_softc_t pci,
490 int reg, uint32_t value, 490 int reg, uint32_t value,
491 int width); 491 int width);
492 492
493static __inline int ahd_get_pci_function(ahd_dev_softc_t); 493static inline int ahd_get_pci_function(ahd_dev_softc_t);
494static __inline int 494static inline int
495ahd_get_pci_function(ahd_dev_softc_t pci) 495ahd_get_pci_function(ahd_dev_softc_t pci)
496{ 496{
497 return (PCI_FUNC(pci->devfn)); 497 return (PCI_FUNC(pci->devfn));
498} 498}
499 499
500static __inline int ahd_get_pci_slot(ahd_dev_softc_t); 500static inline int ahd_get_pci_slot(ahd_dev_softc_t);
501static __inline int 501static inline int
502ahd_get_pci_slot(ahd_dev_softc_t pci) 502ahd_get_pci_slot(ahd_dev_softc_t pci)
503{ 503{
504 return (PCI_SLOT(pci->devfn)); 504 return (PCI_SLOT(pci->devfn));
505} 505}
506 506
507static __inline int ahd_get_pci_bus(ahd_dev_softc_t); 507static inline int ahd_get_pci_bus(ahd_dev_softc_t);
508static __inline int 508static inline int
509ahd_get_pci_bus(ahd_dev_softc_t pci) 509ahd_get_pci_bus(ahd_dev_softc_t pci)
510{ 510{
511 return (pci->bus->number); 511 return (pci->bus->number);
512} 512}
513 513
514static __inline void ahd_flush_device_writes(struct ahd_softc *); 514static inline void ahd_flush_device_writes(struct ahd_softc *);
515static __inline void 515static inline void
516ahd_flush_device_writes(struct ahd_softc *ahd) 516ahd_flush_device_writes(struct ahd_softc *ahd)
517{ 517{
518 /* XXX Is this sufficient for all architectures??? */ 518 /* XXX Is this sufficient for all architectures??? */
@@ -524,81 +524,81 @@ int ahd_linux_proc_info(struct Scsi_Host *, char *, char **,
524 off_t, int, int); 524 off_t, int, int);
525 525
526/*********************** Transaction Access Wrappers **************************/ 526/*********************** Transaction Access Wrappers **************************/
527static __inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t); 527static inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
528static __inline void ahd_set_transaction_status(struct scb *, uint32_t); 528static inline void ahd_set_transaction_status(struct scb *, uint32_t);
529static __inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t); 529static inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
530static __inline void ahd_set_scsi_status(struct scb *, uint32_t); 530static inline void ahd_set_scsi_status(struct scb *, uint32_t);
531static __inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd); 531static inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd);
532static __inline uint32_t ahd_get_transaction_status(struct scb *); 532static inline uint32_t ahd_get_transaction_status(struct scb *);
533static __inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd); 533static inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd);
534static __inline uint32_t ahd_get_scsi_status(struct scb *); 534static inline uint32_t ahd_get_scsi_status(struct scb *);
535static __inline void ahd_set_transaction_tag(struct scb *, int, u_int); 535static inline void ahd_set_transaction_tag(struct scb *, int, u_int);
536static __inline u_long ahd_get_transfer_length(struct scb *); 536static inline u_long ahd_get_transfer_length(struct scb *);
537static __inline int ahd_get_transfer_dir(struct scb *); 537static inline int ahd_get_transfer_dir(struct scb *);
538static __inline void ahd_set_residual(struct scb *, u_long); 538static inline void ahd_set_residual(struct scb *, u_long);
539static __inline void ahd_set_sense_residual(struct scb *scb, u_long resid); 539static inline void ahd_set_sense_residual(struct scb *scb, u_long resid);
540static __inline u_long ahd_get_residual(struct scb *); 540static inline u_long ahd_get_residual(struct scb *);
541static __inline u_long ahd_get_sense_residual(struct scb *); 541static inline u_long ahd_get_sense_residual(struct scb *);
542static __inline int ahd_perform_autosense(struct scb *); 542static inline int ahd_perform_autosense(struct scb *);
543static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *, 543static inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *,
544 struct scb *); 544 struct scb *);
545static __inline void ahd_notify_xfer_settings_change(struct ahd_softc *, 545static inline void ahd_notify_xfer_settings_change(struct ahd_softc *,
546 struct ahd_devinfo *); 546 struct ahd_devinfo *);
547static __inline void ahd_platform_scb_free(struct ahd_softc *ahd, 547static inline void ahd_platform_scb_free(struct ahd_softc *ahd,
548 struct scb *scb); 548 struct scb *scb);
549static __inline void ahd_freeze_scb(struct scb *scb); 549static inline void ahd_freeze_scb(struct scb *scb);
550 550
551static __inline 551static inline
552void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status) 552void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
553{ 553{
554 cmd->result &= ~(CAM_STATUS_MASK << 16); 554 cmd->result &= ~(CAM_STATUS_MASK << 16);
555 cmd->result |= status << 16; 555 cmd->result |= status << 16;
556} 556}
557 557
558static __inline 558static inline
559void ahd_set_transaction_status(struct scb *scb, uint32_t status) 559void ahd_set_transaction_status(struct scb *scb, uint32_t status)
560{ 560{
561 ahd_cmd_set_transaction_status(scb->io_ctx,status); 561 ahd_cmd_set_transaction_status(scb->io_ctx,status);
562} 562}
563 563
564static __inline 564static inline
565void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status) 565void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
566{ 566{
567 cmd->result &= ~0xFFFF; 567 cmd->result &= ~0xFFFF;
568 cmd->result |= status; 568 cmd->result |= status;
569} 569}
570 570
571static __inline 571static inline
572void ahd_set_scsi_status(struct scb *scb, uint32_t status) 572void ahd_set_scsi_status(struct scb *scb, uint32_t status)
573{ 573{
574 ahd_cmd_set_scsi_status(scb->io_ctx, status); 574 ahd_cmd_set_scsi_status(scb->io_ctx, status);
575} 575}
576 576
577static __inline 577static inline
578uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd) 578uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd)
579{ 579{
580 return ((cmd->result >> 16) & CAM_STATUS_MASK); 580 return ((cmd->result >> 16) & CAM_STATUS_MASK);
581} 581}
582 582
583static __inline 583static inline
584uint32_t ahd_get_transaction_status(struct scb *scb) 584uint32_t ahd_get_transaction_status(struct scb *scb)
585{ 585{
586 return (ahd_cmd_get_transaction_status(scb->io_ctx)); 586 return (ahd_cmd_get_transaction_status(scb->io_ctx));
587} 587}
588 588
589static __inline 589static inline
590uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd) 590uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd)
591{ 591{
592 return (cmd->result & 0xFFFF); 592 return (cmd->result & 0xFFFF);
593} 593}
594 594
595static __inline 595static inline
596uint32_t ahd_get_scsi_status(struct scb *scb) 596uint32_t ahd_get_scsi_status(struct scb *scb)
597{ 597{
598 return (ahd_cmd_get_scsi_status(scb->io_ctx)); 598 return (ahd_cmd_get_scsi_status(scb->io_ctx));
599} 599}
600 600
601static __inline 601static inline
602void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type) 602void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
603{ 603{
604 /* 604 /*
@@ -607,43 +607,43 @@ void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
607 */ 607 */
608} 608}
609 609
610static __inline 610static inline
611u_long ahd_get_transfer_length(struct scb *scb) 611u_long ahd_get_transfer_length(struct scb *scb)
612{ 612{
613 return (scb->platform_data->xfer_len); 613 return (scb->platform_data->xfer_len);
614} 614}
615 615
616static __inline 616static inline
617int ahd_get_transfer_dir(struct scb *scb) 617int ahd_get_transfer_dir(struct scb *scb)
618{ 618{
619 return (scb->io_ctx->sc_data_direction); 619 return (scb->io_ctx->sc_data_direction);
620} 620}
621 621
622static __inline 622static inline
623void ahd_set_residual(struct scb *scb, u_long resid) 623void ahd_set_residual(struct scb *scb, u_long resid)
624{ 624{
625 scsi_set_resid(scb->io_ctx, resid); 625 scsi_set_resid(scb->io_ctx, resid);
626} 626}
627 627
628static __inline 628static inline
629void ahd_set_sense_residual(struct scb *scb, u_long resid) 629void ahd_set_sense_residual(struct scb *scb, u_long resid)
630{ 630{
631 scb->platform_data->sense_resid = resid; 631 scb->platform_data->sense_resid = resid;
632} 632}
633 633
634static __inline 634static inline
635u_long ahd_get_residual(struct scb *scb) 635u_long ahd_get_residual(struct scb *scb)
636{ 636{
637 return scsi_get_resid(scb->io_ctx); 637 return scsi_get_resid(scb->io_ctx);
638} 638}
639 639
640static __inline 640static inline
641u_long ahd_get_sense_residual(struct scb *scb) 641u_long ahd_get_sense_residual(struct scb *scb)
642{ 642{
643 return (scb->platform_data->sense_resid); 643 return (scb->platform_data->sense_resid);
644} 644}
645 645
646static __inline 646static inline
647int ahd_perform_autosense(struct scb *scb) 647int ahd_perform_autosense(struct scb *scb)
648{ 648{
649 /* 649 /*
@@ -654,20 +654,20 @@ int ahd_perform_autosense(struct scb *scb)
654 return (1); 654 return (1);
655} 655}
656 656
657static __inline uint32_t 657static inline uint32_t
658ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb) 658ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
659{ 659{
660 return (sizeof(struct scsi_sense_data)); 660 return (sizeof(struct scsi_sense_data));
661} 661}
662 662
663static __inline void 663static inline void
664ahd_notify_xfer_settings_change(struct ahd_softc *ahd, 664ahd_notify_xfer_settings_change(struct ahd_softc *ahd,
665 struct ahd_devinfo *devinfo) 665 struct ahd_devinfo *devinfo)
666{ 666{
667 /* Nothing to do here for linux */ 667 /* Nothing to do here for linux */
668} 668}
669 669
670static __inline void 670static inline void
671ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb) 671ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
672{ 672{
673 ahd->flags &= ~AHD_RESOURCE_SHORTAGE; 673 ahd->flags &= ~AHD_RESOURCE_SHORTAGE;
@@ -678,7 +678,7 @@ void ahd_platform_free(struct ahd_softc *ahd);
678void ahd_platform_init(struct ahd_softc *ahd); 678void ahd_platform_init(struct ahd_softc *ahd);
679void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb); 679void ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
680 680
681static __inline void 681static inline void
682ahd_freeze_scb(struct scb *scb) 682ahd_freeze_scb(struct scb *scb)
683{ 683{
684 if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) { 684 if ((scb->io_ctx->result & (CAM_DEV_QFRZN << 16)) == 0) {