File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -457,7 +457,6 @@ static void can_mcan_state_change_handler(const struct device *dev)
457
457
void * state_cb_data = data -> common .state_change_cb_user_data ;
458
458
const struct can_mcan_callbacks * cbs = config -> callbacks ;
459
459
can_tx_callback_t tx_cb ;
460
- uint32_t tx_idx ;
461
460
struct can_bus_err_cnt err_cnt ;
462
461
enum can_state state ;
463
462
uint32_t cccr ;
@@ -480,7 +479,7 @@ static void can_mcan_state_change_handler(const struct device *dev)
480
479
}
481
480
482
481
/* Call all TX queue callbacks with -ENETUNREACH */
483
- for (tx_idx = 0U ; tx_idx < cbs -> num_tx ; tx_idx ++ ) {
482
+ for (uint32_t tx_idx = 0U ; tx_idx < cbs -> num_tx ; tx_idx ++ ) {
484
483
tx_cb = cbs -> tx [tx_idx ].function ;
485
484
486
485
if (tx_cb != NULL ) {
@@ -1075,11 +1074,10 @@ int can_mcan_add_rx_filter_std(const struct device *dev, can_rx_callback_t callb
1075
1074
};
1076
1075
int filter_id = - ENOSPC ;
1077
1076
int err ;
1078
- int i ;
1079
1077
1080
1078
k_mutex_lock (& data -> lock , K_FOREVER );
1081
1079
1082
- for (i = 0 ; i < cbs -> num_std ; i ++ ) {
1080
+ for (int i = 0 ; i < cbs -> num_std ; i ++ ) {
1083
1081
if (cbs -> std [i ].function == NULL ) {
1084
1082
filter_id = i ;
1085
1083
break ;
@@ -1127,11 +1125,10 @@ static int can_mcan_add_rx_filter_ext(const struct device *dev, can_rx_callback_
1127
1125
};
1128
1126
int filter_id = - ENOSPC ;
1129
1127
int err ;
1130
- int i ;
1131
1128
1132
1129
k_mutex_lock (& data -> lock , K_FOREVER );
1133
1130
1134
- for (i = 0 ; i < cbs -> num_ext ; i ++ ) {
1131
+ for (int i = 0 ; i < cbs -> num_ext ; i ++ ) {
1135
1132
if (cbs -> ext [i ].function == NULL ) {
1136
1133
filter_id = i ;
1137
1134
break ;
You can’t perform that action at this time.
0 commit comments