Print this page
8659 ata: unused but set warnings with GCC 5.X
*** 20,29 ****
--- 20,31 ----
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2017 RackTop Systems.
*/
#include <sys/types.h>
#include <sys/modctl.h>
#include <sys/debug.h>
*** 3497,3515 ****
* Initialize the power management components
*/
static void
ata_init_pm(dev_info_t *dip)
{
char pmc_name[16];
char *pmc[] = {
NULL,
"0=Sleep (PCI D3 State)",
"3=PowerOn (PCI D0 State)",
NULL
};
! int instance;
! ata_ctl_t *ata_ctlp;
instance = ddi_get_instance(dip);
ata_ctlp = ddi_get_soft_state(ata_state, instance);
ata_ctlp->ac_pm_support = 0;
--- 3499,3519 ----
* Initialize the power management components
*/
static void
ata_init_pm(dev_info_t *dip)
{
+ int instance;
+ ata_ctl_t *ata_ctlp;
+ #ifdef ATA_USE_AUTOPM
char pmc_name[16];
char *pmc[] = {
NULL,
"0=Sleep (PCI D3 State)",
"3=PowerOn (PCI D0 State)",
NULL
};
! #endif
instance = ddi_get_instance(dip);
ata_ctlp = ddi_get_soft_state(ata_state, instance);
ata_ctlp->ac_pm_support = 0;
*** 3516,3529 ****
/* check PCI capabilities */
if (!ata_is_pci(dip))
return;
(void) sprintf(pmc_name, "NAME=ata%d", instance);
pmc[0] = pmc_name;
- #ifdef ATA_USE_AUTOPM
if (ddi_prop_update_string_array(DDI_DEV_T_NONE, dip,
"pm-components", pmc, 3) != DDI_PROP_SUCCESS) {
return;
}
#endif
--- 3520,3533 ----
/* check PCI capabilities */
if (!ata_is_pci(dip))
return;
+ #ifdef ATA_USE_AUTOPM
(void) sprintf(pmc_name, "NAME=ata%d", instance);
pmc[0] = pmc_name;
if (ddi_prop_update_string_array(DDI_DEV_T_NONE, dip,
"pm-components", pmc, 3) != DDI_PROP_SUCCESS) {
return;
}
#endif