Replaced misleading %i by %u.
--- a/master/datagram.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/datagram.c Tue Jun 10 11:54:39 2008 +0000
@@ -147,7 +147,7 @@
}
if (!(datagram->data = kmalloc(size, GFP_ATOMIC))) {
- EC_ERR("Failed to allocate %i bytes of datagram memory!\n", size);
+ EC_ERR("Failed to allocate %u bytes of datagram memory!\n", size);
return -1;
}
--- a/master/device.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/device.c Tue Jun 10 11:54:39 2008 +0000
@@ -351,7 +351,7 @@
% EC_DEBUG_RING_SIZE;
t0 = device->debug_frames[ring_index].t;
- EC_DBG("Debug ring %i:\n", ring_index);
+ EC_DBG("Debug ring %u:\n", ring_index);
// calculate index of the oldest frame in the ring
ring_index = (device->debug_frame_index + EC_DEBUG_RING_SIZE
@@ -361,7 +361,7 @@
df = &device->debug_frames[ring_index];
timersub(&t0, &df->t, &diff);
- EC_DBG("Frame %i, dt=%u.%06u s, %s:\n",
+ EC_DBG("Frame %u, dt=%u.%06u s, %s:\n",
i + 1 - device->debug_frame_count,
(unsigned int) diff.tv_sec,
(unsigned int) diff.tv_usec,
--- a/master/ethernet.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/ethernet.c Tue Jun 10 11:54:39 2008 +0000
@@ -255,8 +255,8 @@
}
#if EOE_DEBUG_LEVEL > 0
- EC_INFO("EoE %s TX sending fragment %i%s with %i octets (%i)."
- " %i frames queued.\n", eoe->dev->name, eoe->tx_fragment_number,
+ EC_INFO("EoE %s TX sending fragment %u%s with %u octets (%u)."
+ " %u frames queued.\n", eoe->dev->name, eoe->tx_fragment_number,
last_fragment ? "" : "+", current_size, complete_offset,
eoe->tx_queued_frames);
#endif
@@ -449,8 +449,8 @@
frame_number = (EC_READ_U16(data + 2) >> 12) & 0x000F;
#if EOE_DEBUG_LEVEL > 0
- EC_INFO("EoE %s RX fragment %i%s, offset %i, frame %i%s,"
- " %i octets\n", eoe->dev->name, fragment_number,
+ EC_INFO("EoE %s RX fragment %u%s, offset %u, frame %u%s,"
+ " %u octets\n", eoe->dev->name, fragment_number,
last_fragment ? "" : "+", fragment_offset, frame_number,
time_appended ? ", + timestamp" : "",
time_appended ? rec_size - 8 : rec_size - 4);
@@ -537,7 +537,7 @@
else {
eoe->rx_expected_fragment++;
#if EOE_DEBUG_LEVEL > 0
- EC_INFO("EoE %s RX expecting fragment %i\n",
+ EC_INFO("EoE %s RX expecting fragment %u\n",
eoe->dev->name, eoe->rx_expected_fragment);
#endif
eoe->state = ec_eoe_state_rx_start;
@@ -703,7 +703,7 @@
#if 0
if (skb->len > eoe->slave->sii.tx_mailbox_size - 10) {
- EC_WARN("EoE TX frame (%i octets) exceeds MTU. dropping.\n", skb->len);
+ EC_WARN("EoE TX frame (%u octets) exceeds MTU. dropping.\n", skb->len);
dev_kfree_skb(skb);
eoe->stats.tx_dropped++;
return 0;
@@ -729,7 +729,7 @@
spin_unlock_bh(&eoe->tx_queue_lock);
#if EOE_DEBUG_LEVEL > 0
- EC_INFO("EoE %s TX queued frame with %i octets (%i frames queued).\n",
+ EC_INFO("EoE %s TX queued frame with %u octets (%u frames queued).\n",
eoe->dev->name, skb->len, eoe->tx_queued_frames);
if (!eoe->tx_queue_active)
EC_WARN("EoE TX queue is now full.\n");
--- a/master/fsm_change.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/fsm_change.c Tue Jun 10 11:54:39 2008 +0000
@@ -180,8 +180,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to receive state datagram from slave %i"
- " (datagram state %i)!\n",
+ EC_ERR("Failed to receive state datagram from slave %u"
+ " (datagram state %u)!\n",
fsm->slave->ring_position, datagram->state);
return;
}
@@ -196,7 +196,7 @@
char state_str[EC_STATE_STRING_SIZE];
ec_state_string(fsm->requested_state, state_str);
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to set state %s on slave %i: ",
+ EC_ERR("Failed to set state %s on slave %u: ",
state_str, fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -213,7 +213,7 @@
char state_str[EC_STATE_STRING_SIZE];
ec_state_string(fsm->requested_state, state_str);
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to set state %s on slave %i: ",
+ EC_ERR("Failed to set state %s on slave %u: ",
state_str, fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -245,8 +245,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to receive state checking datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive state checking datagram from slave %u"
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -255,7 +255,7 @@
char req_state[EC_STATE_STRING_SIZE];
ec_state_string(fsm->requested_state, req_state);
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to check state %s on slave %i: ",
+ EC_ERR("Failed to check state %s on slave %u: ",
req_state, slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -285,7 +285,7 @@
// state change
fsm->spontaneous_change = 1;
fsm->old_state = slave->current_state;
- EC_WARN("Slave %i changed to %s in the meantime.\n",
+ EC_WARN("Slave %u changed to %s in the meantime.\n",
slave->ring_position, cur_state);
goto check_again;
}
@@ -295,7 +295,7 @@
slave->error_flag = 1;
ec_state_string(fsm->requested_state, req_state);
- EC_ERR("Failed to set %s state, slave %i refused state change (%s).\n",
+ EC_ERR("Failed to set %s state, slave %u refused state change (%s).\n",
req_state, slave->ring_position, cur_state);
// fetch AL status error code
ec_datagram_fprd(datagram, slave->station_address, 0x0134, 2);
@@ -311,7 +311,7 @@
char state_str[EC_STATE_STRING_SIZE];
ec_state_string(fsm->requested_state, state_str);
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Timeout while setting state %s on slave %i.\n",
+ EC_ERR("Timeout while setting state %s on slave %u.\n",
state_str, slave->ring_position);
return;
}
@@ -380,8 +380,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to receive AL status code datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive AL status code datagram from slave %u"
+ " (datagram state %u).\n",
fsm->slave->ring_position, datagram->state);
return;
}
@@ -439,15 +439,15 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to receive state ack datagram for slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive state ack datagram for slave %u"
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
if (datagram->working_counter != 1) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Reception of state ack datagram failed on slave %i: ",
+ EC_ERR("Reception of state ack datagram failed on slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -478,15 +478,15 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Failed to receive state ack check datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive state ack check datagram from slave %u"
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
if (datagram->working_counter != 1) {
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Reception of state ack check datagram failed on slave %i: ",
+ EC_ERR("Reception of state ack check datagram failed on slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -508,7 +508,7 @@
else { // EC_FSM_CHANGE_MODE_ACK_ONLY
fsm->state = ec_fsm_change_state_end;
}
- EC_INFO("Acknowledged state %s on slave %i.\n",
+ EC_INFO("Acknowledged state %s on slave %u.\n",
state_str, slave->ring_position);
return;
}
@@ -518,7 +518,7 @@
char state_str[EC_STATE_STRING_SIZE];
ec_state_string(slave->current_state, state_str);
fsm->state = ec_fsm_change_state_error;
- EC_ERR("Timeout while acknowledging state %s on slave %i.\n",
+ EC_ERR("Timeout while acknowledging state %s on slave %u.\n",
state_str, slave->ring_position);
return;
}
--- a/master/fsm_coe.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/fsm_coe.c Tue Jun 10 11:54:39 2008 +0000
@@ -304,7 +304,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE dictionary request datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -341,7 +341,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE mailbox check datagram for slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -397,7 +397,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE dictionary response datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -536,7 +536,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE Sdo description request datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -573,7 +573,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE mailbox check datagram from slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -628,7 +628,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE Sdo description response datagram from"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -750,7 +750,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE Sdo entry request datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -788,7 +788,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE mailbox check datagram from slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -844,7 +844,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE Sdo description response datagram from"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1056,7 +1056,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE download request datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1093,7 +1093,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE mailbox check datagram for slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1147,7 +1147,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE download response datagram from"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1285,7 +1285,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE upload request for slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1322,7 +1322,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE mailbox check datagram from slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1379,7 +1379,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE upload response datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1525,7 +1525,7 @@
fsm->toggle = 0;
if (data_size < complete_size) {
- EC_WARN("Sdo data incomplete (%i / %i).\n",
+ EC_WARN("Sdo data incomplete (%u / %u).\n",
data_size, complete_size);
if (!(data = ec_slave_mbox_prepare_send(slave, datagram,
@@ -1575,7 +1575,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE upload segment request datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1612,7 +1612,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE mailbox check datagram for slave %u"
- " (datagram state %i).\n",
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1670,7 +1670,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_coe_error;
EC_ERR("Failed to receive CoE upload segment response datagram for"
- " slave %u (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -1739,7 +1739,7 @@
data_size = rec_size - 10;
if (data_size != seg_size) {
- EC_WARN("Sdo segment data invalid (%i / %i)"
+ EC_WARN("Sdo segment data invalid (%u / %u)"
" - Fragmenting not implemented.\n",
data_size, seg_size);
}
--- a/master/fsm_master.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/fsm_master.c Tue Jun 10 11:54:39 2008 +0000
@@ -245,7 +245,7 @@
for (i = 0; i < master->slave_count; i++) {
if (!(slave = (ec_slave_t *) kmalloc(sizeof(ec_slave_t),
GFP_ATOMIC))) {
- EC_ERR("Failed to allocate slave %i!\n", i);
+ EC_ERR("Failed to allocate slave %u!\n", i);
ec_master_destroy_slaves(master);
master->scan_busy = 0;
wake_up_interruptible(&master->scan_queue);
@@ -598,7 +598,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
EC_ERR("Failed to receive AL state datagram for slave %u"
- " (datagram state %i)\n",
+ " (datagram state %u)\n",
slave->ring_position, datagram->state);
fsm->state = ec_fsm_master_state_error;
return;
@@ -659,7 +659,7 @@
return;
if (datagram->state != EC_DATAGRAM_RECEIVED) {
- EC_ERR("Failed to receive address clearing datagram (state %i).\n",
+ EC_ERR("Failed to receive address clearing datagram (state %u).\n",
datagram->state);
master->scan_busy = 0;
wake_up_interruptible(&master->scan_queue);
@@ -782,7 +782,7 @@
if (!ec_fsm_sii_success(&fsm->fsm_sii)) {
slave->error_flag = 1;
- EC_ERR("Failed to write SII data to slave %i.\n",
+ EC_ERR("Failed to write SII data to slave %u.\n",
slave->ring_position);
request->state = EC_REQUEST_FAILURE;
wake_up(&master->sii_queue);
--- a/master/fsm_sii.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/fsm_sii.c Tue Jun 10 11:54:39 2008 +0000
@@ -211,15 +211,15 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Failed to receive SII read datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive SII read datagram from slave %u"
+ " (datagram state %u).\n",
fsm->slave->ring_position, datagram->state);
return;
}
if (datagram->working_counter != 1) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Reception of SII read datagram failed on slave %i: ",
+ EC_ERR("Reception of SII read datagram failed on slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -260,15 +260,15 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Failed to receive SII check/fetch datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive SII check/fetch datagram from slave %u"
+ " (datagram state %u).\n",
fsm->slave->ring_position, datagram->state);
return;
}
if (datagram->working_counter != 1) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Reception of SII check/fetch datagram failed on slave %i: ",
+ EC_ERR("Reception of SII check/fetch datagram failed on slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -358,15 +358,15 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Failed to receive SII write datagram for slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive SII write datagram for slave %u"
+ " (datagram state %u).\n",
fsm->slave->ring_position, datagram->state);
return;
}
if (datagram->working_counter != 1) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Reception of SII write datagram failed on slave %i: ",
+ EC_ERR("Reception of SII write datagram failed on slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -398,15 +398,15 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Failed to receive SII write check datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive SII write check datagram from slave %u"
+ " (datagram state %u).\n",
fsm->slave->ring_position, datagram->state);
return;
}
if (datagram->working_counter != 1) {
fsm->state = ec_fsm_sii_state_error;
- EC_ERR("Reception of SII write check datagram failed on slave %i: ",
+ EC_ERR("Reception of SII write check datagram failed on slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
--- a/master/fsm_slave_config.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/fsm_slave_config.c Tue Jun 10 11:54:39 2008 +0000
@@ -168,7 +168,7 @@
void ec_fsm_slave_config_state_start(ec_fsm_slave_config_t *fsm /**< slave state machine */)
{
if (fsm->slave->master->debug_level) {
- EC_DBG("Configuring slave %i...\n", fsm->slave->ring_position);
+ EC_DBG("Configuring slave %u...\n", fsm->slave->ring_position);
}
ec_fsm_change_start(&fsm->fsm_change, fsm->slave, EC_SLAVE_STATE_INIT);
@@ -198,7 +198,7 @@
}
if (master->debug_level) {
- EC_DBG("Slave %i is now in INIT.\n", slave->ring_position);
+ EC_DBG("Slave %u is now in INIT.\n", slave->ring_position);
}
// check and reset CRC fault counters
@@ -211,7 +211,7 @@
}
if (master->debug_level)
- EC_DBG("Clearing FMMU configurations of slave %i...\n",
+ EC_DBG("Clearing FMMU configurations of slave %u...\n",
slave->ring_position);
// clear FMMU configurations
@@ -238,7 +238,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_config_state_error;
- EC_ERR("Failed receive FMMU clearing datagram for slave %i.\n",
+ EC_ERR("Failed receive FMMU clearing datagram for slave %u.\n",
fsm->slave->ring_position);
return;
}
@@ -246,7 +246,7 @@
if (datagram->working_counter != 1) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_config_state_error;
- EC_ERR("Failed to clear FMMUs of slave %i: ",
+ EC_ERR("Failed to clear FMMUs of slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -274,7 +274,7 @@
if (slave->current_state == slave->requested_state) {
fsm->state = ec_fsm_slave_config_state_end; // successful
if (master->debug_level) {
- EC_DBG("Finished configuration of slave %i.\n",
+ EC_DBG("Finished configuration of slave %u.\n",
slave->ring_position);
}
return;
@@ -290,7 +290,7 @@
}
if (master->debug_level) {
- EC_DBG("Configuring mailbox sync managers of slave %i.\n",
+ EC_DBG("Configuring mailbox sync managers of slave %u.\n",
slave->ring_position);
}
@@ -352,7 +352,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_config_state_error;
EC_ERR("Failed to receive sync manager configuration datagram for"
- " slave %i (datagram state %i).\n",
+ " slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -360,7 +360,7 @@
if (datagram->working_counter != 1) {
slave->error_flag = 1;
fsm->state = ec_fsm_slave_config_state_error;
- EC_ERR("Failed to set sync managers of slave %i: ",
+ EC_ERR("Failed to set sync managers of slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -406,7 +406,7 @@
slave->jiffies_preop = fsm->datagram->jiffies_received;
if (master->debug_level) {
- EC_DBG("Slave %i is now in PREOP.\n", slave->ring_position);
+ EC_DBG("Slave %u is now in PREOP.\n", slave->ring_position);
}
if (slave->current_state == slave->requested_state) {
@@ -551,7 +551,7 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_config_state_error;
EC_ERR("Failed to receive process data sync manager configuration"
- " datagram for slave %i (datagram state %i).\n",
+ " datagram for slave %u (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -559,7 +559,7 @@
if (datagram->working_counter != 1) {
slave->error_flag = 1;
fsm->state = ec_fsm_slave_config_state_error;
- EC_ERR("Failed to set process data sync managers of slave %i: ",
+ EC_ERR("Failed to set process data sync managers of slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -685,8 +685,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_config_state_error;
- EC_ERR("Failed to receive FMMUs datagram for slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive FMMUs datagram for slave %u"
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -694,7 +694,7 @@
if (datagram->working_counter != 1) {
slave->error_flag = 1;
fsm->state = ec_fsm_slave_config_state_error;
- EC_ERR("Failed to set FMMUs of slave %i: ",
+ EC_ERR("Failed to set FMMUs of slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -739,13 +739,13 @@
// slave is now in SAFEOP
if (master->debug_level) {
- EC_DBG("Slave %i is now in SAFEOP.\n", slave->ring_position);
+ EC_DBG("Slave %u is now in SAFEOP.\n", slave->ring_position);
}
if (fsm->slave->current_state == fsm->slave->requested_state) {
fsm->state = ec_fsm_slave_config_state_end; // successful
if (master->debug_level) {
- EC_DBG("Finished configuration of slave %i.\n",
+ EC_DBG("Finished configuration of slave %u.\n",
slave->ring_position);
}
return;
@@ -780,8 +780,8 @@
// slave is now in OP
if (master->debug_level) {
- EC_DBG("Slave %i is now in OP.\n", slave->ring_position);
- EC_DBG("Finished configuration of slave %i.\n", slave->ring_position);
+ EC_DBG("Slave %u is now in OP.\n", slave->ring_position);
+ EC_DBG("Finished configuration of slave %u.\n", slave->ring_position);
}
fsm->state = ec_fsm_slave_config_state_end; // successful
--- a/master/fsm_slave_scan.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/fsm_slave_scan.c Tue Jun 10 11:54:39 2008 +0000
@@ -187,8 +187,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to receive station address datagram for slave %i"
- " (datagram state %i)\n",
+ EC_ERR("Failed to receive station address datagram for slave %u"
+ " (datagram state %u)\n",
fsm->slave->ring_position, datagram->state);
return;
}
@@ -196,7 +196,7 @@
if (datagram->working_counter != 1) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to write station address on slave %i: ",
+ EC_ERR("Failed to write station address on slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -226,8 +226,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to receive AL state datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive AL state datagram from slave %u"
+ " (datagram state %u).\n",
fsm->slave->ring_position, datagram->state);
return;
}
@@ -235,7 +235,7 @@
if (datagram->working_counter != 1) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to read AL state of slave %i: ",
+ EC_ERR("Failed to read AL state of slave %u: ",
fsm->slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -245,7 +245,7 @@
if (slave->current_state & EC_SLAVE_STATE_ACK_ERR) {
char state_str[EC_STATE_STRING_SIZE];
ec_state_string(slave->current_state, state_str);
- EC_WARN("Slave %i has state error bit set (%s)!\n",
+ EC_WARN("Slave %u has state error bit set (%s)!\n",
slave->ring_position, state_str);
}
@@ -271,8 +271,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to receive base data datagram for slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive base data datagram for slave %u"
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -280,7 +280,7 @@
if (datagram->working_counter != 1) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to read base data from slave %i: ",
+ EC_ERR("Failed to read base data from slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -322,8 +322,8 @@
if (datagram->state != EC_DATAGRAM_RECEIVED) {
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to receive DL status datagram from slave %i"
- " (datagram state %i).\n",
+ EC_ERR("Failed to receive DL status datagram from slave %u"
+ " (datagram state %u).\n",
slave->ring_position, datagram->state);
return;
}
@@ -331,7 +331,7 @@
if (datagram->working_counter != 1) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to read DL status from slave %i: ",
+ EC_ERR("Failed to read DL status from slave %u: ",
slave->ring_position);
ec_datagram_print_wc_error(datagram);
return;
@@ -369,7 +369,7 @@
if (!ec_fsm_sii_success(&fsm->fsm_sii)) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to read SII size of slave %i.\n",
+ EC_ERR("Failed to read SII size of slave %u.\n",
slave->ring_position);
return;
}
@@ -380,7 +380,7 @@
if (cat_type != 0xFFFF) { // not the last category
off_t next_offset = 2UL + fsm->sii_offset + cat_size;
if (next_offset >= EC_MAX_SII_SIZE) {
- EC_WARN("SII size of slave %i exceeds"
+ EC_WARN("SII size of slave %u exceeds"
" %u words (0xffff limiter missing?).\n",
slave->ring_position, EC_MAX_SII_SIZE);
// cut off category data...
@@ -398,7 +398,7 @@
alloc_sii:
if (slave->sii_words) {
- EC_WARN("Freeing old SII data on slave %i...\n",
+ EC_WARN("Freeing old SII data on slave %u...\n",
slave->ring_position);
kfree(slave->sii_words);
}
@@ -438,7 +438,7 @@
if (!ec_fsm_sii_success(&fsm->fsm_sii)) {
fsm->slave->error_flag = 1;
fsm->state = ec_fsm_slave_scan_state_error;
- EC_ERR("Failed to fetch SII contents of slave %i.\n",
+ EC_ERR("Failed to fetch SII contents of slave %u.\n",
slave->ring_position);
return;
}
@@ -551,7 +551,7 @@
break;
default:
if (fsm->slave->master->debug_level)
- EC_WARN("Unknown category type 0x%04X in slave %i.\n",
+ EC_WARN("Unknown category type 0x%04X in slave %u.\n",
cat_type, slave->ring_position);
}
--- a/master/mailbox.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/mailbox.c Tue Jun 10 11:54:39 2008 +0000
@@ -61,7 +61,7 @@
size_t total_size;
if (unlikely(!slave->sii.mailbox_protocols)) {
- EC_ERR("Slave %i does not support mailbox communication!\n",
+ EC_ERR("Slave %u does not support mailbox communication!\n",
slave->ring_position);
return NULL;
}
@@ -168,7 +168,7 @@
data_size = EC_READ_U16(datagram->data);
if (data_size > slave->sii.tx_mailbox_size - 6) {
- EC_ERR("Corrupt mailbox response received from slave %i!\n",
+ EC_ERR("Corrupt mailbox response received from slave %u!\n",
slave->ring_position);
ec_print_data(datagram->data, slave->sii.tx_mailbox_size);
return NULL;
@@ -181,7 +181,7 @@
const ec_code_msg_t *mbox_msg;
uint16_t code = EC_READ_U16(datagram->data + 8);
- EC_ERR("Mailbox error response received from slave %i - ",
+ EC_ERR("Mailbox error response received from slave %u - ",
slave->ring_position);
for (mbox_msg = mbox_error_messages; mbox_msg->code; mbox_msg++) {
--- a/master/master.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/master.c Tue Jun 10 11:54:39 2008 +0000
@@ -188,7 +188,7 @@
master->kobj.ktype = &ktype_ec_master;
master->kobj.parent = module_kobj;
- if (kobject_set_name(&master->kobj, "master%i", index)) {
+ if (kobject_set_name(&master->kobj, "master%u", index)) {
EC_ERR("Failed to set master kobject name.\n");
kobject_put(&master->kobj);
goto out_clear_fsm;
@@ -654,7 +654,7 @@
EC_WRITE_U8(cur_data++, 0x00);
if (unlikely(master->debug_level > 1))
- EC_DBG("frame size: %i\n", cur_data - frame_data);
+ EC_DBG("frame size: %u\n", cur_data - frame_data);
// send frame
ec_device_send(&master->main_device, cur_data - frame_data);
@@ -675,7 +675,7 @@
if (unlikely(master->debug_level > 1)) {
cycles_end = get_cycles();
- EC_DBG("ec_master_send_datagrams sent %i frames in %ius.\n",
+ EC_DBG("ec_master_send_datagrams sent %u frames in %uus.\n",
frame_count,
(unsigned int) (cycles_end - cycles_start) * 1000 / cpu_khz);
}
@@ -795,17 +795,17 @@
master->stats.output_jiffies = jiffies;
if (master->stats.timeouts) {
- EC_WARN("%i datagram%s TIMED OUT!\n", master->stats.timeouts,
+ EC_WARN("%u datagram%s TIMED OUT!\n", master->stats.timeouts,
master->stats.timeouts == 1 ? "" : "s");
master->stats.timeouts = 0;
}
if (master->stats.corrupted) {
- EC_WARN("%i frame%s CORRUPTED!\n", master->stats.corrupted,
+ EC_WARN("%u frame%s CORRUPTED!\n", master->stats.corrupted,
master->stats.corrupted == 1 ? "" : "s");
master->stats.corrupted = 0;
}
if (master->stats.unmatched) {
- EC_WARN("%i datagram%s UNMATCHED!\n", master->stats.unmatched,
+ EC_WARN("%u datagram%s UNMATCHED!\n", master->stats.unmatched,
master->stats.unmatched == 1 ? "" : "s");
master->stats.unmatched = 0;
}
--- a/master/sdo_entry.c Tue Jun 10 09:54:30 2008 +0000
+++ b/master/sdo_entry.c Tue Jun 10 11:54:39 2008 +0000
@@ -165,7 +165,7 @@
off += sprintf(buffer + off, "Description: %s\n",
entry->description ? entry->description : "");
off += sprintf(buffer + off, "Data type: 0x%04X\n", entry->data_type);
- off += sprintf(buffer + off, "Bit length: %i\n", entry->bit_length);
+ off += sprintf(buffer + off, "Bit length: %u\n", entry->bit_length);
return off;
}
@@ -234,7 +234,7 @@
if (entry->bit_length != 32)
goto not_fit;
value = EC_READ_U32(request->data);
- off += sprintf(buffer + off, "%i (0x%08X)\n", value, value);
+ off += sprintf(buffer + off, "%u (0x%08X)\n", value, value);
}
else if (entry->data_type == 0x0009) { // string
off += sprintf(buffer + off, "%s\n", request->data);