diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/boot/sys/boot/efi/libefi/efipart.c | 111 | ||||
-rw-r--r-- | usr/src/lib/libnisdb/ldap_map.c | 12 | ||||
-rw-r--r-- | usr/src/lib/libsldap/common/ns_mapping.c | 12 | ||||
-rw-r--r-- | usr/src/lib/pam_modules/sample/sample_acct_mgmt.c | 4 | ||||
-rw-r--r-- | usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_name.c | 4 | ||||
-rw-r--r-- | usr/src/tools/scripts/nightly.sh | 13 | ||||
-rw-r--r-- | usr/src/uts/common/io/bfe/bfe.c | 9 | ||||
-rw-r--r-- | usr/src/uts/common/io/mega_sas/megaraid_sas.c | 21 | ||||
-rw-r--r-- | usr/src/uts/common/io/mr_sas/mr_sas.c | 16 | ||||
-rw-r--r-- | usr/src/uts/common/io/ntxn/niu.c | 19 | ||||
-rw-r--r-- | usr/src/uts/common/io/ntxn/unm_nic.h | 3 | ||||
-rw-r--r-- | usr/src/uts/common/io/ntxn/unm_nic_hw.c | 11 | ||||
-rw-r--r-- | usr/src/uts/i86xpv/cpu/generic_cpu/gcpu_mca_xpv.c | 5 |
13 files changed, 140 insertions, 100 deletions
diff --git a/usr/src/boot/sys/boot/efi/libefi/efipart.c b/usr/src/boot/sys/boot/efi/libefi/efipart.c index 21d741849a..347c14f68a 100644 --- a/usr/src/boot/sys/boot/efi/libefi/efipart.c +++ b/usr/src/boot/sys/boot/efi/libefi/efipart.c @@ -178,6 +178,72 @@ efipart_floppy(EFI_DEVICE_PATH *node) } /* + * Determine if the provided device path is hdd. + * + * There really is no simple fool proof way to classify the devices. + * Since we do build three lists of devices - floppy, cd and hdd, we + * will try to see if the device is floppy or cd, and list anything else + * as hdd. + */ +static bool +efipart_hdd(EFI_DEVICE_PATH *dp) +{ + unsigned i, nin; + EFI_DEVICE_PATH *devpath, *node; + EFI_BLOCK_IO *blkio; + EFI_STATUS status; + + if (dp == NULL) + return (false); + + if ((node = efi_devpath_last_node(dp)) == NULL) + return (false); + + if (efipart_floppy(node) != NULL) + return (false); + + /* + * Test every EFI BLOCK IO handle to make sure dp is not device path + * for CD/DVD. + */ + nin = efipart_nhandles / sizeof (*efipart_handles); + for (i = 0; i < nin; i++) { + devpath = efi_lookup_devpath(efipart_handles[i]); + if (devpath == NULL) + return (false); + + /* Only continue testing when dp is prefix in devpath. */ + if (!efi_devpath_is_prefix(dp, devpath)) + continue; + + /* + * The device path has to have last node describing the + * device, or we can not test the type. + */ + if ((node = efi_devpath_last_node(devpath)) == NULL) + return (false); + + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_CDROM_DP) { + return (false); + } + + /* Make sure we do have the media. */ + status = BS->HandleProtocol(efipart_handles[i], + &blkio_guid, (void **)&blkio); + if (EFI_ERROR(status)) + return (false); + + /* USB or SATA cd without the media. */ + if (blkio->Media->RemovableMedia && + !blkio->Media->MediaPresent) { + return (false); + } + } + return (true); +} + +/* * Add or update entries with new handle data. */ static int @@ -290,9 +356,13 @@ efipart_updatecd(void) if ((node = efi_devpath_last_node(devpath)) == NULL) continue; + if (efipart_floppy(node) != NULL) continue; + if (efipart_hdd(devpath)) + continue; + status = BS->HandleProtocol(efipart_handles[i], &blkio_guid, (void **)&blkio); if (EFI_ERROR(status)) @@ -362,13 +432,21 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE part_handle) pdinfo_t *hd, *pd, *last; disk_devpath = efi_lookup_devpath(disk_handle); - part_devpath = efi_lookup_devpath(part_handle); - if (disk_devpath == NULL || part_devpath == NULL) { + if (disk_devpath == NULL) return (ENOENT); + + if (part_handle != NULL) { + part_devpath = efi_lookup_devpath(part_handle); + if (part_devpath == NULL) + return (ENOENT); + node = (HARDDRIVE_DEVICE_PATH *) + efi_devpath_last_node(part_devpath); + if (node == NULL) + return (ENOENT); /* This should not happen. */ + } else { + part_devpath = NULL; + node = NULL; } - node = (HARDDRIVE_DEVICE_PATH *)efi_devpath_last_node(part_devpath); - if (node == NULL) - return (ENOENT); /* This should not happen. */ pd = calloc(1, sizeof(pdinfo_t)); if (pd == NULL) { @@ -379,6 +457,9 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE part_handle) STAILQ_FOREACH(hd, &hdinfo, pd_link) { if (efi_devpath_match(hd->pd_devpath, disk_devpath) == true) { + if (part_devpath == NULL) + return (0); + /* Add the partition. */ pd->pd_handle = part_handle; pd->pd_unit = node->PartitionNumber; @@ -401,6 +482,9 @@ efipart_hdinfo_add(EFI_HANDLE disk_handle, EFI_HANDLE part_handle) hd->pd_devpath = disk_devpath; STAILQ_INSERT_TAIL(&hdinfo, hd, pd_link); + if (part_devpath == NULL) + return (0); + pd = calloc(1, sizeof(pdinfo_t)); if (pd == NULL) { printf("Failed to add partition, out of memory\n"); @@ -523,7 +607,8 @@ efipart_updatehd(void) if ((node = efi_devpath_last_node(devpath)) == NULL) continue; - if (efipart_floppy(node) != NULL) + + if (!efipart_hdd(devpath)) continue; status = BS->HandleProtocol(efipart_handles[i], @@ -532,6 +617,12 @@ efipart_updatehd(void) continue; if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_FILEPATH_DP) { + efipart_hdinfo_add_filepath(efipart_handles[i]); + continue; + } + + if (DevicePathType(node) == MEDIA_DEVICE_PATH && DevicePathSubType(node) == MEDIA_HARDDRIVE_DP) { devpathcpy = efi_devpath_trim(devpath); if (devpathcpy == NULL) @@ -550,18 +641,16 @@ efipart_updatehd(void) continue; if ((node = efi_devpath_last_node(devpathcpy)) == NULL) continue; + if (DevicePathType(node) == MEDIA_DEVICE_PATH && DevicePathSubType(node) == MEDIA_HARDDRIVE_DP) continue; + efipart_hdinfo_add(handle, efipart_handles[i]); continue; } - if (DevicePathType(node) == MEDIA_DEVICE_PATH && - DevicePathSubType(node) == MEDIA_FILEPATH_DP) { - efipart_hdinfo_add_filepath(efipart_handles[i]); - continue; - } + efipart_hdinfo_add(efipart_handles[i], NULL); } } diff --git a/usr/src/lib/libnisdb/ldap_map.c b/usr/src/lib/libnisdb/ldap_map.c index 7da24e8877..524a847757 100644 --- a/usr/src/lib/libnisdb/ldap_map.c +++ b/usr/src/lib/libnisdb/ldap_map.c @@ -53,13 +53,11 @@ int setColumnNames(__nis_table_mapping_t *t) { int i, j, nic, noc; char **col; - zotypes type; char *myself = "setColumnNames"; if (t == 0) return (0); - type = t->objType; col = t->column; nic = (col != 0) ? t->numColumns : -1; @@ -1130,7 +1128,6 @@ verifyIndexMatch(__nis_table_mapping_t *x, db_query *q, /* Check each index */ for (i = 0; i < x->index.numIndexes; i++) { - int len = 0; char *value = 0; /* Skip NULL index names */ @@ -1178,11 +1175,6 @@ verifyIndexMatch(__nis_table_mapping_t *x, db_query *q, index_value-> itemvalue. itemvalue_val; - len = q->components. - components_val[k]. - index_value-> - itemvalue. - itemvalue_len; break; } } @@ -1240,7 +1232,7 @@ __nis_table_mapping_t ** selectTableMapping(__nis_table_mapping_t *t, db_query *q, int wantWrite, int wantObj, char *dbId, int *numMatches) { - __nis_table_mapping_t *r, *x, **tp; + __nis_table_mapping_t *x, **tp; int i, nm, numap; char *myself = "selectTableMapping"; @@ -1306,7 +1298,7 @@ selectTableMapping(__nis_table_mapping_t *t, db_query *q, } /* Scan all mappings, and collect candidates */ - for (nm = 0, r = 0, x = t; x != 0; x = x->next) { + for (nm = 0, x = t; x != 0; x = x->next) { if (x->objectDN == 0) continue; if (wantWrite) { diff --git a/usr/src/lib/libsldap/common/ns_mapping.c b/usr/src/lib/libsldap/common/ns_mapping.c index 1ceb035941..7e8caaa0db 100644 --- a/usr/src/lib/libsldap/common/ns_mapping.c +++ b/usr/src/lib/libsldap/common/ns_mapping.c @@ -58,7 +58,7 @@ ns_hash(const char *str) static ns_hash_t * ns_scan_hash(ns_hashtype_t type, const char *service, - const char *str, ns_hash_t *idx) + const char *str, ns_hash_t *idx) { while (idx) { if (idx->h_type == type && @@ -77,7 +77,7 @@ ns_scan_hash(ns_hashtype_t type, const char *service, static ns_hash_t * ns_get_hash(const ns_config_t *config, - ns_hashtype_t type, const char *service, const char *str) + ns_hashtype_t type, const char *service, const char *str) { ns_hash_t *idx, *hashp; unsigned long hash; @@ -168,7 +168,7 @@ __s_api_destroy_hash(ns_config_t *config) int __s_api_add_map2hash(ns_config_t *config, ns_hashtype_t type, - ns_mapping_t *map) + ns_mapping_t *map) { ns_hash_t *idx, *newp; unsigned long hash; @@ -324,11 +324,10 @@ typedef enum _ns_parse_state { static int __s_api_parseASearchDesc(const char *service, - char **cur, ns_ldap_search_desc_t **ret) + char **cur, ns_ldap_search_desc_t **ret) { ns_ldap_search_desc_t *ptr; char *sptr, *dptr; - char buf[BUFSIZ]; int i, rc; ns_ldap_error_t **errorp = NULL; ns_ldap_error_t *error = NULL; @@ -456,7 +455,6 @@ __s_api_parseASearchDesc(const char *service, state = P_FILTER; break; case P_SCOPE: - buf[0] = '\0'; if (*sptr == SEMITOK) { /* no more SSD */ state = P_EXIT; @@ -617,7 +615,7 @@ __s_api_parseASearchDesc(const char *service, static int __ns_ldap_saveSearchDesc(ns_ldap_search_desc_t ***sdlist, - int *cnt, int *max, ns_ldap_search_desc_t *ret) + int *cnt, int *max, ns_ldap_search_desc_t *ret) { ns_ldap_search_desc_t **tmplist; diff --git a/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c b/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c index c02a01289b..f8889c6d81 100644 --- a/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c +++ b/usr/src/lib/pam_modules/sample/sample_acct_mgmt.c @@ -52,9 +52,9 @@ pam_sm_acct_mgmt( char *pg; int i; /*LINTED - set but not used. Would be used in a real module. */ - int debug = 0; + int debug __unused = 0; /*LINTED - set but not used. Would be used in a real module. */ - int nowarn = 0; + int nowarn __unused = 0; int error = 0; if (argc == 0) diff --git a/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_name.c b/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_name.c index 063a505504..024fda6e86 100644 --- a/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_name.c +++ b/usr/src/lib/smbsrv/libsmbns/common/smbns_netbios_name.c @@ -484,7 +484,6 @@ smb_name_buf_from_packet(unsigned char *buf, int n_buf, addr_entry_t *raddr; unsigned char *heap = buf; unsigned char *end_heap = heap + n_buf; - unsigned char *dnptrs[32]; unsigned char comp_name_buf[MAX_NAME_LENGTH]; unsigned int tmp; int i, step; @@ -492,9 +491,6 @@ smb_name_buf_from_packet(unsigned char *buf, int n_buf, if (n_buf < NAME_HEADER_SIZE) return (-1); /* no header, impossible */ - dnptrs[0] = heap; - dnptrs[1] = 0; - BE_OUT16(heap, npb->name_trn_id); heap += 2; diff --git a/usr/src/tools/scripts/nightly.sh b/usr/src/tools/scripts/nightly.sh index b327041a2d..391ced5de6 100644 --- a/usr/src/tools/scripts/nightly.sh +++ b/usr/src/tools/scripts/nightly.sh @@ -26,6 +26,7 @@ # Copyright 2011 Nexenta Systems, Inc. All rights reserved. # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org> # Copyright 2013 (c) Joyent, Inc. All rights reserved. +# Copyright (c) 2017 by Delphix. All rights reserved. # # Based on the nightly script from the integration folks, # Mostly modified and owned by mike_s. @@ -197,11 +198,13 @@ function build { echo "\n==== Build errors ($LABEL) ====\n" >> $mail_msg_file egrep ":" $SRC/${INSTALLOG}.out | - egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ - egrep -v "Ignoring unknown host" | \ - egrep -v "cc .* -o error " | \ - egrep -v "warning" | tee $TMPDIR/build_errs${SUFFIX} \ - >> $mail_msg_file + egrep -e "(^${MAKE}:|[ ]error[: \n])" | \ + egrep -v "Ignoring unknown host" | \ + egrep -v "cc .* -o error " | \ + egrep -v "warning" | tee $TMPDIR/build_errs${SUFFIX} \ + >> $mail_msg_file + sed -n "/^Undefined[ ]*first referenced$/,/^ld: fatal:/p" \ + < $SRC/${INSTALLOG}.out >> $mail_msg_file if [[ -s $TMPDIR/build_errs${SUFFIX} ]]; then build_ok=n this_build_ok=n diff --git a/usr/src/uts/common/io/bfe/bfe.c b/usr/src/uts/common/io/bfe/bfe.c index d8dba0f65b..5dfd8a8e25 100644 --- a/usr/src/uts/common/io/bfe/bfe.c +++ b/usr/src/uts/common/io/bfe/bfe.c @@ -2551,15 +2551,6 @@ bfe_unmap_regs(bfe_t *bfe) static int bfe_get_chip_config(bfe_t *bfe) { - uint32_t prom[BFE_EEPROM_SIZE]; - int i; - - /* - * Read EEPROM in prom[] - */ - for (i = 0; i < BFE_EEPROM_SIZE; i++) { - prom[i] = INL(bfe, BFE_EEPROM_BASE + i * sizeof (uint32_t)); - } bfe->bfe_dev_addr[0] = bfe->bfe_ether_addr[0] = INB(bfe, BFE_EEPROM_BASE + 79); diff --git a/usr/src/uts/common/io/mega_sas/megaraid_sas.c b/usr/src/uts/common/io/mega_sas/megaraid_sas.c index 1ec50a98cf..98e8b2691b 100644 --- a/usr/src/uts/common/io/mega_sas/megaraid_sas.c +++ b/usr/src/uts/common/io/mega_sas/megaraid_sas.c @@ -1127,7 +1127,7 @@ megasas_reset(dev_info_t *dip, ddi_reset_cmd_t cmd) /*ARGSUSED*/ static int megasas_tran_tgt_init(dev_info_t *hba_dip, dev_info_t *tgt_dip, - scsi_hba_tran_t *tran, struct scsi_device *sd) + scsi_hba_tran_t *tran, struct scsi_device *sd) { con_log(CL_ANN1, (CE_NOTE, "chkpnt:%s:%d", __func__, __LINE__)); @@ -1156,8 +1156,8 @@ megasas_tran_tgt_init(dev_info_t *hba_dip, dev_info_t *tgt_dip, */ static struct scsi_pkt * megasas_tran_init_pkt(struct scsi_address *ap, register struct scsi_pkt *pkt, - struct buf *bp, int cmdlen, int statuslen, int tgtlen, - int flags, int (*callback)(), caddr_t arg) + struct buf *bp, int cmdlen, int statuslen, int tgtlen, + int flags, int (*callback)(), caddr_t arg) { struct scsa_cmd *acmd; struct megasas_instance *instance; @@ -3307,7 +3307,6 @@ build_cmd(struct megasas_instance *instance, struct scsi_address *ap, { uint16_t flags = 0; uint32_t i; - uint32_t context; uint32_t sge_bytes; struct megasas_cmd *cmd; @@ -3396,8 +3395,6 @@ build_cmd(struct megasas_instance *instance, struct scsi_address *ap, ldio->sge_count = acmd->cmd_cookiecnt; mfi_sgl = (struct megasas_sge64 *)&ldio->sgl; - context = ldio->context; - if (acmd->cmd_cdblen == CDB_GROUP0) { ldio->lba_count = host_to_le16( (uint16_t)(pkt->pkt_cdbp[4])); @@ -3474,15 +3471,10 @@ build_cmd(struct megasas_instance *instance, struct scsi_address *ap, pthru->sense_buf_phys_addr_hi = 0; pthru->sense_buf_phys_addr_lo = cmd->sense_phys_addr; - context = pthru->context; - bcopy(pkt->pkt_cdbp, pthru->cdb, acmd->cmd_cdblen); break; } -#ifdef lint - context = context; -#endif /* bzero(mfi_sgl, sizeof (struct megasas_sge64) * MAX_SGL); */ /* prepare the scatter-gather list for the firmware */ @@ -4749,8 +4741,6 @@ disable_intr_xscale(struct megasas_instance *instance) static void disable_intr_ppc(struct megasas_instance *instance) { - uint32_t mask; - con_log(CL_ANN1, (CE_NOTE, "disable_intr_ppc: called\n")); con_log(CL_ANN1, (CE_NOTE, "disable_intr_ppc: before : " @@ -4763,10 +4753,7 @@ disable_intr_ppc(struct megasas_instance *instance) "outbound_intr_mask = 0x%x\n", RD_OB_INTR_MASK(instance))); /* dummy read to force PCI flush */ - mask = RD_OB_INTR_MASK(instance); -#ifdef lint - mask = mask; -#endif + (void) RD_OB_INTR_MASK(instance); } static int diff --git a/usr/src/uts/common/io/mr_sas/mr_sas.c b/usr/src/uts/common/io/mr_sas/mr_sas.c index aff0f806b5..b2e70ea0f0 100644 --- a/usr/src/uts/common/io/mr_sas/mr_sas.c +++ b/usr/src/uts/common/io/mr_sas/mr_sas.c @@ -5051,7 +5051,6 @@ build_cmd(struct mrsas_instance *instance, struct scsi_address *ap, { uint16_t flags = 0; uint32_t i; - uint32_t context; uint32_t sge_bytes; uint32_t tmp_data_xfer_len; ddi_acc_handle_t acc_handle; @@ -5166,7 +5165,7 @@ build_cmd(struct mrsas_instance *instance, struct scsi_address *ap, mfi_sgl = (struct mrsas_sge64 *)&ldio->sgl; } - context = ddi_get32(acc_handle, &ldio->context); + (void) ddi_get32(acc_handle, &ldio->context); if (acmd->cmd_cdblen == CDB_GROUP0) { /* 6-byte cdb */ @@ -5281,15 +5280,13 @@ build_cmd(struct mrsas_instance *instance, struct scsi_address *ap, ddi_put32(acc_handle, &pthru->sense_buf_phys_addr_lo, cmd->sense_phys_addr); - context = ddi_get32(acc_handle, &pthru->context); + (void) ddi_get32(acc_handle, &pthru->context); ddi_rep_put8(acc_handle, (uint8_t *)pkt->pkt_cdbp, (uint8_t *)pthru->cdb, acmd->cmd_cdblen, DDI_DEV_AUTOINCR); break; } -#ifdef lint - context = context; -#endif + /* prepare the scatter-gather list for the firmware */ if (instance->flag_ieee) { for (i = 0; i < acmd->cmd_cookiecnt; i++, mfi_sgl_ieee++) { @@ -6838,8 +6835,6 @@ enable_intr_ppc(struct mrsas_instance *instance) static void disable_intr_ppc(struct mrsas_instance *instance) { - uint32_t mask; - con_log(CL_ANN1, (CE_NOTE, "disable_intr_ppc: called")); con_log(CL_ANN1, (CE_NOTE, "disable_intr_ppc: before : " @@ -6853,10 +6848,7 @@ disable_intr_ppc(struct mrsas_instance *instance) "outbound_intr_mask = 0x%x", RD_OB_INTR_MASK(instance))); /* dummy read to force PCI flush */ - mask = RD_OB_INTR_MASK(instance); -#ifdef lint - mask = mask; -#endif + (void) RD_OB_INTR_MASK(instance); } static int diff --git a/usr/src/uts/common/io/ntxn/niu.c b/usr/src/uts/common/io/ntxn/niu.c index 9fd4750f66..0af85aac18 100644 --- a/usr/src/uts/common/io/ntxn/niu.c +++ b/usr/src/uts/common/io/ntxn/niu.c @@ -228,9 +228,8 @@ unm_niu_macaddr_set(struct unm_adapter_s *adapter, unm_ethernet_macaddr_t addr) } /* Enable a GbE interface */ -/* ARGSUSED */ -native_t unm_niu_enable_gbe_port(struct unm_adapter_s *adapter, - unm_niu_gbe_ifmode_t mode_dont_care) +native_t +unm_niu_enable_gbe_port(struct unm_adapter_s *adapter) { unm_niu_gb_mac_config_0_t mac_cfg0; unm_niu_gb_mac_config_1_t mac_cfg1; @@ -240,8 +239,6 @@ native_t unm_niu_enable_gbe_port(struct unm_adapter_s *adapter, int one = 1; u32 port_mode = 0; - mode_dont_care = 0; - if ((port < 0) || (port > UNM_NIU_MAX_GBE_PORTS)) { return (-1); } @@ -251,11 +248,11 @@ native_t unm_niu_enable_gbe_port(struct unm_adapter_s *adapter, adapter->link_speed != MBPS_1000) { if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { -/* - * Do NOT fail this call because the cable is unplugged. - * Updated when the link comes up... - */ - adapter->link_speed = MBPS_1000; + /* + * Do NOT fail this call because the cable is unplugged. + * Updated when the link comes up... + */ + adapter->link_speed = MBPS_1000; } else { return (-1); } @@ -479,7 +476,7 @@ unm_niu_set_promiscuous_mode(struct unm_adapter_s *adapter, */ int unm_niu_xg_macaddr_set(struct unm_adapter_s *adapter, - unm_ethernet_macaddr_t addr) + unm_ethernet_macaddr_t addr) { int phy = adapter->physical_port; unm_crbword_t temp = 0; diff --git a/usr/src/uts/common/io/ntxn/unm_nic.h b/usr/src/uts/common/io/ntxn/unm_nic.h index b8d3f20a2b..9019e2d584 100644 --- a/usr/src/uts/common/io/ntxn/unm_nic.h +++ b/usr/src/uts/common/io/ntxn/unm_nic.h @@ -739,8 +739,7 @@ int unm_niu_xg_macaddr_set(struct unm_adapter_s *adapter, native_t unm_niu_disable_xg_port(struct unm_adapter_s *adapter); long unm_niu_gbe_init_port(long port); -native_t unm_niu_enable_gbe_port(struct unm_adapter_s *adapter, - unm_niu_gbe_ifmode_t mode); +native_t unm_niu_enable_gbe_port(struct unm_adapter_s *adapter); native_t unm_niu_disable_gbe_port(struct unm_adapter_s *adapter); int unm_niu_macaddr_get(struct unm_adapter_s *adapter, unsigned char *addr); diff --git a/usr/src/uts/common/io/ntxn/unm_nic_hw.c b/usr/src/uts/common/io/ntxn/unm_nic_hw.c index bbf13aac05..7a78099ecc 100644 --- a/usr/src/uts/common/io/ntxn/unm_nic_hw.c +++ b/usr/src/uts/common/io/ntxn/unm_nic_hw.c @@ -324,7 +324,8 @@ crb_win_lock(struct unm_adapter_s *adapter) /* * Yield CPU */ - for (i = 0; i < 20; i++); + for (i = 0; i < 20; i++) + ; } adapter->unm_crb_writelit_adapter(adapter, UNM_CRB_WIN_LOCK_ID, adapter->portnum); @@ -1904,8 +1905,7 @@ unm_nic_unset_promisc_mode(struct unm_adapter_s *adapter) } long -unm_nic_phy_read(unm_adapter *adapter, long reg, - __uint32_t *readval) +unm_nic_phy_read(unm_adapter *adapter, long reg, __uint32_t *readval) { long ret = 0; @@ -1934,21 +1934,20 @@ unm_nic_init_port(struct unm_adapter_s *adapter) long portnum = adapter->physical_port; long ret = 0; long reg = 0; - unm_niu_gbe_ifmode_t mode_dont_care = 0; u32 port_mode = 0; unm_nic_set_link_parameters(adapter); switch (adapter->ahw.board_type) { case UNM_NIC_GBE: - ret = unm_niu_enable_gbe_port(adapter, mode_dont_care); + ret = unm_niu_enable_gbe_port(adapter); break; case UNM_NIC_XGBE: adapter->unm_nic_hw_read_wx(adapter, UNM_PORT_MODE_ADDR, &port_mode, 4); if (port_mode == UNM_PORT_MODE_802_3_AP) { - ret = unm_niu_enable_gbe_port(adapter, mode_dont_care); + ret = unm_niu_enable_gbe_port(adapter); } else { adapter->unm_crb_writelit_adapter(adapter, UNM_NIU_XGE_CONFIG_0 + (0x10000 * portnum), 0x5); diff --git a/usr/src/uts/i86xpv/cpu/generic_cpu/gcpu_mca_xpv.c b/usr/src/uts/i86xpv/cpu/generic_cpu/gcpu_mca_xpv.c index fd2887b682..be28a710bf 100644 --- a/usr/src/uts/i86xpv/cpu/generic_cpu/gcpu_mca_xpv.c +++ b/usr/src/uts/i86xpv/cpu/generic_cpu/gcpu_mca_xpv.c @@ -76,10 +76,9 @@ gcpu_xpv_proxy_logout(int what, struct mc_info *mi, struct mcinfo_common **micp, struct mcinfo_bank *mib; cmi_hdl_t hdl = NULL; cmi_mca_regs_t *mcrp; - gcpu_data_t *gcpu; int idx = *idxp; int tried = 0; - int nbanks, j; + int j; /* Skip over the MC_TYPE_GLOBAL record */ ASSERT(mgi->common.type == MC_TYPE_GLOBAL); @@ -110,8 +109,6 @@ gcpu_xpv_proxy_logout(int what, struct mc_info *mi, struct mcinfo_common **micp, gcpu_xpv_hdl_lookupfails++; goto next_record; } else { - gcpu = cmi_hdl_getcmidata(hdl); - nbanks = gcpu->gcpu_mca.gcpu_mca_nbanks; bzero(bankregs, bankregs_sz); mcrp = bankregs; } |