Skip to content

Commit

Permalink
com/can: Remove unnecessary judgment logic
Browse files Browse the repository at this point in the history
The feature of preventing the same ID frame rotation should be done in the lowerhalf, not in the upperhalf.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
  • Loading branch information
HedongGao committed Nov 19, 2024
1 parent f59edf8 commit 9a58681
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/can/can_sender.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,6 @@ FAR struct can_msg_s *can_get_msg(FAR struct can_txcache_s *cd_sender)
list_for_every_entry(&cd_sender->tx_sending, tmp_node,
struct can_msg_node_s, list)
{
if (tmp_node->msg.cm_hdr.ch_id == msg->cm_hdr.ch_id)
{
/* In order to prevent messages with the same ID from being
* sent out of order, as long as there is a message with the
* same ID that has not been sent in H/W, no data will be
* written to H/W
*/

return NULL;
}

if (tmp_node->msg.cm_hdr.ch_id > msg->cm_hdr.ch_id)
{
break;
Expand Down

0 comments on commit 9a58681

Please sign in to comment.