summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-10-18 16:25:12 +0300
committerHans Rosenfeld <hans.rosenfeld@joyent.com>2019-01-31 23:04:30 +0100
commitebf373523fbbfcc7f9f0b7e35f0e82fac5492cfe (patch)
tree5e339d20566af1294e425284cae3e883c648347e
parent3ebafc60580cf8a412e554e4babd8c3a0d3e98ea (diff)
downloadillumos-joyent-ebf373523fbbfcc7f9f0b7e35f0e82fac5492cfe.tar.gz
10298 pcmcia: cast between incompatible function types
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Andrew Stormont <andyjstormont@gmail.com> Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
-rw-r--r--usr/src/uts/common/pcmcia/cs/cs_stubs.c10
-rw-r--r--usr/src/uts/common/pcmcia/nexus/pcmcia.c28
2 files changed, 18 insertions, 20 deletions
diff --git a/usr/src/uts/common/pcmcia/cs/cs_stubs.c b/usr/src/uts/common/pcmcia/cs/cs_stubs.c
index 1f6dc19492..9bf02d2a2e 100644
--- a/usr/src/uts/common/pcmcia/cs/cs_stubs.c
+++ b/usr/src/uts/common/pcmcia/cs/cs_stubs.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This is the PCMCIA Card Services kernel stubs module. It provides
* the various PCMCIA kernel framework entry points.
@@ -77,10 +75,10 @@ int cs_stubs_debug = 0;
static csfunction_t *cardservices = NULL;
static int do_cs_call = 0;
-static int cs_no_carservices(void);
+static int cs_no_carservices(int32_t, ...);
#define CardServices (do_cs_call ? (*cardservices) : \
- ((csfunction_t *)cs_no_carservices))
+ (cs_no_carservices))
#ifdef USE_CS_STUBS_MODULE
@@ -154,7 +152,7 @@ csx_register_cardservices(cs_register_cardservices_t *rcs)
case CS_ENTRY_DEREGISTER:
do_cs_call = 0;
- cardservices = (csfunction_t *)cs_no_carservices;
+ cardservices = cs_no_carservices;
#ifdef CS_STUBS_DEBUG
if (cs_stubs_debug > 2)
cmn_err(CE_CONT,
@@ -1216,7 +1214,7 @@ csx_SetHandleOffset(acc_handle_t handle, uint32_t offset)
}
static int
-cs_no_carservices()
+cs_no_carservices(int32_t arg __unused, ...)
{
#ifdef CS_STUBS_DEBUG
if (cs_stubs_debug > 3)
diff --git a/usr/src/uts/common/pcmcia/nexus/pcmcia.c b/usr/src/uts/common/pcmcia/nexus/pcmcia.c
index 2256289fa4..3cffb78316 100644
--- a/usr/src/uts/common/pcmcia/nexus/pcmcia.c
+++ b/usr/src/uts/common/pcmcia/nexus/pcmcia.c
@@ -384,7 +384,7 @@ pcmcia_attach(dev_info_t *dip, anp_t *adapter)
mutex_enter(&pcmcia_enum_lock);
mutex_enter(&pcmcia_global_lock);
if (pcmcia_num_adapters == 0) {
- pcmcia_cis_parser = (f_tt *)CISParser;
+ pcmcia_cis_parser = (f_tt *)(uintptr_t)CISParser;
cis_parser = (void *(*)(int, ...)) CISParser;
pcmcia_cs_event = (f_tt *)cs_event;
cs_socket_services = SocketServices;
@@ -1744,7 +1744,7 @@ pcmcia_set_em_handler(int (*handler)(), caddr_t events, int elen,
if (mif == NULL)
return (ENOSPC);
- mif->mif_function = (void (*)())handler;
+ mif->mif_function = (void (*)())(uintptr_t)handler;
bcopy(events, mif->mif_events, elen);
mif->mif_id = id;
mutex_enter(&pcmcia_global_lock);
@@ -3815,7 +3815,7 @@ SSSetIRQHandler(set_irq_handler_t *handler)
retval = ddi_add_intr(dip, 0, handler->iblk_cookie,
handler->idev_cookie,
- (uint32_t(*)(caddr_t)) handler->handler,
+ (uint32_t(*)(caddr_t))(uintptr_t) handler->handler,
handler->arg1);
if (retval == DDI_SUCCESS) {
@@ -4530,18 +4530,18 @@ is_subtractv(dev_info_t *dip)
/*
* pcmcia_pci_alloc()
- * allocate mem or I/O resource from the ancestor of the cardbus bridge.
- * First start from the parent node. If the parent is a subtractive
- * decode bridge and it does not have the requested resource, go up the
- * device tree to find the resource.
+ * allocate mem or I/O resource from the ancestor of the cardbus bridge.
+ * First start from the parent node. If the parent is a subtractive
+ * decode bridge and it does not have the requested resource, go up the
+ * device tree to find the resource.
*
- * dip the parent node of the cardbus bridge
+ * dip the parent node of the cardbus bridge
*
- * res_dip returns a pointer to the node from which the
- * resource is obtained. *res_dip could point to
- * the parent or a higher level ancestor. *res_dip
- * should be saved by the caller and later passed
- * to pcmcia_ra_free();
+ * res_dip returns a pointer to the node from which the
+ * resource is obtained. *res_dip could point to
+ * the parent or a higher level ancestor. *res_dip
+ * should be saved by the caller and later passed
+ * to pcmcia_ra_free();
*/
int
pcmcia_pci_alloc(dev_info_t *dip, ndi_ra_request_t *req, ra_return_t *ret,
@@ -5292,7 +5292,7 @@ pcmcia_intr_enable_isr(dev_info_t *dip, dev_info_t *rdip,
handler.socket = sockp->ls_socket;
handler.irq = irq;
- handler.handler = (f_tt *)hdlp->ih_cb_func;
+ handler.handler = (f_tt *)(uintptr_t)hdlp->ih_cb_func;
handler.arg1 = hdlp->ih_cb_arg1;
handler.arg2 = hdlp->ih_cb_arg2;
handler.handler_id = (uint32_t)(uintptr_t)rdip;