Fixed format specifiers.
--- a/master/cdev.c Thu May 20 12:35:36 2010 +0200
+++ b/master/cdev.c Thu May 20 12:46:09 2010 +0200
@@ -3514,7 +3514,7 @@
filp->private_data = priv;
#if DEBUG_IOCTL
- EC_MASTER_DBG(cdev->master, "File opened.\n");
+ EC_MASTER_DBG(cdev->master, 0, "File opened.\n");
#endif
return 0;
}
@@ -3535,7 +3535,7 @@
vfree(priv->process_data);
#if DEBUG_IOCTL
- EC_MASTER_DBG(master, "File closed.\n");
+ EC_MASTER_DBG(master, 0, "File closed.\n");
#endif
kfree(priv);
@@ -3552,9 +3552,8 @@
ec_master_t *master = priv->cdev->master;
#if DEBUG_IOCTL
- EC_MASTER_DBG(master, "ioctl(filp = 0x%x, cmd = 0x%08x (0x%02x),"
- " arg = 0x%x)\n", (u32) filp, (u32) cmd, (u32) _IOC_NR(cmd),
- (u32) arg);
+ EC_MASTER_DBG(master, 0, "ioctl(filp = 0x%p, cmd = 0x%08x (0x%02x),"
+ " arg = 0x%lx)\n", filp, cmd, _IOC_NR(cmd), arg);
#endif
switch (cmd) {
--- a/master/fsm_coe.c Thu May 20 12:35:36 2010 +0200
+++ b/master/fsm_coe.c Thu May 20 12:46:09 2010 +0200
@@ -1225,9 +1225,9 @@
if (!datagram->working_counter) {
if (diff_ms < fsm->request->response_timeout) {
#if DEBUG_RETRIES
- EC_SLAVE_DBG(slave, 1, "Slave did not respond to"
- " SDO download request. Retrying after %u ms...\n",
- (u32) diff_ms);
+ EC_SLAVE_DBG(slave, 1, "Slave did not respond to SDO"
+ " download request. Retrying after %lu ms...\n",
+ diff_ms);
#endif
// no response; send request datagram again
return;
@@ -1235,16 +1235,16 @@
}
fsm->state = ec_fsm_coe_error;
EC_SLAVE_ERR(slave, "Reception of CoE download request"
- " for SDO 0x%04x:%x failed with timeout after %u ms: ",
- fsm->request->index, fsm->request->subindex, (u32) diff_ms);
+ " for SDO 0x%04x:%x failed with timeout after %lu ms: ",
+ fsm->request->index, fsm->request->subindex, diff_ms);
ec_datagram_print_wc_error(datagram);
return;
}
#if DEBUG_LONG
if (diff_ms > 200) {
- EC_SLAVE_WARN(slave, "SDO 0x%04x:%x download took %u ms.\n",
- fsm->request->index, fsm->request->subindex, (u32) diff_ms);
+ EC_SLAVE_WARN(slave, "SDO 0x%04x:%x download took %lu ms.\n",
+ fsm->request->index, fsm->request->subindex, diff_ms);
}
#endif
@@ -1288,8 +1288,8 @@
(datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
if (diff_ms >= fsm->request->response_timeout) {
fsm->state = ec_fsm_coe_error;
- EC_SLAVE_ERR(slave, "Timeout after %u ms while waiting"
- " for SDO 0x%04x:%x download response.\n", (u32) diff_ms,
+ EC_SLAVE_ERR(slave, "Timeout after %lu ms while waiting"
+ " for SDO 0x%04x:%x download response.\n", diff_ms,
fsm->request->index, fsm->request->subindex);
return;
}
@@ -1727,8 +1727,8 @@
if (diff_ms < fsm->request->response_timeout) {
#if DEBUG_RETRIES
EC_SLAVE_DBG(slave, 1, "Slave did not respond to"
- " SDO upload request. Retrying after %u ms...\n",
- (u32) diff_ms);
+ " SDO upload request. Retrying after %lu ms...\n",
+ diff_ms);
#endif
// no response; send request datagram again
return;
@@ -1736,16 +1736,16 @@
}
fsm->state = ec_fsm_coe_error;
EC_SLAVE_ERR(slave, "Reception of CoE upload request for"
- " SDO 0x%04x:%x failed with timeout after %u ms: ",
- fsm->request->index, fsm->request->subindex, (u32) diff_ms);
+ " SDO 0x%04x:%x failed with timeout after %lu ms: ",
+ fsm->request->index, fsm->request->subindex, diff_ms);
ec_datagram_print_wc_error(datagram);
return;
}
#if DEBUG_LONG
if (diff_ms > 200) {
- EC_SLAVE_WARN(slave, "SDO 0x%04x:%x upload took %u ms.\n",
- fsm->request->index, fsm->request->subindex, (u32) diff_ms);
+ EC_SLAVE_WARN(slave, "SDO 0x%04x:%x upload took %lu ms.\n",
+ fsm->request->index, fsm->request->subindex, diff_ms);
}
#endif
@@ -1790,8 +1790,8 @@
(datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
if (diff_ms >= fsm->request->response_timeout) {
fsm->state = ec_fsm_coe_error;
- EC_SLAVE_ERR(slave, "Timeout after %u ms while waiting for"
- " SDO 0x%04x:%x upload response.\n", (u32) diff_ms,
+ EC_SLAVE_ERR(slave, "Timeout after %lu ms while waiting for"
+ " SDO 0x%04x:%x upload response.\n", diff_ms,
fsm->request->index, fsm->request->subindex);
return;
}
--- a/master/fsm_master.c Thu May 20 12:35:36 2010 +0200
+++ b/master/fsm_master.c Thu May 20 12:46:09 2010 +0200
@@ -792,8 +792,8 @@
return;
}
- EC_MASTER_INFO(master, "Bus scanning completed in %u ms.\n",
- (u32) (jiffies - fsm->scan_jiffies) * 1000 / HZ);
+ EC_MASTER_INFO(master, "Bus scanning completed in %lu ms.\n",
+ (jiffies - fsm->scan_jiffies) * 1000 / HZ);
master->scan_busy = 0;
wake_up_interruptible(&master->scan_queue);
@@ -907,9 +907,9 @@
EC_SLAVE_DBG(slave, 1, "DC system time offset calculation:"
" system_time=%u (corrected with %u),"
- " app_time=%u, diff=%i\n",
+ " app_time=%llu, diff=%i\n",
system_time32, correction,
- (u32) slave->master->app_time, time_diff);
+ slave->master->app_time, time_diff);
if (EC_ABS(time_diff) > EC_SYSTEM_TIME_TOLERANCE_NS) {
new_offset = time_diff + old_offset32;
--- a/master/fsm_slave_config.c Thu May 20 12:35:36 2010 +0200
+++ b/master/fsm_slave_config.c Thu May 20 12:46:09 2010 +0200
@@ -1242,11 +1242,11 @@
if (abs_sync_diff > EC_DC_MAX_SYNC_DIFF_NS) {
if (diff_ms >= EC_DC_SYNC_WAIT_MS) {
- EC_SLAVE_WARN(slave, "Slave did not sync after %u ms.\n",
- (u32) diff_ms);
+ EC_SLAVE_WARN(slave, "Slave did not sync after %lu ms.\n",
+ diff_ms);
} else {
- EC_SLAVE_DBG(slave, 1, "Sync after %4u ms: %10u ns\n",
- (u32) diff_ms, abs_sync_diff);
+ EC_SLAVE_DBG(slave, 1, "Sync after %4lu ms: %10u ns\n",
+ diff_ms, abs_sync_diff);
// check synchrony again
ec_datagram_fprd(datagram, slave->station_address, 0x092c, 4);
@@ -1254,8 +1254,8 @@
return;
}
} else {
- EC_SLAVE_DBG(slave, 1, "%u ns difference after %u ms.\n",
- abs_sync_diff, (u32) diff_ms);
+ EC_SLAVE_DBG(slave, 1, "%u ns difference after %lu ms.\n",
+ abs_sync_diff, diff_ms);
}
// set DC start time
--- a/master/fsm_soe.c Thu May 20 12:35:36 2010 +0200
+++ b/master/fsm_soe.c Thu May 20 12:46:09 2010 +0200
@@ -265,7 +265,7 @@
}
fsm->state = ec_fsm_soe_error;
EC_SLAVE_ERR(slave, "Reception of SoE read request"
- " failed after %u ms: ", (u32) diff_ms);
+ " failed after %lu ms: ", diff_ms);
ec_datagram_print_wc_error(datagram);
ec_fsm_soe_print_error(fsm);
return;
@@ -311,8 +311,8 @@
(datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
if (diff_ms >= EC_SOE_RESPONSE_TIMEOUT) {
fsm->state = ec_fsm_soe_error;
- EC_SLAVE_ERR(slave, "Timeout after %u ms while waiting for"
- " read response.\n", (u32) diff_ms);
+ EC_SLAVE_ERR(slave, "Timeout after %lu ms while waiting for"
+ " read response.\n", diff_ms);
ec_fsm_soe_print_error(fsm);
return;
}
@@ -563,7 +563,7 @@
}
fsm->state = ec_fsm_soe_error;
EC_SLAVE_ERR(slave, "Reception of SoE write request"
- " failed after %u ms: ", (u32) diff_ms);
+ " failed after %lu ms: ", diff_ms);
ec_datagram_print_wc_error(datagram);
ec_fsm_soe_print_error(fsm);
return;
@@ -613,8 +613,8 @@
(datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
if (diff_ms >= EC_SOE_RESPONSE_TIMEOUT) {
fsm->state = ec_fsm_soe_error;
- EC_SLAVE_ERR(slave, "Timeout after %u ms while waiting"
- " for write response.\n", (u32) diff_ms);
+ EC_SLAVE_ERR(slave, "Timeout after %lu ms while waiting"
+ " for write response.\n", diff_ms);
ec_fsm_soe_print_error(fsm);
return;
}
--- a/master/slave_config.c Thu May 20 12:35:36 2010 +0200
+++ b/master/slave_config.c Thu May 20 12:46:09 2010 +0200
@@ -428,7 +428,7 @@
}
if (dir != EC_DIR_OUTPUT && dir != EC_DIR_INPUT) {
- EC_CONFIG_ERR(sc, "Invalid direction %u!\n", (u32) dir);
+ EC_CONFIG_ERR(sc, "Invalid direction %u!\n", (unsigned int) dir);
return -EINVAL;
}
@@ -743,7 +743,7 @@
EC_CONFIG_DBG(sc, 1, "%s(sc = 0x%p, index = 0x%04X, "
"subindex = 0x%02X, value = %u)\n",
- __func__, sc, index, subindex, (u32) value);
+ __func__, sc, index, subindex, (unsigned int) value);
EC_WRITE_U8(data, value);
return ecrt_slave_config_sdo(sc, index, subindex, data, 1);
--- a/master/voe_handler.c Thu May 20 12:35:36 2010 +0200
+++ b/master/voe_handler.c Thu May 20 12:46:09 2010 +0200
@@ -267,8 +267,8 @@
(jiffies - voe->jiffies_start) * 1000 / HZ;
if (diff_ms < EC_VOE_RESPONSE_TIMEOUT) {
EC_SLAVE_DBG(slave, 1, "Slave did not respond to"
- " VoE write request. Retrying after %u ms...\n",
- (u32) diff_ms);
+ " VoE write request. Retrying after %lu ms...\n",
+ diff_ms);
// no response; send request datagram again
return;
}