Replaced a few GFP_ATOMIC allocations with GFP_KERNEL ones.
This commit is contained in:
parent
e2c03b9e77
commit
b54bc11567
2
TODO
2
TODO
|
|
@ -25,8 +25,6 @@ Version 1.4.0:
|
|||
* List of commands that require a slave.
|
||||
* Remove configs_attached flag.
|
||||
* Remove EC_IOCTL_DOMAIN_COUNT.
|
||||
* Remove ATOMIC allocations.
|
||||
* Clear FMMU configs.
|
||||
* Rename master MODE to STATE.
|
||||
|
||||
Future issues:
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ int ec_datagram_prealloc(
|
|||
datagram->mem_size = 0;
|
||||
}
|
||||
|
||||
if (!(datagram->data = kmalloc(size, GFP_ATOMIC))) {
|
||||
if (!(datagram->data = kmalloc(size, GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate %u bytes of datagram memory!\n", size);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ void ec_fsm_coe_dict_response(ec_fsm_coe_t *fsm /**< finite state machine */)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!(sdo = (ec_sdo_t *) kmalloc(sizeof(ec_sdo_t), GFP_ATOMIC))) {
|
||||
if (!(sdo = (ec_sdo_t *) kmalloc(sizeof(ec_sdo_t), GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate memory for Sdo!\n");
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
return;
|
||||
|
|
@ -689,7 +689,7 @@ void ec_fsm_coe_dict_desc_response(ec_fsm_coe_t *fsm
|
|||
|
||||
name_size = rec_size - 12;
|
||||
if (name_size) {
|
||||
if (!(sdo->name = kmalloc(name_size + 1, GFP_ATOMIC))) {
|
||||
if (!(sdo->name = kmalloc(name_size + 1, GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate Sdo name!\n");
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
return;
|
||||
|
|
@ -904,7 +904,7 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm
|
|||
data_size = rec_size - 16;
|
||||
|
||||
if (!(entry = (ec_sdo_entry_t *)
|
||||
kmalloc(sizeof(ec_sdo_entry_t), GFP_ATOMIC))) {
|
||||
kmalloc(sizeof(ec_sdo_entry_t), GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate entry!\n");
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
return;
|
||||
|
|
@ -916,7 +916,7 @@ void ec_fsm_coe_dict_entry_response(ec_fsm_coe_t *fsm
|
|||
|
||||
if (data_size) {
|
||||
uint8_t *desc;
|
||||
if (!(desc = kmalloc(data_size + 1, GFP_ATOMIC))) {
|
||||
if (!(desc = kmalloc(data_size + 1, GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate Sdo entry name!\n");
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -243,8 +243,8 @@ void ec_fsm_master_state_broadcast(
|
|||
|
||||
// init slaves
|
||||
for (i = 0; i < master->slave_count; i++) {
|
||||
if (!(slave = (ec_slave_t *) kmalloc(sizeof(ec_slave_t),
|
||||
GFP_ATOMIC))) {
|
||||
if (!(slave = (ec_slave_t *)
|
||||
kmalloc(sizeof(ec_slave_t), GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate slave %u!\n", i);
|
||||
ec_master_clear_slaves(master);
|
||||
master->scan_busy = 0;
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ alloc_sii:
|
|||
}
|
||||
|
||||
if (!(slave->sii_words =
|
||||
(uint16_t *) kmalloc(slave->sii_nwords * 2, GFP_ATOMIC))) {
|
||||
(uint16_t *) kmalloc(slave->sii_nwords * 2, GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate %u words of SII data for slave %u.\n",
|
||||
slave->sii_nwords, slave->ring_position);
|
||||
slave->sii_nwords = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue