Fix build of ocs_fs with base gcc on i386

Add a few intermediate casts to uintptr_t to suppress "cast to pointer
from integer of different size" warnings from gcc.  Also remove a few
incorrect casts.

Reviewed by:	ram
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D15747
This commit is contained in:
dim 2018-06-11 07:57:32 +00:00
parent bf1c6714fe
commit e03e69707a
2 changed files with 7 additions and 7 deletions

View File

@ -140,7 +140,7 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma)
wrobj->host_buffer_descriptor[0].u.data.buffer_address_high = ocs_addr32_hi(dma->phys);
/* copy the data into the DMA buffer */
copyin((void *)mcmd->in_addr, dma->virt, mcmd->in_bytes);
copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes);
}
break;
case SLI4_OPC_COMMON_DELETE_OBJECT:
@ -169,8 +169,8 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma)
break;
default:
device_printf(ocs->dev, "%s: in=%p (%lld) out=%p (%lld)\n", __func__,
(void *)mcmd->in_addr, (unsigned long long)mcmd->in_bytes,
(void *)mcmd->out_addr, (unsigned long long)mcmd->out_bytes);
(void *)(uintptr_t)mcmd->in_addr, (unsigned long long)mcmd->in_bytes,
(void *)(uintptr_t)mcmd->out_addr, (unsigned long long)mcmd->out_bytes);
device_printf(ocs->dev, "%s: unknown (opc=%#x)\n", __func__,
req->opcode);
hexdump(mcmd, mcmd->size, NULL, 0);
@ -184,7 +184,7 @@ ocs_process_sli_config (ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd, ocs_dma_t *dma)
return ENXIO;
}
copyin((void *)mcmd->in_addr, dma->virt, mcmd->in_bytes);
copyin((void *)(uintptr_t)mcmd->in_addr, dma->virt, mcmd->in_bytes);
sli_config->payload.mem.address_low = ocs_addr32_lo(dma->phys);
sli_config->payload.mem.address_high = ocs_addr32_hi(dma->phys);
@ -250,7 +250,7 @@ ocs_process_mbx_ioctl(ocs_t *ocs, ocs_ioctl_elxu_mbox_t *mcmd)
if( SLI4_MBOX_COMMAND_SLI_CONFIG == ((sli4_mbox_command_header_t *)mcmd->payload)->command
&& mcmd->out_bytes && dma.virt) {
copyout(dma.virt, (void *)mcmd->out_addr, mcmd->out_bytes);
copyout(dma.virt, (void *)(uintptr_t)mcmd->out_addr, mcmd->out_bytes);
}
no_support:

View File

@ -781,7 +781,7 @@ __ocs_sport_attached(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
case OCS_EVT_ENTER: {
ocs_node_t *node;
ocs_log_debug(ocs, "[%s] SPORT attached WWPN %016llx WWNN %016llx \n", (unsigned long long)sport->display_name,
ocs_log_debug(ocs, "[%s] SPORT attached WWPN %016llx WWNN %016llx \n", sport->display_name,
sport->wwpn, sport->wwnn);
ocs_sport_lock(sport);
ocs_list_foreach(&sport->node_list, node) {
@ -805,7 +805,7 @@ __ocs_sport_attached(ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
}
case OCS_EVT_EXIT:
ocs_log_debug(ocs, "[%s] SPORT deattached WWPN %016llx WWNN %016llx \n", (unsigned long long)sport->display_name,
ocs_log_debug(ocs, "[%s] SPORT deattached WWPN %016llx WWNN %016llx \n", sport->display_name,
sport->wwpn, sport->wwnn);
if (sport->enable_ini) {
ocs_scsi_ini_del_sport(sport);