/* Locking: caller holds exclusive termios_rwsem (or locking is not required)  */
static void reset_buffer_flags(struct n_tty_data *ldata)
/* Locking: caller holds exclusive termios_rwsem (or locking is not required)  */
static void reset_buffer_flags(struct n_tty_data *ldata)
{
    ldata->read_head = ldata->canon_head = ldata->read_tail = 0;
    ldata->echo_head = ldata->echo_tail = ldata->echo_commit = 0;
    ldata->commit_head = 0;
    ldata->echo_mark = 0;
    ldata->line_start = 0;
    ldata->erasing = 0;
    rt_memset(ldata->read_flags, 0, RT_TTY_BUF);
    ldata->push = 0;
}