diff -r 807983200019 -r ccafdf1e261f master/ioctl.c --- a/master/ioctl.c Thu Dec 06 18:13:02 2012 +0100 +++ b/master/ioctl.c Thu Dec 06 18:43:56 2012 +0100 @@ -589,7 +589,7 @@ void *arg /**< ioctl() argument. */ ) { - return ec_master_debug_level(master, (unsigned int) arg); + return ec_master_debug_level(master, (unsigned long) arg); } /*****************************************************************************/ @@ -781,7 +781,7 @@ } if (!(target = kmalloc(data.target_size, GFP_KERNEL))) { - EC_MASTER_ERR(master, "Failed to allocate %u bytes" + EC_MASTER_ERR(master, "Failed to allocate %zu bytes" " for SDO upload.\n", data.target_size); return -ENOMEM; } @@ -825,7 +825,7 @@ } if (!(sdo_data = kmalloc(data.data_size, GFP_KERNEL))) { - EC_MASTER_ERR(master, "Failed to allocate %u bytes" + EC_MASTER_ERR(master, "Failed to allocate %zu bytes" " for SDO download.\n", data.data_size); return -ENOMEM; } @@ -1586,7 +1586,7 @@ ec_ioctl_context_t *ctx /**< Private data structure of file handle. */ ) { - uint32_t config_index = (uint32_t) arg; + unsigned long config_index = (unsigned long) arg; ec_slave_config_t *sc = NULL; int ret = 0; @@ -2754,7 +2754,7 @@ } list_for_each_entry(domain, &master->domains, list) { - if (domain->index == (unsigned int) arg) { + if (domain->index == (unsigned long) arg) { up(&master->master_sem); return offset; } @@ -2783,7 +2783,7 @@ /* no locking of master_sem needed, because domain will not be deleted in * the meantime. */ - if (!(domain = ec_master_find_domain(master, (unsigned int) arg))) { + if (!(domain = ec_master_find_domain(master, (unsigned long) arg))) { return -ENOENT; } @@ -2809,7 +2809,7 @@ /* no locking of master_sem needed, because domain will not be deleted in * the meantime. */ - if (!(domain = ec_master_find_domain(master, (unsigned int) arg))) { + if (!(domain = ec_master_find_domain(master, (unsigned long) arg))) { return -ENOENT; } @@ -3746,7 +3746,7 @@ data = kmalloc(ioctl.mem_size, GFP_KERNEL); if (!data) { - EC_MASTER_ERR(master, "Failed to allocate %u bytes of IDN data.\n", + EC_MASTER_ERR(master, "Failed to allocate %zu bytes of IDN data.\n", ioctl.mem_size); return -ENOMEM; }