Print this page
8659 ata: unused but set warnings with GCC 5.X

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/dktp/controller/ata/ata_common.c
          +++ new/usr/src/uts/intel/io/dktp/controller/ata/ata_common.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
       25 + *
       26 + * Copyright 2017 RackTop Systems.
  25   27   */
  26   28  
  27   29  #include <sys/types.h>
  28   30  #include <sys/modctl.h>
  29   31  #include <sys/debug.h>
  30   32  #include <sys/promif.h>
  31   33  #include <sys/pci.h>
  32   34  #include <sys/errno.h>
  33   35  #include <sys/open.h>
  34   36  #include <sys/uio.h>
↓ open down ↓ 3457 lines elided ↑ open up ↑
3492 3494  
3493 3495          return (rc);
3494 3496  }
3495 3497  
3496 3498  /*
3497 3499   * Initialize the power management components
3498 3500   */
3499 3501  static void
3500 3502  ata_init_pm(dev_info_t *dip)
3501 3503  {
     3504 +        int             instance;
     3505 +        ata_ctl_t       *ata_ctlp;
     3506 +#ifdef  ATA_USE_AUTOPM
3502 3507          char            pmc_name[16];
3503 3508          char            *pmc[] = {
3504 3509                                  NULL,
3505 3510                                  "0=Sleep (PCI D3 State)",
3506 3511                                  "3=PowerOn (PCI D0 State)",
3507 3512                                  NULL
3508 3513                          };
3509      -        int             instance;
3510      -        ata_ctl_t       *ata_ctlp;
     3514 +#endif
3511 3515  
3512 3516  
3513 3517          instance = ddi_get_instance(dip);
3514 3518          ata_ctlp = ddi_get_soft_state(ata_state, instance);
3515 3519          ata_ctlp->ac_pm_support = 0;
3516 3520  
3517 3521          /* check PCI capabilities */
3518 3522          if (!ata_is_pci(dip))
3519 3523                  return;
3520 3524  
     3525 +#ifdef  ATA_USE_AUTOPM
3521 3526          (void) sprintf(pmc_name, "NAME=ata%d", instance);
3522 3527          pmc[0] = pmc_name;
3523 3528  
3524      -#ifdef  ATA_USE_AUTOPM
3525 3529          if (ddi_prop_update_string_array(DDI_DEV_T_NONE, dip,
3526 3530              "pm-components", pmc, 3) != DDI_PROP_SUCCESS) {
3527 3531                  return;
3528 3532          }
3529 3533  #endif
3530 3534  
3531 3535          ata_ctlp->ac_pm_support = 1;
3532 3536          ata_ctlp->ac_pm_level = PM_LEVEL_D0;
3533 3537  
3534 3538          ATA_BUSY_COMPONENT(dip, 0);
↓ open down ↓ 416 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX